Title: [113326] trunk/Source/WebCore
Revision
113326
Author
[email protected]
Date
2012-04-05 09:10:40 -0700 (Thu, 05 Apr 2012)

Log Message

[BlackBerry] Disable paintingGoesToWindow() for the root layer when forced compositing mode is active
https://bugs.webkit.org/show_bug.cgi?id=83127

Patch by Arvid Nilsson <[email protected]> on 2012-04-05
Reviewed by Rob Buis.

RIM PR: 136381
The BlackBerry port will use accelerated compositing code path to
render the root layer in some situations.

The plan is to do this by activating the "force compositing mode"
setting, but that in itself doesn't get us all the way, since painting
will still go to window for the root layer.

Fixed by adding a special clause in
RenderLayerBacking::paintingGoesToWindow() for PLATFORM(BLACKBERRY).

No new tests, this is currently not testable with the BlackBerry WebKit
testing infrastructure.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintingGoesToWindow):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):
(WebCore::RenderLayerCompositor::inForcedCompositingMode): Added.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (113325 => 113326)


--- trunk/Source/WebCore/ChangeLog	2012-04-05 15:57:12 UTC (rev 113325)
+++ trunk/Source/WebCore/ChangeLog	2012-04-05 16:10:40 UTC (rev 113326)
@@ -1,3 +1,30 @@
+2012-04-05  Arvid Nilsson  <[email protected]>
+
+        [BlackBerry] Disable paintingGoesToWindow() for the root layer when forced compositing mode is active
+        https://bugs.webkit.org/show_bug.cgi?id=83127
+
+        Reviewed by Rob Buis.
+
+        RIM PR: 136381
+        The BlackBerry port will use accelerated compositing code path to
+        render the root layer in some situations.
+
+        The plan is to do this by activating the "force compositing mode"
+        setting, but that in itself doesn't get us all the way, since painting
+        will still go to window for the root layer.
+
+        Fixed by adding a special clause in
+        RenderLayerBacking::paintingGoesToWindow() for PLATFORM(BLACKBERRY).
+
+        No new tests, this is currently not testable with the BlackBerry WebKit
+        testing infrastructure.
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::paintingGoesToWindow):
+        * rendering/RenderLayerCompositor.h:
+        (RenderLayerCompositor):
+        (WebCore::RenderLayerCompositor::inForcedCompositingMode): Added.
+
 2012-04-05  Stephen Chenney  <[email protected]>
 
         REGRESSION(99539): Infinite repaint loop with SVGImage and deferred repaint timers

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (113325 => 113326)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-04-05 15:57:12 UTC (rev 113325)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2012-04-05 16:10:40 UTC (rev 113326)
@@ -1077,8 +1077,14 @@
     if (m_usingTiledCacheLayer)
         return false;
 
-    if (m_owningLayer->isRootLayer())
+    if (m_owningLayer->isRootLayer()) {
+#if PLATFORM(BLACKBERRY)
+        if (compositor()->inForcedCompositingMode())
+            return false;
+#endif
+
         return compositor()->rootLayerAttachment() != RenderLayerCompositor::RootLayerAttachedViaEnclosingFrame;
+    }
     
     return false;
 }

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (113325 => 113326)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h	2012-04-05 15:57:12 UTC (rev 113325)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h	2012-04-05 16:10:40 UTC (rev 113326)
@@ -66,7 +66,9 @@
     // This will make a compositing layer at the root automatically, and hook up to
     // the native view/window system.
     void enableCompositingMode(bool enable = true);
-    
+
+    bool inForcedCompositingMode() const { return m_forceCompositingMode; }
+
     // Returns true if the accelerated compositing is enabled
     bool hasAcceleratedCompositing() const { return m_hasAcceleratedCompositing; }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to