Title: [212347] releases/WebKitGTK/webkit-2.14/Source/WebCore
Revision
212347
Author
[email protected]
Date
2017-02-14 23:40:28 -0800 (Tue, 14 Feb 2017)

Log Message

Merge r212228 - [GTK] Non-accelerated drawing is broken with HiDPI
https://bugs.webkit.org/show_bug.cgi?id=168128

Reviewed by Michael Catanzaro.

When device scale factor changes, the page notifies the page overlay controller about it. Then overlay root
layers are created to be notified about the device scale factor. That causes us to enter in accelerated
compositing mode, because the graphics layer factory is called. But the render layer compositor doesn't really
enter in accelerated mode, because there aren't page overlays, the accelerated mode is not forced and the website
doesn't require acceleration either. This leaves our drawing area in an inconsistent state, it thinks it's in AC
mode because it has a layer tree host, but without a root layer attached, so nothing is rendered. The page
overlay controller doesn't need to create the layers when device scale factor changes, when an overlay is
installed, layers will be created with the current device scale factor anyway.

* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::didChangeDeviceScaleFactor): Return early if not initialized yet.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog (212346 => 212347)


--- releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog	2017-02-15 07:37:55 UTC (rev 212346)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog	2017-02-15 07:40:28 UTC (rev 212347)
@@ -1,3 +1,22 @@
+2017-02-13  Carlos Garcia Campos  <[email protected]>
+
+        [GTK] Non-accelerated drawing is broken with HiDPI
+        https://bugs.webkit.org/show_bug.cgi?id=168128
+
+        Reviewed by Michael Catanzaro.
+
+        When device scale factor changes, the page notifies the page overlay controller about it. Then overlay root
+        layers are created to be notified about the device scale factor. That causes us to enter in accelerated
+        compositing mode, because the graphics layer factory is called. But the render layer compositor doesn't really
+        enter in accelerated mode, because there aren't page overlays, the accelerated mode is not forced and the website
+        doesn't require acceleration either. This leaves our drawing area in an inconsistent state, it thinks it's in AC
+        mode because it has a layer tree host, but without a root layer attached, so nothing is rendered. The page
+        overlay controller doesn't need to create the layers when device scale factor changes, when an overlay is
+        installed, layers will be created with the current device scale factor anyway.
+
+        * page/PageOverlayController.cpp:
+        (WebCore::PageOverlayController::didChangeDeviceScaleFactor): Return early if not initialized yet.
+
 2017-02-09  Miguel Gomez  <[email protected]>
 
         [GTK] scroll with transparent background not repainted after scrollY >= 32768

Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/page/PageOverlayController.cpp (212346 => 212347)


--- releases/WebKitGTK/webkit-2.14/Source/WebCore/page/PageOverlayController.cpp	2017-02-15 07:37:55 UTC (rev 212346)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/page/PageOverlayController.cpp	2017-02-15 07:40:28 UTC (rev 212347)
@@ -241,7 +241,8 @@
 
 void PageOverlayController::didChangeDeviceScaleFactor()
 {
-    createRootLayersIfNeeded();
+    if (!m_initialized)
+        return;
 
     m_documentOverlayRootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
     m_viewOverlayRootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to