Title: [243505] trunk/Source/WebKit
Revision
243505
Author
commit-qu...@webkit.org
Date
2019-03-26 10:57:58 -0700 (Tue, 26 Mar 2019)

Log Message

Assertion failure !isInAcceleratedCompositingMode() in DrawingAreaProxyCoordinatedGraphics::incorporateUpdate when forceCompositingMode is turned on
https://bugs.webkit.org/show_bug.cgi?id=195879

Patch by Tomoki Imai <tomoki.i...@sony.com> on 2019-03-26
Reviewed by Carlos Garcia Campos.

The root cause is that DrawingAreaProxyCoordinatedGraphics::isInAcceleratedCompositingMode checks both of alwaysUseCompositing() and !m_layerTreeContext.isEmpty().
alwaysUseCompositing() refers preferences, which is written by the application (UIProcess).
On the other hand, m_layerTreeContext is changed when it receives enterAcceleratedCompositingMode/exitAcceleratedCompositingMode from WebProcess.

It results when we set forceCompositingMode and acceleratedCompositingEnabled to true, WebProcess and UIProcess is out of sync until WebProcess sends enterAcceleratedCompositingMode message.
In such situation, WebProcess sends incorporateUpdate to UIProcess because WebProcess is in non-AC mode, but isInAcceleratedCompositingMode becomes true in UIProcess side.

* UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
(WebKit::DrawingAreaProxyCoordinatedGraphics::~DrawingAreaProxyCoordinatedGraphics): Should call exitAcceleratedCompositingMode even when alwaysUseCompositing is true.
(WebKit::DrawingAreaProxyCoordinatedGraphics::enterAcceleratedCompositingMode): enterAcceleratedCompositingMode should check enterAcceleratedCompositingMode is not called twice.
* UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h: Remove alwaysUseCompositing from isInAcceleratedCompositingMode

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (243504 => 243505)


--- trunk/Source/WebKit/ChangeLog	2019-03-26 17:29:54 UTC (rev 243504)
+++ trunk/Source/WebKit/ChangeLog	2019-03-26 17:57:58 UTC (rev 243505)
@@ -1,3 +1,22 @@
+2019-03-26  Tomoki Imai  <tomoki.i...@sony.com>
+
+        Assertion failure !isInAcceleratedCompositingMode() in DrawingAreaProxyCoordinatedGraphics::incorporateUpdate when forceCompositingMode is turned on
+        https://bugs.webkit.org/show_bug.cgi?id=195879
+
+        Reviewed by Carlos Garcia Campos.
+
+        The root cause is that DrawingAreaProxyCoordinatedGraphics::isInAcceleratedCompositingMode checks both of alwaysUseCompositing() and !m_layerTreeContext.isEmpty().
+        alwaysUseCompositing() refers preferences, which is written by the application (UIProcess).
+        On the other hand, m_layerTreeContext is changed when it receives enterAcceleratedCompositingMode/exitAcceleratedCompositingMode from WebProcess.
+
+        It results when we set forceCompositingMode and acceleratedCompositingEnabled to true, WebProcess and UIProcess is out of sync until WebProcess sends enterAcceleratedCompositingMode message.
+        In such situation, WebProcess sends incorporateUpdate to UIProcess because WebProcess is in non-AC mode, but isInAcceleratedCompositingMode becomes true in UIProcess side.
+
+        * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
+        (WebKit::DrawingAreaProxyCoordinatedGraphics::~DrawingAreaProxyCoordinatedGraphics): Should call exitAcceleratedCompositingMode even when alwaysUseCompositing is true.
+        (WebKit::DrawingAreaProxyCoordinatedGraphics::enterAcceleratedCompositingMode): enterAcceleratedCompositingMode should check enterAcceleratedCompositingMode is not called twice.
+        * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h: Remove alwaysUseCompositing from isInAcceleratedCompositingMode
+
 2019-03-26  Antoine Quint  <grao...@apple.com>
 
         Remove mousemoveEventHandlingPreventsDefault internal setting and quirk

Modified: trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp (243504 => 243505)


--- trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp	2019-03-26 17:29:54 UTC (rev 243504)
+++ trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp	2019-03-26 17:57:58 UTC (rev 243505)
@@ -67,7 +67,7 @@
 DrawingAreaProxyCoordinatedGraphics::~DrawingAreaProxyCoordinatedGraphics()
 {
     // Make sure to exit accelerated compositing mode.
-    if (isInAcceleratedCompositingMode() && !alwaysUseCompositing())
+    if (isInAcceleratedCompositingMode())
         exitAcceleratedCompositingMode();
 }
 
@@ -269,7 +269,7 @@
 
 void DrawingAreaProxyCoordinatedGraphics::enterAcceleratedCompositingMode(const LayerTreeContext& layerTreeContext)
 {
-    ASSERT(alwaysUseCompositing() || !isInAcceleratedCompositingMode());
+    ASSERT(!isInAcceleratedCompositingMode());
 #if !PLATFORM(WPE)
     m_backingStore = nullptr;
 #endif

Modified: trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h (243504 => 243505)


--- trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h	2019-03-26 17:29:54 UTC (rev 243504)
+++ trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h	2019-03-26 17:57:58 UTC (rev 243505)
@@ -47,7 +47,7 @@
     void paint(BackingStore::PlatformGraphicsContext, const WebCore::IntRect&, WebCore::Region& unpaintedRegion);
 #endif
 
-    bool isInAcceleratedCompositingMode() const { return alwaysUseCompositing() || !m_layerTreeContext.isEmpty(); }
+    bool isInAcceleratedCompositingMode() const { return !m_layerTreeContext.isEmpty(); }
 
 #if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     void setNativeSurfaceHandleForCompositing(uint64_t);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to