fix GL-less kwin compilation
BUG: 277667
This commit is contained in:
parent
7057bb2c25
commit
d20b841713
2 changed files with 6 additions and 0 deletions
|
@ -686,6 +686,7 @@ void Toplevel::addDamage(int x, int y, int w, int h)
|
|||
damageRatio = float(damageArea) / float(rect().width()*rect().height());
|
||||
repaints_region += r;
|
||||
emit damaged(this, r);
|
||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||
// discard lanczos texture
|
||||
if (effect_window) {
|
||||
QVariant cachedTextureVariant = effect_window->data(LanczosCacheRole);
|
||||
|
@ -696,6 +697,7 @@ void Toplevel::addDamage(int x, int y, int w, int h)
|
|||
effect_window->setData(LanczosCacheRole, QVariant());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
workspace()->checkCompositeTimer();
|
||||
}
|
||||
|
||||
|
@ -707,6 +709,7 @@ void Toplevel::addDamageFull()
|
|||
repaints_region = rect();
|
||||
damageRatio = 1.0;
|
||||
emit damaged(this, rect());
|
||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||
// discard lanczos texture
|
||||
if (effect_window) {
|
||||
QVariant cachedTextureVariant = effect_window->data(LanczosCacheRole);
|
||||
|
@ -717,6 +720,7 @@ void Toplevel::addDamageFull()
|
|||
effect_window->setData(LanczosCacheRole, QVariant());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
workspace()->checkCompositeTimer();
|
||||
}
|
||||
|
||||
|
|
|
@ -1271,11 +1271,13 @@ EffectWindowImpl::EffectWindowImpl() : EffectWindow()
|
|||
|
||||
EffectWindowImpl::~EffectWindowImpl()
|
||||
{
|
||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||
QVariant cachedTextureVariant = data(LanczosCacheRole);
|
||||
if (cachedTextureVariant.isValid()) {
|
||||
GLTexture *cachedTexture = static_cast< GLTexture*>(cachedTextureVariant.value<void*>());
|
||||
delete cachedTexture;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool EffectWindowImpl::isPaintingEnabled()
|
||||
|
|
Loading…
Reference in a new issue