kwin: Don't call glFlush() unnecessarily in endRenderingFrame()
We should only call glFlush() here if we're deferring the posting of the back buffer to the next prepareRenderingFrame() call.
This commit is contained in:
parent
d5e439aae0
commit
12446c9b4c
2 changed files with 16 additions and 4 deletions
|
@ -338,9 +338,15 @@ void EglOnXBackend::prepareRenderingFrame()
|
||||||
void EglOnXBackend::endRenderingFrame(const QRegion &damage)
|
void EglOnXBackend::endRenderingFrame(const QRegion &damage)
|
||||||
{
|
{
|
||||||
setLastDamage(damage);
|
setLastDamage(damage);
|
||||||
glFlush();
|
|
||||||
if (!blocksForRetrace()) {
|
if (!blocksForRetrace()) {
|
||||||
present(); // this sets lastDamage emtpy and prevents execution from prepareRenderingFrame()
|
// This also sets lastDamage to empty which prevents the frame from
|
||||||
|
// being posted again when prepareRenderingFrame() is called.
|
||||||
|
present();
|
||||||
|
} else {
|
||||||
|
// Make sure that the GPU begins processing the command stream
|
||||||
|
// now and not the next time prepareRenderingFrame() is called.
|
||||||
|
glFlush();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (overlayWindow()->window()) // show the window only after the first pass,
|
if (overlayWindow()->window()) // show the window only after the first pass,
|
||||||
|
|
|
@ -511,9 +511,15 @@ void GlxBackend::prepareRenderingFrame()
|
||||||
void GlxBackend::endRenderingFrame(const QRegion &damage)
|
void GlxBackend::endRenderingFrame(const QRegion &damage)
|
||||||
{
|
{
|
||||||
setLastDamage(damage);
|
setLastDamage(damage);
|
||||||
glFlush();
|
|
||||||
if (!blocksForRetrace()) {
|
if (!blocksForRetrace()) {
|
||||||
present(); // this sets lastDamage emtpy and prevents execution from prepareRenderingFrame()
|
// This also sets lastDamage to empty which prevents the frame from
|
||||||
|
// being posted again when prepareRenderingFrame() is called.
|
||||||
|
present();
|
||||||
|
} else {
|
||||||
|
// Make sure that the GPU begins processing the command stream
|
||||||
|
// now and not the next time prepareRenderingFrame() is called.
|
||||||
|
glFlush();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (overlayWindow()->window()) // show the window only after the first pass,
|
if (overlayWindow()->window()) // show the window only after the first pass,
|
||||||
|
|
Loading…
Reference in a new issue