Unreviewed, rolling out r136788.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Dec 2012 14:56:26 +0000 (14:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Dec 2012 14:56:26 +0000 (14:56 +0000)
http://trac.webkit.org/changeset/136788
https://bugs.webkit.org/show_bug.cgi?id=104260

Asserts on EFL WebKit2 Debug bot (Requested by yael on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-06

* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::setLayerState):
(WebKit::LayerTreeRenderer::setRootLayerID):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
(WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h

index d5263eb..db60329 100644 (file)
@@ -1,5 +1,23 @@
 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
 
+        Unreviewed, rolling out r136788.
+        http://trac.webkit.org/changeset/136788
+        https://bugs.webkit.org/show_bug.cgi?id=104260
+
+        Asserts on EFL WebKit2 Debug bot (Requested by yael on
+        #webkit).
+
+        * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
+        (WebKit::LayerTreeRenderer::setLayerState):
+        (WebKit::LayerTreeRenderer::setRootLayerID):
+        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
+        (WebKit::LayerTreeCoordinator::LayerTreeCoordinator):
+        (WebKit::LayerTreeCoordinator::flushPendingLayerChanges):
+        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
+        (LayerTreeCoordinator):
+
+2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
+
         Unreviewed, rolling out r136795.
         http://trac.webkit.org/changeset/136795
         https://bugs.webkit.org/show_bug.cgi?id=104257
index f3d729b..c672822 100644 (file)
@@ -328,7 +328,6 @@ void LayerTreeRenderer::removeCustomFilterProgram(int id)
 
 void LayerTreeRenderer::setLayerState(WebLayerID id, const WebLayerInfo& layerInfo)
 {
-    ASSERT(m_rootLayerID != InvalidWebLayerID);
     GraphicsLayer* layer = ensureLayer(id);
 
     layer->setReplicatedByLayer(layerByID(layerInfo.replica));
@@ -359,6 +358,8 @@ void LayerTreeRenderer::setLayerState(WebLayerID id, const WebLayerInfo& layerIn
     layer->setMasksToBounds(layerInfo.isRootLayer ? false : layerInfo.masksToBounds);
     layer->setOpacity(layerInfo.opacity);
     layer->setPreserves3D(layerInfo.preserves3D);
+    if (layerInfo.isRootLayer && m_rootLayerID != id)
+        setRootLayerID(id);
 }
 
 void LayerTreeRenderer::deleteLayer(WebLayerID layerID)
@@ -401,7 +402,10 @@ void LayerTreeRenderer::setRootLayerID(WebLayerID layerID)
     if (!layerID)
         return;
 
-    GraphicsLayer* layer = ensureLayer(layerID);
+    GraphicsLayer* layer = layerByID(layerID);
+    if (!layer)
+        return;
+
     m_rootLayer->addChild(layer);
 }
 
index 503fd01..abc2c0f 100644 (file)
@@ -90,6 +90,7 @@ LayerTreeCoordinator::LayerTreeCoordinator(WebPage* webPage)
     , m_contentsScale(1)
     , m_shouldSendScrollPositionUpdate(true)
     , m_shouldSyncFrame(false)
+    , m_shouldSyncRootLayer(true)
     , m_layerFlushTimer(this, &LayerTreeCoordinator::layerFlushTimerFired)
     , m_releaseInactiveAtlasesTimer(this, &LayerTreeCoordinator::releaseInactiveAtlasesTimerFired)
     , m_layerFlushSchedulingEnabled(true)
@@ -119,16 +120,9 @@ LayerTreeCoordinator::LayerTreeCoordinator(WebPage* webPage)
     if (m_webPage->hasPageOverlay())
         createPageOverlayLayer();
 
-    initializeRootCompositingLayer();
     scheduleLayerFlush();
 }
 
-void LayerTreeCoordinator::initializeRootCompositingLayer()
-{
-    m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetRootCompositingLayer(toCoordinatedGraphicsLayer(m_rootLayer.get())->id()));
-    m_shouldSyncFrame = true;
-}
-
 void LayerTreeCoordinator::setLayerFlushSchedulingEnabled(bool layerFlushingEnabled)
 {
     if (m_layerFlushSchedulingEnabled == layerFlushingEnabled)
@@ -283,6 +277,12 @@ bool LayerTreeCoordinator::flushPendingLayerChanges()
 
     flushPendingImageBackingChanges();
 
+    if (m_shouldSyncRootLayer) {
+        m_webPage->send(Messages::LayerTreeCoordinatorProxy::SetRootCompositingLayer(toCoordinatedGraphicsLayer(m_rootLayer.get())->id()));
+        m_shouldSyncRootLayer = false;
+        m_shouldSyncFrame = true;
+    }
+
     for (size_t i = 0; i < m_detachedLayers.size(); ++i)
         m_webPage->send(Messages::LayerTreeCoordinatorProxy::DeleteCompositingLayer(m_detachedLayers[i]));
     m_detachedLayers.clear();
index e09fe3a..4d29523 100644 (file)
@@ -135,7 +135,6 @@ private:
     virtual PassOwnPtr<WebCore::GraphicsLayer> createGraphicsLayer(WebCore::GraphicsLayerClient*) OVERRIDE;
 
     // LayerTreeCoordinator
-    void initializeRootCompositingLayer();
     void createPageOverlayLayer();
     void destroyPageOverlayLayer();
     bool flushPendingLayerChanges();
@@ -194,6 +193,7 @@ private:
 
     LayerTreeContext m_layerTreeContext;
     bool m_shouldSyncFrame;
+    bool m_shouldSyncRootLayer;
     WebCore::Timer<LayerTreeCoordinator> m_layerFlushTimer;
     WebCore::Timer<LayerTreeCoordinator> m_releaseInactiveAtlasesTimer;
     bool m_layerFlushSchedulingEnabled;