[Win][HiDPI] Scale factor is applied twice in accelerated compositing mode.
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Feb 2017 20:42:23 +0000 (20:42 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Feb 2017 20:42:23 +0000 (20:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=167732

Reviewed by Brent Fulgham.

Backing layer should not be scaled when CACFLayerSetContentsScale is used for scaling.

* WebView.cpp:
(WebView::setAcceleratedCompositing):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211584 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp

index 082910c..6398247 100644 (file)
@@ -1,3 +1,15 @@
+2017-02-02  Per Arne Vollan  <pvollan@apple.com>
+
+        [Win][HiDPI] Scale factor is applied twice in accelerated compositing mode.
+        https://bugs.webkit.org/show_bug.cgi?id=167732
+
+        Reviewed by Brent Fulgham.
+
+        Backing layer should not be scaled when CACFLayerSetContentsScale is used for scaling.
+
+        * WebView.cpp:
+        (WebView::setAcceleratedCompositing):
+
 2017-02-02  Chris Dumez  <cdumez@apple.com>
 
         [Crash] com.apple.WebKit.WebContent at WebKit: WebKit::WebPage::fromCorePage()
index 37bd3ea..96c97c9 100644 (file)
@@ -7173,10 +7173,12 @@ void WebView::setAcceleratedCompositing(bool accelerated)
             m_backingLayer->setNeedsDisplay();
             m_layerTreeHost->setRootChildLayer(PlatformCALayer::platformCALayer(m_backingLayer->platformLayer()));
 
+#if !HAVE(CACFLAYER_SETCONTENTSSCALE)
             TransformationMatrix m;
             m.scale(deviceScaleFactor());
             m_backingLayer->setAnchorPoint(FloatPoint3D());
             m_backingLayer->setTransform(m);
+#endif
 
             // We aren't going to be using our backing store while we're in accelerated compositing
             // mode. But don't delete it immediately, in case we switch out of accelerated