[chromium] Flaky animation unit test CCLayerTreeHostTestSynchronizeAnimationStartTimes
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Mar 2012 19:05:59 +0000 (19:05 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Mar 2012 19:05:59 +0000 (19:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82731

Patch by Ian Vollick <vollick@chromium.org> on 2012-03-30
Reviewed by James Robinson.

* tests/CCLayerTreeHostTest.cpp:
(WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::CCLayerTreeHostTestSynchronizeAnimationStartTimes):
(WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::animateLayers):
(CCLayerTreeHostTestSynchronizeAnimationStartTimes):
(WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::notifyAnimationStarted):

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

Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp

index f8a5adb..dbdc91a 100644 (file)
@@ -1,5 +1,18 @@
 2012-03-30  Ian Vollick  <vollick@chromium.org>
 
+        [chromium] Flaky animation unit test CCLayerTreeHostTestSynchronizeAnimationStartTimes
+        https://bugs.webkit.org/show_bug.cgi?id=82731
+
+        Reviewed by James Robinson.
+
+        * tests/CCLayerTreeHostTest.cpp:
+        (WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::CCLayerTreeHostTestSynchronizeAnimationStartTimes):
+        (WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::animateLayers):
+        (CCLayerTreeHostTestSynchronizeAnimationStartTimes):
+        (WTF::CCLayerTreeHostTestSynchronizeAnimationStartTimes::notifyAnimationStarted):
+
+2012-03-30  Ian Vollick  <vollick@chromium.org>
+
         [chromium] assertion being hit in CCLayerAnimationController
         https://bugs.webkit.org/show_bug.cgi?id=82237
 
index 58a9dc4..0190225 100644 (file)
@@ -1066,6 +1066,7 @@ class CCLayerTreeHostTestSynchronizeAnimationStartTimes : public CCLayerTreeHost
 public:
     CCLayerTreeHostTestSynchronizeAnimationStartTimes()
         : m_numAnimates(0)
+        , m_layerTreeHostImpl(0)
     {
     }
 
@@ -1074,14 +1075,22 @@ public:
         postAddAnimationToMainThread();
     }
 
-    virtual void animateLayers(CCLayerTreeHostImpl* layerTreeHostImpl, double monotonicTime)
+    virtual void animateLayers(CCLayerTreeHostImpl* layerTreeHostImpl, double)
     {
+        m_layerTreeHostImpl = layerTreeHostImpl;
+
         if (!m_numAnimates) {
             m_numAnimates++;
             return;
         }
+    }
+
+    virtual void notifyAnimationStarted(double time)
+    {
+        if (!m_numAnimates)
+            return;
 
-        CCLayerAnimationController* controllerImpl = layerTreeHostImpl->rootLayer()->layerAnimationController();
+        CCLayerAnimationController* controllerImpl = m_layerTreeHostImpl->rootLayer()->layerAnimationController();
         CCLayerAnimationController* controller = m_layerTreeHost->rootLayer()->layerAnimationController();
         CCActiveAnimation* animationImpl = controllerImpl->getActiveAnimation(0, CCActiveAnimation::Opacity);
         CCActiveAnimation* animation = controller->getActiveAnimation(0, CCActiveAnimation::Opacity);
@@ -1097,6 +1106,7 @@ public:
 
 private:
     int m_numAnimates;
+    CCLayerTreeHostImpl* m_layerTreeHostImpl;
 };
 
 TEST_F(CCLayerTreeHostTestSynchronizeAnimationStartTimes, runMultiThread)