Title: [112708] trunk/Source/WebKit/chromium
Revision
112708
Author
[email protected]
Date
2012-03-30 12:05:59 -0700 (Fri, 30 Mar 2012)

Log Message

[chromium] Flaky animation unit test CCLayerTreeHostTestSynchronizeAnimationStartTimes
https://bugs.webkit.org/show_bug.cgi?id=82731

Patch by Ian Vollick <[email protected]> on 2012-03-30
Reviewed by James Robinson.

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

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (112707 => 112708)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-03-30 18:59:49 UTC (rev 112707)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-03-30 19:05:59 UTC (rev 112708)
@@ -1,5 +1,18 @@
 2012-03-30  Ian Vollick  <[email protected]>
 
+        [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  <[email protected]>
+
         [chromium] assertion being hit in CCLayerAnimationController
         https://bugs.webkit.org/show_bug.cgi?id=82237
 

Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp (112707 => 112708)


--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp	2012-03-30 18:59:49 UTC (rev 112707)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp	2012-03-30 19:05:59 UTC (rev 112708)
@@ -1066,6 +1066,7 @@
 public:
     CCLayerTreeHostTestSynchronizeAnimationStartTimes()
         : m_numAnimates(0)
+        , m_layerTreeHostImpl(0)
     {
     }
 
@@ -1074,14 +1075,22 @@
         postAddAnimationToMainThread();
     }
 
-    virtual void animateLayers(CCLayerTreeHostImpl* layerTreeHostImpl, double monotonicTime)
+    virtual void animateLayers(CCLayerTreeHostImpl* layerTreeHostImpl, double)
     {
+        m_layerTreeHostImpl = layerTreeHostImpl;
+
         if (!m_numAnimates) {
             m_numAnimates++;
             return;
         }
+    }
 
-        CCLayerAnimationController* controllerImpl = layerTreeHostImpl->rootLayer()->layerAnimationController();
+    virtual void notifyAnimationStarted(double time)
+    {
+        if (!m_numAnimates)
+            return;
+
+        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 @@
 
 private:
     int m_numAnimates;
+    CCLayerTreeHostImpl* m_layerTreeHostImpl;
 };
 
 TEST_F(CCLayerTreeHostTestSynchronizeAnimationStartTimes, runMultiThread)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to