Title: [234135] trunk/Source/WebCore
Revision
234135
Author
[email protected]
Date
2018-07-24 00:34:13 -0700 (Tue, 24 Jul 2018)

Log Message

[Nicosia] Add TextureMapperAnimations member to CompositingLayer::LayerState
https://bugs.webkit.org/show_bug.cgi?id=187941

Reviewed by Carlos Garcia Campos.

Nicosia::CompositingLayer::LayerState gains a TextureMapperAnimations
member that will be assigned a list of all active animations during each
layer flush. Despite the name, TextureMapperAnimations doesn't depend on
any other TextureMapper class. It might be renamed and moved in the
future, but for now it's used as-is.

In CoordinatedGraphicsLayer, the syncAnimations() method now flips on
the animationsChanged flag in the LayerState::Delta struct. This causes
all the active animations to be copied over into the layer state in
flushCompositingStateForThisLayerOnly().

* platform/graphics/nicosia/NicosiaPlatformLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::syncAnimations):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (234134 => 234135)


--- trunk/Source/WebCore/ChangeLog	2018-07-24 07:28:16 UTC (rev 234134)
+++ trunk/Source/WebCore/ChangeLog	2018-07-24 07:34:13 UTC (rev 234135)
@@ -1,5 +1,28 @@
 2018-07-24  Zan Dobersek  <[email protected]>
 
+        [Nicosia] Add TextureMapperAnimations member to CompositingLayer::LayerState
+        https://bugs.webkit.org/show_bug.cgi?id=187941
+
+        Reviewed by Carlos Garcia Campos.
+
+        Nicosia::CompositingLayer::LayerState gains a TextureMapperAnimations
+        member that will be assigned a list of all active animations during each
+        layer flush. Despite the name, TextureMapperAnimations doesn't depend on
+        any other TextureMapper class. It might be renamed and moved in the
+        future, but for now it's used as-is.
+
+        In CoordinatedGraphicsLayer, the syncAnimations() method now flips on
+        the animationsChanged flag in the LayerState::Delta struct. This causes
+        all the active animations to be copied over into the layer state in
+        flushCompositingStateForThisLayerOnly().
+
+        * platform/graphics/nicosia/NicosiaPlatformLayer.h:
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+        (WebCore::CoordinatedGraphicsLayer::syncAnimations):
+        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
+
+2018-07-24  Zan Dobersek  <[email protected]>
+
         [Nicosia] Add FilterOperations member to CompositionLayer::LayerState
         https://bugs.webkit.org/show_bug.cgi?id=187901
 

Modified: trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h (234134 => 234135)


--- trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h	2018-07-24 07:28:16 UTC (rev 234134)
+++ trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h	2018-07-24 07:34:13 UTC (rev 234135)
@@ -34,6 +34,7 @@
 #include "FloatPoint3D.h"
 #include "FloatRect.h"
 #include "FloatSize.h"
+#include "TextureMapperAnimation.h"
 #include "TransformationMatrix.h"
 #include <wtf/Lock.h>
 #include <wtf/ThreadSafeRefCounted.h>
@@ -85,6 +86,7 @@
                     bool opacityChanged : 1;
                     bool solidColorChanged : 1;
                     bool filtersChanged : 1;
+                    bool animationsChanged : 1;
                     bool childrenChanged : 1;
                     bool maskChanged : 1;
                     bool replicaChanged : 1;
@@ -130,6 +132,9 @@
         WebCore::Color solidColor;
 
         WebCore::FilterOperations filters;
+        // FIXME: Despite the name, this implementation is not
+        // TextureMapper-specific. Should be renamed when necessary.
+        WebCore::TextureMapperAnimations animations;
 
         Vector<RefPtr<CompositionLayer>> children;
         RefPtr<CompositionLayer> replica;

Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (234134 => 234135)


--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp	2018-07-24 07:28:16 UTC (rev 234134)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp	2018-07-24 07:34:13 UTC (rev 234135)
@@ -735,6 +735,7 @@
     m_shouldSyncAnimations = false;
     m_layerState.animations = m_animations.getActiveAnimations();
     m_layerState.animationsChanged = true;
+    m_nicosia.delta.animationsChanged = true;
 }
 
 void CoordinatedGraphicsLayer::syncPlatformLayer()
@@ -821,6 +822,8 @@
 
                 if (localDelta.filtersChanged)
                     state.filters = filters();
+                if (localDelta.animationsChanged)
+                    state.animations = m_animations.getActiveAnimations();
 
                 if (localDelta.childrenChanged) {
                     state.children = WTF::map(children(),
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to