OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 102 } |
103 | 103 |
104 std::unique_ptr<CompositorAnimationPlayer> m_compositorPlayer; | 104 std::unique_ptr<CompositorAnimationPlayer> m_compositorPlayer; |
105 }; | 105 }; |
106 | 106 |
107 TEST_F(GraphicsLayerTest, updateLayerShouldFlattenTransformWithAnimations) { | 107 TEST_F(GraphicsLayerTest, updateLayerShouldFlattenTransformWithAnimations) { |
108 ASSERT_FALSE(m_platformLayer->hasTickingAnimationForTesting()); | 108 ASSERT_FALSE(m_platformLayer->hasTickingAnimationForTesting()); |
109 | 109 |
110 std::unique_ptr<CompositorFloatAnimationCurve> curve = | 110 std::unique_ptr<CompositorFloatAnimationCurve> curve = |
111 CompositorFloatAnimationCurve::create(); | 111 CompositorFloatAnimationCurve::create(); |
112 curve->addKeyframe(CompositorFloatKeyframe( | 112 curve->addKeyframe( |
113 0.0, 0.0, *CubicBezierTimingFunction::preset( | 113 CompositorFloatKeyframe(0.0, 0.0, |
114 CubicBezierTimingFunction::EaseType::EASE))); | 114 *CubicBezierTimingFunction::preset( |
| 115 CubicBezierTimingFunction::EaseType::EASE))); |
115 std::unique_ptr<CompositorAnimation> floatAnimation( | 116 std::unique_ptr<CompositorAnimation> floatAnimation( |
116 CompositorAnimation::create(*curve, CompositorTargetProperty::OPACITY, 0, | 117 CompositorAnimation::create(*curve, CompositorTargetProperty::OPACITY, 0, |
117 0)); | 118 0)); |
118 int animationId = floatAnimation->id(); | 119 int animationId = floatAnimation->id(); |
119 | 120 |
120 std::unique_ptr<CompositorAnimationTimeline> compositorTimeline = | 121 std::unique_ptr<CompositorAnimationTimeline> compositorTimeline = |
121 CompositorAnimationTimeline::create(); | 122 CompositorAnimationTimeline::create(); |
122 AnimationPlayerForTesting player; | 123 AnimationPlayerForTesting player; |
123 | 124 |
124 CompositorAnimationHost host(layerTreeView()->compositorAnimationHost()); | 125 CompositorAnimationHost host(layerTreeView()->compositorAnimationHost()); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 return Platform::current()->currentThread()->scheduler()->timerTaskRunner(); | 199 return Platform::current()->currentThread()->scheduler()->timerTaskRunner(); |
199 } | 200 } |
200 | 201 |
201 DEFINE_INLINE_VIRTUAL_TRACE() { ScrollableArea::trace(visitor); } | 202 DEFINE_INLINE_VIRTUAL_TRACE() { ScrollableArea::trace(visitor); } |
202 | 203 |
203 private: | 204 private: |
204 ScrollOffset m_scrollOffset; | 205 ScrollOffset m_scrollOffset; |
205 }; | 206 }; |
206 | 207 |
207 } // namespace blink | 208 } // namespace blink |
OLD | NEW |