summaryrefslogtreecommitdiff
path: root/src/gui/painting
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2010-01-18 09:14:12 +0100
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-02-04 10:11:03 +0100
commit04e34fe3aecca482abeeabe2e31778e9102eeb08 (patch)
tree89a10ac1baa65306c26c61886397912755e00af3 /src/gui/painting
parent3e6b22f138ad5b592dedbca99f91fdf612f20cea (diff)
downloadqt4-tools-04e34fe3aecca482abeeabe2e31778e9102eeb08.tar.gz
Improve raster graphics system performance on Mac (second try).
This fixes the qmlviewer "sluggish animations and lost mouse events" issue by making sure we don't block and wait for for the screen refresh when flushing the backing store to the screen. NB: This commit fixes build issues found in f5f62c0bed. Review: msorvig Details: - Don't force repaints, flush the backingstore in response to a Cocoa paint/display events only. - Flush once per window. - Get the CGContext from the window (don't create a new one) - Don't call CGContextiFlush on the context.
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qwindowsurface_raster.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
index a0d2b9bd3a..eee6befe87 100644
--- a/src/gui/painting/qwindowsurface_raster.cpp
+++ b/src/gui/painting/qwindowsurface_raster.cpp
@@ -295,10 +295,8 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
CGContextRestoreGState(context);
#ifndef QT_MAC_USE_COCOA
QDEndCGContext(port, &context);
-#else
- CGContextFlush(context);
-#endif
#endif
+#endif // Q_WS_MAC
#ifdef Q_OS_SYMBIAN
Q_UNUSED(widget);