| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "CCThreadedTest.h" | 7 #include "CCThreadedTest.h" |
| 8 | 8 |
| 9 #include "CCActiveAnimation.h" | 9 #include "CCActiveAnimation.h" |
| 10 #include "CCAnimationTestCommon.h" | 10 #include "CCAnimationTestCommon.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 m_testHooks->drawLayersOnCCThread(this); | 113 m_testHooks->drawLayersOnCCThread(this); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void MockLayerTreeHostImpl::animateLayers(double monotonicTime, double wallClock
Time) | 116 void MockLayerTreeHostImpl::animateLayers(double monotonicTime, double wallClock
Time) |
| 117 { | 117 { |
| 118 m_testHooks->willAnimateLayers(this, monotonicTime); | 118 m_testHooks->willAnimateLayers(this, monotonicTime); |
| 119 CCLayerTreeHostImpl::animateLayers(monotonicTime, wallClockTime); | 119 CCLayerTreeHostImpl::animateLayers(monotonicTime, wallClockTime); |
| 120 m_testHooks->animateLayers(this, monotonicTime); | 120 m_testHooks->animateLayers(this, monotonicTime); |
| 121 } | 121 } |
| 122 | 122 |
| 123 double MockLayerTreeHostImpl::lowFrequencyAnimationInterval() const | 123 base::TimeDelta MockLayerTreeHostImpl::lowFrequencyAnimationInterval() const |
| 124 { | 124 { |
| 125 return 1.0 / 60; | 125 return base::TimeDelta::FromMilliseconds(16); |
| 126 } | 126 } |
| 127 | 127 |
| 128 MockLayerTreeHostImpl::MockLayerTreeHostImpl(TestHooks* testHooks, const CCLayer
TreeSettings& settings, CCLayerTreeHostImplClient* client) | 128 MockLayerTreeHostImpl::MockLayerTreeHostImpl(TestHooks* testHooks, const CCLayer
TreeSettings& settings, CCLayerTreeHostImplClient* client) |
| 129 : CCLayerTreeHostImpl(settings, client) | 129 : CCLayerTreeHostImpl(settings, client) |
| 130 , m_testHooks(testHooks) | 130 , m_testHooks(testHooks) |
| 131 { | 131 { |
| 132 } | 132 } |
| 133 | 133 |
| 134 // Adapts CCLayerTreeHost for test. Injects MockLayerTreeHostImpl. | 134 // Adapts CCLayerTreeHost for test. Injects MockLayerTreeHostImpl. |
| 135 class MockLayerTreeHost : public cc::CCLayerTreeHost { | 135 class MockLayerTreeHost : public cc::CCLayerTreeHost { |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 if (m_timedOut) { | 541 if (m_timedOut) { |
| 542 FAIL() << "Test timed out"; | 542 FAIL() << "Test timed out"; |
| 543 Platform::current()->compositorSupport()->shutdown(); | 543 Platform::current()->compositorSupport()->shutdown(); |
| 544 return; | 544 return; |
| 545 } | 545 } |
| 546 afterTest(); | 546 afterTest(); |
| 547 Platform::current()->compositorSupport()->shutdown(); | 547 Platform::current()->compositorSupport()->shutdown(); |
| 548 } | 548 } |
| 549 | 549 |
| 550 } // namespace WebKitTests | 550 } // namespace WebKitTests |
| OLD | NEW |