summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qnsview.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2016-09-08 23:08:29 +0200
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2016-09-18 14:33:04 +0000
commit2d2d90781abdcdbd2a98201877563c83d926dd1a (patch)
treeb3815b25635c1f2031c91edf1e2dc7b6b776be4d /src/plugins/platforms/cocoa/qnsview.mm
parent41ab34d9e8b30190dc5aef672625902611663ce5 (diff)
macOS: Implement QCocoaBackingStore in terms of QRasterBackingStore
The previous detection of device pixel ratio changes in paintDevice() is not needed, as QBackingStore::beginPaint() already does this check and calls resize(). Change-Id: I9ee8410fa3a5404c5ec19d2cba4543a9e3359fe9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnsview.mm')
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index 3d30aca7e7..22a32c7ceb 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -495,7 +495,7 @@ static bool _q_dontOverrideCtrlLMB = false;
qCDebug(lcQpaCocoaWindow) << "[QNSView flushBackingStore:]" << m_window << region.rectCount() << region.boundingRect() << offset;
m_backingStore = backingStore;
- m_backingStoreOffset = offset * m_backingStore->getBackingStoreDevicePixelRatio();
+ m_backingStoreOffset = offset * m_backingStore->paintDevice()->devicePixelRatio();
for (const QRect &rect : region)
[self setNeedsDisplayInRect:NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height())];
}
@@ -577,7 +577,7 @@ static bool _q_dontOverrideCtrlLMB = false;
// The backing store source rect will be larger on retina displays.
// Scale dirtyRect by the device pixel ratio:
- const qreal devicePixelRatio = m_backingStore->getBackingStoreDevicePixelRatio();
+ const qreal devicePixelRatio = m_backingStore->paintDevice()->devicePixelRatio();
CGRect dirtyBackingRect = CGRectMake(dirtyRect.origin.x * devicePixelRatio,
dirtyRect.origin.y * devicePixelRatio,
dirtyRect.size.width * devicePixelRatio,