From e200d7403110fec5e543da0577c761aab3d0f079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Sun, 14 Jan 2018 21:01:15 +0100 Subject: [PATCH] [effects/blur] Disable texture cache on Wayland Summary: It is known to create problems especially on multi-screen and is not as important on Wayland as it used to be on X11 thanks to things like buffer age and in general better rendering. Test Plan: Opened the config module and verified that the option is hidden Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #plasma Differential Revision: https://phabricator.kde.org/D9879 --- effects/blur/CMakeLists.txt | 1 + effects/blur/blur.cpp | 2 +- effects/blur/blur_config.cpp | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/effects/blur/CMakeLists.txt b/effects/blur/CMakeLists.txt index b4c99d32ed..e14819e4f2 100644 --- a/effects/blur/CMakeLists.txt +++ b/effects/blur/CMakeLists.txt @@ -12,6 +12,7 @@ target_link_libraries(kwin_blur_config KF5::ConfigWidgets KF5::I18n KF5::Service + KF5::WindowSystem ) kcoreaddons_desktop_to_json(kwin_blur_config blur_config.desktop SERVICE_TYPES kcmodule.desktop) diff --git a/effects/blur/blur.cpp b/effects/blur/blur.cpp index 3b39f1d771..c353f6e96f 100644 --- a/effects/blur/blur.cpp +++ b/effects/blur/blur.cpp @@ -118,7 +118,7 @@ void BlurEffect::reconfigure(ReconfigureFlags flags) if (shader) shader->setRadius(radius); - m_shouldCache = BlurConfig::cacheTexture(); + m_shouldCache = effects->waylandDisplay() ? false : BlurConfig::cacheTexture(); windows.clear(); diff --git a/effects/blur/blur_config.cpp b/effects/blur/blur_config.cpp index a39882a723..b0aacadec5 100644 --- a/effects/blur/blur_config.cpp +++ b/effects/blur/blur_config.cpp @@ -25,6 +25,7 @@ #include #include #include +#include K_PLUGIN_FACTORY_WITH_JSON(BlurEffectConfigFactory, "blur_config.json", @@ -37,6 +38,9 @@ BlurEffectConfig::BlurEffectConfig(QWidget *parent, const QVariantList &args) : KCModule(KAboutData::pluginData(QStringLiteral("blur")), parent, args) { ui.setupUi(this); + if (KWindowSystem::isPlatformWayland()) { + ui.kcfg_CacheTexture->setVisible(false); + } BlurConfig::instance(KWIN_CONFIG); addConfig(BlurConfig::self(), this);