diff options
author | Fabien Freling <fabien.freling@nokia.com> | 2011-01-25 14:23:34 (GMT) |
---|---|---|
committer | Fabien Freling <fabien.freling@nokia.com> | 2011-01-26 11:25:48 (GMT) |
commit | 26d25ab46900d84b44e451c2a0a986bfed94a3f4 (patch) | |
tree | bbc66fa6f2d1c4f0126663efbadbaddc1020b686 /src/gui/painting/qunifiedtoolbarsurface_mac_p.h | |
parent | 85b8631c2f30947e3c8364c903a4f85abb8f11e2 (diff) | |
download | Qt-26d25ab46900d84b44e451c2a0a986bfed94a3f4.zip Qt-26d25ab46900d84b44e451c2a0a986bfed94a3f4.tar.gz Qt-26d25ab46900d84b44e451c2a0a986bfed94a3f4.tar.bz2 |
Move the flushing to [view drawRect:rect]
Instead of flushing by grabbing the Core Graphics
context, we do it directly in the drawRect:
method.
This approach allows us to call flush() many times
and only proceed to flush when the system is
ready.
Reviewed-by: Richard Moe Gustavsen
Diffstat (limited to 'src/gui/painting/qunifiedtoolbarsurface_mac_p.h')
-rw-r--r-- | src/gui/painting/qunifiedtoolbarsurface_mac_p.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/painting/qunifiedtoolbarsurface_mac_p.h b/src/gui/painting/qunifiedtoolbarsurface_mac_p.h index 3bc0404..6e40a17 100644 --- a/src/gui/painting/qunifiedtoolbarsurface_mac_p.h +++ b/src/gui/painting/qunifiedtoolbarsurface_mac_p.h @@ -82,10 +82,13 @@ public: void setGeometry(const QRect &rect); void beginPaint(const QRegion &rgn); void insertToolbar(QWidget *toolbar, const QPoint &offset); + void updateRedirection(QWidget *widget); + void updateToolbarOffset(QWidget *widget); -private: QPaintDevice *paintDevice(); - void updateToolbarOffset(QWidget *widget); + CGContextRef imageContext(); + +private: void prepareBuffer(QImage::Format format, QWidget *widget); void recursiveRedirect(QObject *widget, const QPoint &offset); |