kwin: Rename flushBuffer() to present()

This function doesn't flush any buffered commands, it presents or posts
the color buffer to the surface to which the GL context is bound.
This commit is contained in:
Fredrik Höglund 2012-10-07 13:43:31 +02:00
parent 007733f14a
commit e578676f42
8 changed files with 11 additions and 11 deletions

View file

@ -187,7 +187,7 @@ bool EglOnXBackend::initBufferConfigs()
return true;
}
void EglOnXBackend::flushBuffer()
void EglOnXBackend::present()
{
if (lastMask() & Scene::PAINT_SCREEN_REGION && surfaceHasSubPost && eglPostSubBufferNV) {
const QRect damageRect = lastDamage().boundingRect();
@ -216,7 +216,7 @@ SceneOpenGL::TexturePrivate *EglOnXBackend::createBackendTexture(SceneOpenGL::Te
void EglOnXBackend::prepareRenderingFrame()
{
if (!lastDamage().isEmpty())
flushBuffer();
present();
startRenderTimer();
}

View file

@ -38,7 +38,7 @@ public:
virtual void endRenderingFrame(int mask, const QRegion &damage);
protected:
virtual void flushBuffer();
virtual void present();
private:
void init();

View file

@ -429,7 +429,7 @@ void GlxBackend::waitSync()
#undef VSYNC_DEBUG
void GlxBackend::flushBuffer()
void GlxBackend::present()
{
if (isDoubleBuffer()) {
if (lastMask() & Scene::PAINT_SCREEN_REGION) {
@ -535,7 +535,7 @@ SceneOpenGL::TexturePrivate *GlxBackend::createBackendTexture(SceneOpenGL::Textu
void GlxBackend::prepareRenderingFrame()
{
if (!lastDamage().isEmpty())
flushBuffer();
present();
glXWaitX();
}

View file

@ -48,7 +48,7 @@ public:
virtual void endRenderingFrame(int mask, const QRegion &damage);
protected:
virtual void flushBuffer();
virtual void present();
private:
void init();

View file

@ -133,7 +133,7 @@ void OpenGLBackend::setFailed(const QString &reason)
void OpenGLBackend::idle()
{
flushBuffer();
present();
}
/************************************************

View file

@ -453,7 +453,7 @@ protected:
/**
* @brief Backend specific flushing of frame to screen.
**/
virtual void flushBuffer() = 0;
virtual void present() = 0;
/**
* @brief Sets the backend initialization to failed.
*

View file

@ -189,14 +189,14 @@ int SceneXrender::paint(QRegion damage, ToplevelList toplevels)
if (m_overlayWindow->window()) // show the window only after the first pass, since
m_overlayWindow->show(); // that pass may take long
flushBuffer(mask, damage);
present(mask, damage);
// do cleanup
stacking_order.clear();
return renderTimer.elapsed();
}
void SceneXrender::flushBuffer(int mask, QRegion damage)
void SceneXrender::present(int mask, QRegion damage)
{
if (mask & PAINT_SCREEN_REGION) {
// Use the damage region as the clip region for the root window

View file

@ -61,7 +61,7 @@ public Q_SLOTS:
virtual void windowClosed(KWin::Toplevel* c, KWin::Deleted* deleted);
private:
void createBuffer();
void flushBuffer(int mask, QRegion damage);
void present(int mask, QRegion damage);
void initXRender(bool createOverlay);
XRenderPictFormat* format;
Picture front;