Rename Item::scheduleRepaint()

One can think that Item::scheduleRepaint() will trigger repaint of the
whole item, but it actually only schedules the next frame. If nothing
has changed on the screen, no real painting will be done unless maybe if
the rendering backend needs to repair the back buffer.
This commit is contained in:
Vlad Zahorodnii 2021-05-19 09:35:42 +03:00
parent e4ec955d88
commit 39e2387f9f
4 changed files with 4 additions and 4 deletions

View file

@ -364,7 +364,7 @@ void Item::scheduleRepaint(const QRegion &region)
}
}
void Item::scheduleRepaint()
void Item::scheduleFrame()
{
if (kwinApp()->platform()->isPerScreenRenderingEnabled()) {
const QRect geometry = mapToGlobal(rect());

View file

@ -92,7 +92,7 @@ public:
void stackChildren(const QList<Item *> &children);
void scheduleRepaint(const QRegion &region);
void scheduleRepaint();
void scheduleFrame();
QRegion repaints(int screen) const;
void resetRepaints(int screen);

View file

@ -90,7 +90,7 @@ void SurfaceItemWayland::handleSurfaceSizeChanged()
void SurfaceItemWayland::handleSurfaceCommitted()
{
if (m_surface->hasFrameCallbacks()) {
scheduleRepaint();
scheduleFrame();
}
}

View file

@ -37,7 +37,7 @@ SurfaceItemX11::~SurfaceItemX11()
void SurfaceItemX11::processDamage()
{
m_isDamaged = true;
scheduleRepaint();
scheduleFrame();
}
bool SurfaceItemX11::fetchDamage()