summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qnsview.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/qnsview.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/qnsview.h')
-rw-r--r--src/plugins/platforms/cocoa/qnsview.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h
index 8b23f84a25..8d8df13dc3 100644
--- a/src/plugins/platforms/cocoa/qnsview.h
+++ b/src/plugins/platforms/cocoa/qnsview.h
@@ -51,7 +51,8 @@ QT_END_NAMESPACE
Q_FORWARD_DECLARE_OBJC_CLASS(QNSViewMouseMoveHelper);
@interface QT_MANGLE_NAMESPACE(QNSView) : NSView <NSTextInputClient> {
- QCocoaBackingStore* m_backingStore;
+ QImage m_backingStore;
+ qreal m_pixelRatio;
QPoint m_backingStoreOffset;
CGImageRef m_maskImage;
uchar *m_maskData;