[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

simon.fraser at apple.com simon.fraser at apple.com
Sun Feb 20 22:59:18 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 73e897ba08ca714f8c7fd7ea13ae587c019ec581
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 14 23:45:17 2011 +0000

    2011-01-14  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Adam Roben.
    
            Layer syncing should go through the compositor
            https://bugs.webkit.org/show_bug.cgi?id=52486
    
            Rather than have FrameView go directly to GraphicsLayer to
            sync pending changes, route the call through RenderLayerCompositor.
    
            Add a FIXME about an existing issue with flushing and subframes.
    
            No behavior change, so no tests.
    
            * page/FrameView.cpp:
            (WebCore::FrameView::syncCompositingStateForThisFrame):
            * rendering/RenderLayerBacking.cpp:
            (WebCore::RenderLayerBacking::notifySyncRequired):
            * rendering/RenderLayerCompositor.cpp:
            (WebCore::RenderLayerCompositor::scheduleLayerFlush):
            (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
            * rendering/RenderLayerCompositor.h:
            (WebCore::RenderLayerCompositor::notifySyncRequired):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75832 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index f861555..cad8d21 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2011-01-14  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Adam Roben.
+
+        Layer syncing should go through the compositor
+        https://bugs.webkit.org/show_bug.cgi?id=52486
+
+        Rather than have FrameView go directly to GraphicsLayer to
+        sync pending changes, route the call through RenderLayerCompositor.
+        
+        Add a FIXME about an existing issue with flushing and subframes.
+        
+        No behavior change, so no tests.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::syncCompositingStateForThisFrame):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::notifySyncRequired):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::scheduleLayerFlush):
+        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
+        * rendering/RenderLayerCompositor.h:
+        (WebCore::RenderLayerCompositor::notifySyncRequired):
+
 2011-01-14  Abhishek Arya  <inferno at chromium.org>
 
         Reviewed by David Hyatt.
diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp
index 2c42ab4..1187318 100644
--- a/Source/WebCore/page/FrameView.cpp
+++ b/Source/WebCore/page/FrameView.cpp
@@ -556,12 +556,8 @@ void FrameView::updateCompositingLayers()
 
 void FrameView::syncCompositingStateForThisFrame()
 {
-    RenderView* view = m_frame->contentRenderer();
-    GraphicsLayer* rootLayer = view ? view->compositor()->rootPlatformLayer() : 0;
-    if (!rootLayer)
-        return;
-
-    rootLayer->syncCompositingState();
+    if (RenderView* view = m_frame->contentRenderer())
+        view->compositor()->flushPendingLayerChanges();
 
 #if ENABLE(FULLSCREEN_API)
     // The fullScreenRenderer's graphicsLayer  has been re-parented, and the above recursive syncCompositingState
diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp
index e4b2f45..a6ed20f 100644
--- a/Source/WebCore/rendering/RenderLayerBacking.cpp
+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp
@@ -1264,7 +1264,7 @@ void RenderLayerBacking::notifyAnimationStarted(const GraphicsLayer*, double tim
 void RenderLayerBacking::notifySyncRequired(const GraphicsLayer*)
 {
     if (!renderer()->documentBeingDestroyed())
-        compositor()->scheduleSync();
+        compositor()->scheduleLayerFlush();
 }
 
 // This is used for the 'freeze' API, for testing only.
diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp
index 931008d..2155b35 100644
--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp
@@ -170,7 +170,7 @@ void RenderLayerCompositor::setCompositingLayersNeedRebuild(bool needRebuild)
         m_compositingLayersNeedRebuild = needRebuild;
 }
 
-void RenderLayerCompositor::scheduleSync()
+void RenderLayerCompositor::scheduleLayerFlush()
 {
     Frame* frame = m_renderView->frameView()->frame();
     Page* page = frame ? frame->page() : 0;
@@ -180,6 +180,16 @@ void RenderLayerCompositor::scheduleSync()
     page->chrome()->client()->scheduleCompositingLayerSync();
 }
 
+void RenderLayerCompositor::flushPendingLayerChanges()
+{
+    // FIXME: FrameView::syncCompositingStateRecursive() calls this for each
+    // frame, so when compositing layers are connected between frames, we'll
+    // end up syncing subframe's layers multiple times.
+    // https://bugs.webkit.org/show_bug.cgi?id=52489
+    if (GraphicsLayer* rootLayer = rootPlatformLayer())
+        rootLayer->syncCompositingState();
+}
+
 void RenderLayerCompositor::scheduleCompositingLayerUpdate()
 {
     if (!m_updateCompositingLayersTimer.isActive())
diff --git a/Source/WebCore/rendering/RenderLayerCompositor.h b/Source/WebCore/rendering/RenderLayerCompositor.h
index 49759b5..fc36dca 100644
--- a/Source/WebCore/rendering/RenderLayerCompositor.h
+++ b/Source/WebCore/rendering/RenderLayerCompositor.h
@@ -84,7 +84,10 @@ public:
     void setCompositingConsultsOverlap(bool b) { m_compositingConsultsOverlap = b; }
     bool compositingConsultsOverlap() const { return m_compositingConsultsOverlap; }
     
-    void scheduleSync();
+    // GraphicsLayers buffer state, which gets pushed to the underlying platform layers
+    // at specific times.
+    void scheduleLayerFlush();
+    void flushPendingLayerChanges();
     
     // Rebuild the tree of compositing layers
     void updateCompositingLayers(CompositingUpdateType = CompositingUpdateAfterLayoutOrStyleChange, RenderLayer* updateRoot = 0);
@@ -179,7 +182,7 @@ public:
 private:
     // GraphicsLayerClient Implementation
     virtual void notifyAnimationStarted(const GraphicsLayer*, double) { }
-    virtual void notifySyncRequired(const GraphicsLayer*) { scheduleSync(); }
+    virtual void notifySyncRequired(const GraphicsLayer*) { scheduleLayerFlush(); }
     virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&) { }
 
     // These calls return false always. They are saying that the layers associated with this client

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list