Remove damage argument in Toplevel::resetDamage
We always reset with the complete window geometry, so the subtracting doesn't make any sense. We can just always set the damage to an empty region. REVIEW: 110438
This commit is contained in:
parent
e5316fa9d9
commit
76d96506dc
4 changed files with 6 additions and 9 deletions
|
@ -1026,12 +1026,9 @@ void Toplevel::addDamageFull()
|
|||
emit damaged(this, rect());
|
||||
}
|
||||
|
||||
void Toplevel::resetDamage(const QRect& r)
|
||||
void Toplevel::resetDamage()
|
||||
{
|
||||
damage_region -= r;
|
||||
int damageArea = 0;
|
||||
foreach (const QRect &r2, damage_region.rects())
|
||||
damageArea += r2.width()*r2.height();
|
||||
damage_region = QRegion();
|
||||
}
|
||||
|
||||
void Toplevel::addRepaint(const QRect& r)
|
||||
|
|
|
@ -921,7 +921,7 @@ bool SceneOpenGL::Window::bindTexture()
|
|||
if (!toplevel->damage().isEmpty()) {
|
||||
// mipmaps need to be updated
|
||||
texture->setDirty();
|
||||
toplevel->resetDamage(QRect(toplevel->clientPos(), toplevel->clientSize()));
|
||||
toplevel->resetDamage();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -934,7 +934,7 @@ bool SceneOpenGL::Window::bindTexture()
|
|||
toplevel->damage());
|
||||
|
||||
if (success)
|
||||
toplevel->resetDamage(QRect(toplevel->clientPos(), toplevel->clientSize()));
|
||||
toplevel->resetDamage();
|
||||
else
|
||||
kDebug(1212) << "Failed to bind window";
|
||||
return success;
|
||||
|
|
|
@ -329,7 +329,7 @@ xcb_render_picture_t SceneXrender::Window::picture()
|
|||
return XCB_RENDER_PICTURE_NONE;
|
||||
_picture = xcb_generate_id(connection());
|
||||
xcb_render_create_picture(connection(), _picture, pix, format, 0, NULL);
|
||||
toplevel->resetDamage(toplevel->rect());
|
||||
toplevel->resetDamage();
|
||||
}
|
||||
return _picture;
|
||||
}
|
||||
|
|
|
@ -252,7 +252,7 @@ public:
|
|||
QRegion repaints() const;
|
||||
void resetRepaints();
|
||||
QRegion damage() const;
|
||||
void resetDamage(const QRect& r);
|
||||
void resetDamage();
|
||||
EffectWindowImpl* effectWindow();
|
||||
const EffectWindowImpl* effectWindow() const;
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue