Title: [233908] trunk/Source/WebCore
Revision
233908
Author
simon.fra...@apple.com
Date
2018-07-18 00:02:02 -0700 (Wed, 18 Jul 2018)

Log Message

Shrink CompositeAnimation and AnimationBase
https://bugs.webkit.org/show_bug.cgi?id=187683

Reviewed by Daniel Bates.

Reduce the size of CompositeAnimation and AnimationBase.

* page/animation/AnimationBase.h:
* page/animation/CompositeAnimation.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (233907 => 233908)


--- trunk/Source/WebCore/ChangeLog	2018-07-18 06:08:36 UTC (rev 233907)
+++ trunk/Source/WebCore/ChangeLog	2018-07-18 07:02:02 UTC (rev 233908)
@@ -1,3 +1,15 @@
+2018-07-18  Simon Fraser  <simon.fra...@apple.com>
+
+        Shrink CompositeAnimation and AnimationBase
+        https://bugs.webkit.org/show_bug.cgi?id=187683
+
+        Reviewed by Daniel Bates.
+
+        Reduce the size of CompositeAnimation and AnimationBase.
+
+        * page/animation/AnimationBase.h:
+        * page/animation/CompositeAnimation.h:
+
 2018-07-17  Antoine Quint  <grao...@apple.com>
 
         Ensure timingFunctionForKeyframeAtIndex() can be used from setAnimatedPropertiesInStyle().

Modified: trunk/Source/WebCore/page/animation/AnimationBase.h (233907 => 233908)


--- trunk/Source/WebCore/page/animation/AnimationBase.h	2018-07-18 06:08:36 UTC (rev 233907)
+++ trunk/Source/WebCore/page/animation/AnimationBase.h	2018-07-18 07:02:02 UTC (rev 233908)
@@ -66,7 +66,7 @@
     // If so, we stay in this state until that response is received (and it returns the start time).
     // Otherwise, we use the current time as the start time and go immediately to AnimationState::Looping
     // or AnimationState::Ending.
-    enum class AnimationState {
+    enum class AnimationState : uint8_t {
         New,                        // animation just created, animation not running yet
         StartWaitTimer,             // start timer running, waiting for fire
         StartWaitStyleAvailable,    // waiting for style setup so we can start animations
@@ -82,7 +82,7 @@
         FillingForwards             // animation has ended and is retaining its final value
     };
 
-    enum class AnimationStateInput {
+    enum class AnimationStateInput : uint8_t {
         MakeNew,           // reset back to new from any state
         StartAnimation,    // animation requests a start
         RestartAnimation,  // force a restart from any state
@@ -241,6 +241,14 @@
     bool computeTransformedExtentViaTransformList(const FloatRect& rendererBox, const RenderStyle&, LayoutRect& bounds) const;
     bool computeTransformedExtentViaMatrix(const FloatRect& rendererBox, const RenderStyle&, LayoutRect& bounds) const;
 
+protected:
+    bool m_isAccelerated { false };
+    bool m_transformFunctionListsMatch { false };
+    bool m_filterFunctionListsMatch { false };
+#if ENABLE(FILTERS_LEVEL_2)
+    bool m_backdropFilterFunctionListsMatch { false };
+#endif
+
 private:
     RefPtr<Element> m_element;
 
@@ -255,12 +263,6 @@
     std::optional<double> m_nextIterationDuration;
 
     AnimationState m_animationState { AnimationState::New };
-    bool m_isAccelerated { false };
-    bool m_transformFunctionListsMatch { false };
-    bool m_filterFunctionListsMatch { false };
-#if ENABLE(FILTERS_LEVEL_2)
-    bool m_backdropFilterFunctionListsMatch { false };
-#endif
     bool m_colorFilterFunctionListsMatch { false };
 };
 

Modified: trunk/Source/WebCore/page/animation/CompositeAnimation.h (233907 => 233908)


--- trunk/Source/WebCore/page/animation/CompositeAnimation.h	2018-07-18 06:08:36 UTC (rev 233907)
+++ trunk/Source/WebCore/page/animation/CompositeAnimation.h	2018-07-18 07:02:02 UTC (rev 233908)
@@ -95,15 +95,16 @@
     typedef HashMap<int, RefPtr<ImplicitAnimation>> CSSPropertyTransitionsMap;
     typedef HashMap<AtomicStringImpl*, RefPtr<KeyframeAnimation>> AnimationNameMap;
 
+    bool m_suspended { false };
+    bool m_hasAnimationThatDependsOnLayout { false };
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    bool m_hasScrollTriggeredAnimation { false };
+#endif
+
     CSSAnimationControllerPrivate& m_animationController;
     CSSPropertyTransitionsMap m_transitions;
     AnimationNameMap m_keyframeAnimations;
     Vector<AtomicStringImpl*> m_keyframeAnimationOrderMap;
-    bool m_suspended;
-    bool m_hasAnimationThatDependsOnLayout { false };
-#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
-    bool m_hasScrollTriggeredAnimation { false };
-#endif
 };
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to