[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
This commit is contained in:
Martin Flöser 2018-01-14 21:01:15 +01:00
parent 9b74583565
commit e200d74031
3 changed files with 6 additions and 1 deletions

View file

@ -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)

View file

@ -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();

View file

@ -25,6 +25,7 @@
#include <kwineffects_interface.h>
#include <KAboutData>
#include <KPluginFactory>
#include <KWindowSystem>
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);