summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qwindowsurface_raster_p.h
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-02-03 16:06:15 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-02-03 17:01:58 (GMT)
commit30dee4f433d2426ce2dc0bccda8e62683380a1c4 (patch)
treeb19ee21df2a11dd6463ac93393eec359fa5eae32 /src/gui/painting/qwindowsurface_raster_p.h
parent68f78ba6be29b839433d924b5dc348d6d94b3d43 (diff)
downloadQt-30dee4f433d2426ce2dc0bccda8e62683380a1c4.zip
Qt-30dee4f433d2426ce2dc0bccda8e62683380a1c4.tar.gz
Qt-30dee4f433d2426ce2dc0bccda8e62683380a1c4.tar.bz2
Improve performance of partial updates in raster window surface on X11.
An XSync is needed to prevent the raster engine from writing to the shared memory raster backbuffer at the same time the X server reads from it. However, instead of doing the sync right after telling X to blit, we can do it right before we start writing to it with raster. At this point there will on average be less processing heavy X commands in the command queue, and we thus spend less time blocking the GUI thread. Measured frame rate improvement of 20 - 60 % in an update stress testing the performance of partial updates. Idea-from: Olivier Goffart Reviewed-by: Bjørn Erik Nilsen
Diffstat (limited to 'src/gui/painting/qwindowsurface_raster_p.h')
-rw-r--r--src/gui/painting/qwindowsurface_raster_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/painting/qwindowsurface_raster_p.h b/src/gui/painting/qwindowsurface_raster_p.h
index b6e61e1..903810b 100644
--- a/src/gui/painting/qwindowsurface_raster_p.h
+++ b/src/gui/painting/qwindowsurface_raster_p.h
@@ -107,6 +107,9 @@ public:
bool scroll(const QRegion &area, int dx, int dy);
private:
+#if defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
+ void syncX();
+#endif
void prepareBuffer(QImage::Format format, QWidget *widget);
Q_DECLARE_PRIVATE(QRasterWindowSurface)
QScopedPointer<QRasterWindowSurfacePrivate> d_ptr;