summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoaview_mac.mm
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2011-05-18 14:17:17 (GMT)
committerFabien Freling <fabien.freling@nokia.com>2011-05-18 14:33:26 (GMT)
commit44e1526ee2585c0402c284aa94eb2472fa4a4145 (patch)
tree7967d6012eca9579a574660b2d407ab73770e429 /src/gui/kernel/qcocoaview_mac.mm
parent0aa9b30432cec3b7f366983f451fc9a7f8f83243 (diff)
downloadQt-44e1526ee2585c0402c284aa94eb2472fa4a4145.zip
Qt-44e1526ee2585c0402c284aa94eb2472fa4a4145.tar.gz
Qt-44e1526ee2585c0402c284aa94eb2472fa4a4145.tar.bz2
Change the flushing of the CGContext to a synchronization.
When many NSView are being drawn, calling CGContextFlush() is too expensive and some flickering becomes apparent. We now call CGContextSynchronize() instead. Since this solves the flickering problem, we can now call setNeedsDisplay: for items in the unified toolbar. This allows us to smootly trigger many flushings inside the unified toolbar. Task-number: QTBUG-19267 Reviewed-by: Jiang Jiang
Diffstat (limited to 'src/gui/kernel/qcocoaview_mac.mm')
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index b5e5d18..578970c 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -320,7 +320,7 @@ static int qCocoaViewCount = 0;
}
- CGContextFlush(context);
+ CGContextSynchronize(context);
qt_mac_release_graphics_context(context);
return;
}