summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoabackingstore.h
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-10-28 11:41:34 +0100
committerTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-10-28 13:32:02 +0100
commit916dfcb8275bcce6b39606cd0b930239a60dc5df (patch)
tree1e079bf0eff8a42072f9727ec91cc4b4e83f7992 /src/plugins/platforms/cocoa/qcocoabackingstore.h
parent148aa0e3e35f9bdf3e68fdf2c9cc509d2e093275 (diff)
OS X - Cocoa backing store and drawRect
m_backingStore pointer has a limited 'lifetime' - usually it is set in -flushBackingStore:region:offset: method, then -drawRect: is invoked/forced by -setNeedsDisplayInRect:, after that it's dangerous to have a non-null pointer to a backing store (and we reset it). But if Cocoa invokes drawRect (due to some reason) our null backing store pointer is also not good. This patch instead is using a shared resource (QImage) from a backing store. This patch also makes getBackingStoreCGImage() redundant - -drawRect: was the only place we called it. Task-number: QTBUG-42206 Change-Id: Ie7726336f05d07c52f660f6326ae5cef114201dd Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoabackingstore.h')
-rw-r--r--src/plugins/platforms/cocoa/qcocoabackingstore.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.h b/src/plugins/platforms/cocoa/qcocoabackingstore.h
index bfff5c3266..917f020132 100644
--- a/src/plugins/platforms/cocoa/qcocoabackingstore.h
+++ b/src/plugins/platforms/cocoa/qcocoabackingstore.h
@@ -51,12 +51,9 @@ public:
QPaintDevice *paintDevice();
void flush(QWindow *widget, const QRegion &region, const QPoint &offset);
-#ifndef QT_NO_OPENGL
- QImage toImage() const Q_DECL_OVERRIDE;
-#endif
+ QImage toImage() const;
void resize (const QSize &size, const QRegion &);
bool scroll(const QRegion &area, int dx, int dy);
- CGImageRef getBackingStoreCGImage();
qreal getBackingStoreDevicePixelRatio();
private: