Title: [137685] trunk/Source/WebKit2
Revision
137685
Author
[email protected]
Date
2012-12-13 16:42:34 -0800 (Thu, 13 Dec 2012)

Log Message

Coordinated Graphics: Reorder messages to CoordinatedLayerTreeHostProxy
https://bugs.webkit.org/show_bug.cgi?id=103843

Patch by Huang Dongsung <[email protected]> on 2012-12-13
Reviewed by Noam Rosenthal.

Clarify LayerTreeRenderer::setRootLayerID() can be called only once during its
lifecycle. LayerTreeRenderer, CoordinatedLayerTreeHost and CoordinatedLayerTreeHostProxy
have the same lifecycle to WebPage and the root layer is reused even if loading
new page, so it is impossible to call LayerTreeRenderer::setRootLayerID() more
than twice.

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::setRootLayerID):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (137684 => 137685)


--- trunk/Source/WebKit2/ChangeLog	2012-12-14 00:42:31 UTC (rev 137684)
+++ trunk/Source/WebKit2/ChangeLog	2012-12-14 00:42:34 UTC (rev 137685)
@@ -1,3 +1,19 @@
+2012-12-13  Huang Dongsung  <[email protected]>
+
+        Coordinated Graphics: Reorder messages to CoordinatedLayerTreeHostProxy
+        https://bugs.webkit.org/show_bug.cgi?id=103843
+
+        Reviewed by Noam Rosenthal.
+
+        Clarify LayerTreeRenderer::setRootLayerID() can be called only once during its
+        lifecycle. LayerTreeRenderer, CoordinatedLayerTreeHost and CoordinatedLayerTreeHostProxy
+        have the same lifecycle to WebPage and the root layer is reused even if loading
+        new page, so it is impossible to call LayerTreeRenderer::setRootLayerID() more
+        than twice.
+
+        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
+        (WebKit::LayerTreeRenderer::setRootLayerID):
+
 2012-12-13  Alexey Proskuryakov  <[email protected]>
 
         <rdar://problem/12838354> DOM cookie access functions should respect private browsing

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp (137684 => 137685)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp	2012-12-14 00:42:31 UTC (rev 137684)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp	2012-12-14 00:42:34 UTC (rev 137685)
@@ -392,16 +392,12 @@
 
 void LayerTreeRenderer::setRootLayerID(CoordinatedLayerID layerID)
 {
-    if (layerID == m_rootLayerID)
-        return;
+    ASSERT(layerID != InvalidCoordinatedLayerID);
+    ASSERT(m_rootLayerID == InvalidCoordinatedLayerID);
 
     m_rootLayerID = layerID;
-
     m_rootLayer->removeAllChildren();
 
-    if (!layerID)
-        return;
-
     GraphicsLayer* layer = ensureLayer(layerID);
     m_rootLayer->addChild(layer);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to