[iOS WK2] Tiled layer content missing on pages with animated tiled layers
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 May 2014 01:15:07 +0000 (01:15 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 May 2014 01:15:07 +0000 (01:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=132507
<rdar://problem/16765740>

Reviewed by Tim Horton.

Updating the tiling area of content TileControllers while
CSS animations are running depends on GraphicsLayerUpdater
triggering repeated layer flushes. With UI-side compositing, those
flushes were happening, but nothing triggered RemoteLayerTreeDrawingArea
to flush changes to the UI process.

Fix by having RenderLayerCompositor schedule a flush, rather
than just doing a flush, in response to GraphicsLayerUpdater.

Also change the name of the GraphicsLayerUpdaterClient function
to indicate that it suggests that a flush is required soon, rather than
that the flushing has to be synchronous.

* platform/graphics/GraphicsLayerUpdater.cpp:
(WebCore::GraphicsLayerUpdater::displayRefreshFired):
* platform/graphics/GraphicsLayerUpdater.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushLayersSoon):
(WebCore::RenderLayerCompositor::flushLayers): Deleted.
* rendering/RenderLayerCompositor.h:

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp
Source/WebCore/platform/graphics/GraphicsLayerUpdater.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h

index d5e5a92..c1e7b18 100644 (file)
@@ -1,3 +1,32 @@
+2014-05-02  Simon Fraser  <simon.fraser@apple.com>
+
+        [iOS WK2] Tiled layer content missing on pages with animated tiled layers
+        https://bugs.webkit.org/show_bug.cgi?id=132507
+        <rdar://problem/16765740>
+
+        Reviewed by Tim Horton.
+
+        Updating the tiling area of content TileControllers while
+        CSS animations are running depends on GraphicsLayerUpdater
+        triggering repeated layer flushes. With UI-side compositing, those
+        flushes were happening, but nothing triggered RemoteLayerTreeDrawingArea
+        to flush changes to the UI process.
+        
+        Fix by having RenderLayerCompositor schedule a flush, rather
+        than just doing a flush, in response to GraphicsLayerUpdater.
+        
+        Also change the name of the GraphicsLayerUpdaterClient function
+        to indicate that it suggests that a flush is required soon, rather than
+        that the flushing has to be synchronous.
+
+        * platform/graphics/GraphicsLayerUpdater.cpp:
+        (WebCore::GraphicsLayerUpdater::displayRefreshFired):
+        * platform/graphics/GraphicsLayerUpdater.h:
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::flushLayersSoon):
+        (WebCore::RenderLayerCompositor::flushLayers): Deleted.
+        * rendering/RenderLayerCompositor.h:
+
 2014-05-02  Jeremy Jones  <jeremyj@apple.com>
 
         Use displayNameForTrack instead of textTrack->label() for captions.
index 056992d..89867df 100644 (file)
@@ -75,7 +75,7 @@ void GraphicsLayerUpdater::displayRefreshFired(double timestamp)
     m_scheduled = false;
     
     if (m_client)
-        m_client->flushLayers(this);
+        m_client->flushLayersSoon(this);
 }
 
 } // namespace WebCore
index f4246df..58e190d 100644 (file)
@@ -36,7 +36,7 @@ class GraphicsLayerUpdater;
 class GraphicsLayerUpdaterClient {
 public:
     virtual ~GraphicsLayerUpdaterClient() { }
-    virtual void flushLayers(GraphicsLayerUpdater*) = 0;
+    virtual void flushLayersSoon(GraphicsLayerUpdater*) = 0;
 };
 
 class GraphicsLayerUpdater
index a554ea9..0798da7 100644 (file)
@@ -579,9 +579,9 @@ void RenderLayerCompositor::notifyFlushBeforeDisplayRefresh(const GraphicsLayer*
     m_layerUpdater->scheduleUpdate();
 }
 
-void RenderLayerCompositor::flushLayers(GraphicsLayerUpdater*)
+void RenderLayerCompositor::flushLayersSoon(GraphicsLayerUpdater*)
 {
-    flushPendingLayerChanges(true); // FIXME: deal with iframes
+    scheduleLayerFlush(true);
 }
 
 void RenderLayerCompositor::layerTiledBackingUsageChanged(const GraphicsLayer*, bool usingTiledBacking)
index 5916589..2a988b4 100644 (file)
@@ -311,13 +311,12 @@ private:
     virtual void notifyAnimationStarted(const GraphicsLayer*, double) override { }
     virtual void notifyFlushRequired(const GraphicsLayer*) override;
     virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect&) override;
-
+    virtual void customPositionForVisibleRectComputation(const GraphicsLayer*, FloatPoint&) const override;
     virtual bool isTrackingRepaints() const override;
     
     // GraphicsLayerUpdaterClient implementation
-    virtual void flushLayers(GraphicsLayerUpdater*) override;
-    virtual void customPositionForVisibleRectComputation(const GraphicsLayer*, FloatPoint&) const override;
-    
+    virtual void flushLayersSoon(GraphicsLayerUpdater*) override;
+
     // Whether the given RL needs a compositing layer.
     bool needsToBeComposited(const RenderLayer&, RenderLayer::ViewportConstrainedNotCompositedReason* = 0) const;
     // Whether the layer has an intrinsic need for compositing layer.