[TexMap] Can not do multiple accelerated animations
authorallan.jensen@digia.com <allan.jensen@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Dec 2012 15:02:31 +0000 (15:02 +0000)
committerallan.jensen@digia.com <allan.jensen@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Dec 2012 15:02:31 +0000 (15:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=104364

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

By removing all animations with the same name, it is not possible to animate more than one property accelerated.
Instead only remove any animations with both same name and property.

Covered by animations/opacity-transform-animation.html.

* platform/graphics/GraphicsLayerAnimation.cpp:
(WebCore::GraphicsLayerAnimations::add):
(WebCore::GraphicsLayerAnimations::remove):
* platform/graphics/GraphicsLayerAnimation.h:
(GraphicsLayerAnimations):

LayoutTests:

Unskip test animating multiple accelerated properties.

* platform/qt/TestExpectations:

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

LayoutTests/ChangeLog
LayoutTests/platform/qt/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsLayerAnimation.cpp
Source/WebCore/platform/graphics/GraphicsLayerAnimation.h

index bcc4d72..e396a31 100644 (file)
@@ -1,3 +1,14 @@
+2012-12-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
+
+        [TexMap] Can not do multiple accelerated animations
+        https://bugs.webkit.org/show_bug.cgi?id=104364
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Unskip test animating multiple accelerated properties.
+
+        * platform/qt/TestExpectations:
+
 2012-10-03   Pavel Feldman  <pfeldman@chromium.org>
 
         Web Inspector: provide a way to reload page with given script preprocessor.
index 18094cb..d4b0cc7 100644 (file)
@@ -2387,7 +2387,6 @@ webkit.org/b/99306 animations/additive-transform-animations.html [ ImageOnlyFail
 webkit.org/b/99306 animations/cross-fade-webkit-mask-box-image.html [ ImageOnlyFailure ]
 webkit.org/b/99306 animations/missing-values-first-keyframe.html [ ImageOnlyFailure ]
 webkit.org/b/99306 animations/missing-values-last-keyframe.html [ ImageOnlyFailure ]
-webkit.org/b/99306 animations/opacity-transform-animation.html [ ImageOnlyFailure ]
 webkit.org/b/99306 css3/filters/effect-blur-hw.html [ ImageOnlyFailure ] # Blur effect radius is too small on WebKit1, the effect not applied at all on WebKit2.
 
 # REGRESSION(r132143): It made fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html flakey
index ddc9379..83ed479 100644 (file)
@@ -1,3 +1,21 @@
+2012-12-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
+
+        [TexMap] Can not do multiple accelerated animations
+        https://bugs.webkit.org/show_bug.cgi?id=104364
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        By removing all animations with the same name, it is not possible to animate more than one property accelerated. 
+        Instead only remove any animations with both same name and property.
+
+        Covered by animations/opacity-transform-animation.html.
+
+        * platform/graphics/GraphicsLayerAnimation.cpp:
+        (WebCore::GraphicsLayerAnimations::add):
+        (WebCore::GraphicsLayerAnimations::remove):
+        * platform/graphics/GraphicsLayerAnimation.h:
+        (GraphicsLayerAnimations):
+
 2012-12-07  Sujin Park  <sujjin.park@gmail.com>
 
         [EFL] Fix build warning in StyleResolver.cpp using gcc 4.7.2
index 706158d..16710b6 100644 (file)
@@ -344,7 +344,7 @@ void GraphicsLayerAnimation::resume()
 void GraphicsLayerAnimations::add(const GraphicsLayerAnimation& animation)
 {
     // Remove the old state if we are resuming a paused animation.
-    remove(animation.name());
+    remove(animation.name(), animation.property());
 
     m_animations.append(animation);
 }
@@ -377,6 +377,14 @@ void GraphicsLayerAnimations::remove(const String& name)
     }
 }
 
+void GraphicsLayerAnimations::remove(const String& name, AnimatedPropertyID property)
+{
+    for (int i = m_animations.size() - 1; i >= 0; --i) {
+        if (m_animations[i].name() == name && m_animations[i].property() == property)
+            m_animations.remove(i);
+    }
+}
+
 void GraphicsLayerAnimations::apply(GraphicsLayerAnimation::Client* client)
 {
     for (size_t i = 0; i < m_animations.size(); ++i)
index bfc928b..9f0b5c5 100644 (file)
@@ -85,6 +85,7 @@ public:
 
     void add(const GraphicsLayerAnimation&);
     void remove(const String& name);
+    void remove(const String& name, AnimatedPropertyID);
     void pause(const String&, double);
     void suspend(double);
     void resume();