| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "CCAnimationTestCommon.h" | 7 #include "CCAnimationTestCommon.h" |
| 8 | 8 |
| 9 #include "CCKeyframedAnimationCurve.h" | 9 #include "CCKeyframedAnimationCurve.h" |
| 10 #include "CCLayerAnimationController.h" | 10 #include "CCLayerAnimationController.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 animation->setNeedsSynchronizedStartTime(true); | 51 animation->setNeedsSynchronizedStartTime(true); |
| 52 | 52 |
| 53 target.addAnimation(animation.release()); | 53 target.addAnimation(animation.release()); |
| 54 } | 54 } |
| 55 | 55 |
| 56 } // namespace | 56 } // namespace |
| 57 | 57 |
| 58 namespace WebKitTests { | 58 namespace WebKitTests { |
| 59 | 59 |
| 60 FakeFloatAnimationCurve::FakeFloatAnimationCurve() | 60 FakeFloatAnimationCurve::FakeFloatAnimationCurve() |
| 61 : m_duration(1) |
| 61 { | 62 { |
| 62 } | 63 } |
| 63 | 64 |
| 65 FakeFloatAnimationCurve::FakeFloatAnimationCurve(double duration) |
| 66 : m_duration(duration) |
| 67 { |
| 68 } |
| 69 |
| 64 FakeFloatAnimationCurve::~FakeFloatAnimationCurve() | 70 FakeFloatAnimationCurve::~FakeFloatAnimationCurve() |
| 65 { | 71 { |
| 66 } | 72 } |
| 67 | 73 |
| 68 double FakeFloatAnimationCurve::duration() const | 74 double FakeFloatAnimationCurve::duration() const |
| 69 { | 75 { |
| 70 return 1; | 76 return m_duration; |
| 71 } | 77 } |
| 72 | 78 |
| 73 float FakeFloatAnimationCurve::getValue(double now) const | 79 float FakeFloatAnimationCurve::getValue(double now) const |
| 74 { | 80 { |
| 75 return 0; | 81 return 0; |
| 76 } | 82 } |
| 77 | 83 |
| 78 PassOwnPtr<cc::CCAnimationCurve> FakeFloatAnimationCurve::clone() const | 84 PassOwnPtr<cc::CCAnimationCurve> FakeFloatAnimationCurve::clone() const |
| 79 { | 85 { |
| 80 return adoptPtr(new FakeFloatAnimationCurve); | 86 return adoptPtr(new FakeFloatAnimationCurve); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 { | 198 { |
| 193 addAnimatedTransform(layer, duration, deltaX, deltaY); | 199 addAnimatedTransform(layer, duration, deltaX, deltaY); |
| 194 } | 200 } |
| 195 | 201 |
| 196 void addAnimatedTransformToLayer(cc::CCLayerImpl& layer, double duration, int de
ltaX, int deltaY) | 202 void addAnimatedTransformToLayer(cc::CCLayerImpl& layer, double duration, int de
ltaX, int deltaY) |
| 197 { | 203 { |
| 198 addAnimatedTransform(*layer.layerAnimationController(), duration, deltaX, de
ltaY); | 204 addAnimatedTransform(*layer.layerAnimationController(), duration, deltaX, de
ltaY); |
| 199 } | 205 } |
| 200 | 206 |
| 201 } // namespace WebKitTests | 207 } // namespace WebKitTests |
| OLD | NEW |