summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-04-21 08:41:15 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-04-22 14:33:03 (GMT)
commit71d6e5a73b6e4434c47194d938a8b74c92170644 (patch)
tree40d48131a550c5dac3e0014aa57d656d33c10a7c
parent4cb45486f952f5d9df7a2d954073bdbc5c5ee893 (diff)
downloadQt-71d6e5a73b6e4434c47194d938a8b74c92170644.zip
Qt-71d6e5a73b6e4434c47194d938a8b74c92170644.tar.gz
Qt-71d6e5a73b6e4434c47194d938a8b74c92170644.tar.bz2
QX11GL: Don't do glFinish in endPaint
It's better to defer the synchronisation to just before the point it is actually needed. When used as a window surface, this is in flush and scroll. If the QX11GLPixmapData is used as the defaut backend for QPixmaps, it might need to be put back into endPaint. However, the GL driver will hopefully make sure rendering to the pixmap is complete before binding it as a texture via texture-from-pixmap. Also, it's probably better to use eglWaitClient rather than glFinish for synchronisation as it is potentially slightly more optimal. Reviewed-By: TrustMe
-rw-r--r--src/opengl/qpixmapdata_x11gl_egl.cpp6
-rw-r--r--src/opengl/qpixmapdata_x11gl_p.h1
2 files changed, 0 insertions, 7 deletions
diff --git a/src/opengl/qpixmapdata_x11gl_egl.cpp b/src/opengl/qpixmapdata_x11gl_egl.cpp
index 4d726b6..3b11749 100644
--- a/src/opengl/qpixmapdata_x11gl_egl.cpp
+++ b/src/opengl/qpixmapdata_x11gl_egl.cpp
@@ -336,12 +336,6 @@ void QX11GLPixmapData::beginPaint()
QGLPaintDevice::beginPaint();
}
-void QX11GLPixmapData::endPaint()
-{
- glFinish();
- QGLPaintDevice::endPaint();
-}
-
QGLContext* QX11GLPixmapData::context() const
{
return ctx;
diff --git a/src/opengl/qpixmapdata_x11gl_p.h b/src/opengl/qpixmapdata_x11gl_p.h
index 8681336..b613eba 100644
--- a/src/opengl/qpixmapdata_x11gl_p.h
+++ b/src/opengl/qpixmapdata_x11gl_p.h
@@ -79,7 +79,6 @@ public:
// Re-implemented from QGLPaintDevice
QPaintEngine* paintEngine() const; // Also re-implements QX11PixmapData::paintEngine
void beginPaint();
- void endPaint();
QGLContext* context() const;
QSize size() const;