Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: cc/test/animation_test_common.cc

Issue 584503005: Make scroll offset type of float in cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: blow up the patchset :( Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "cc/test/animation_test_common.h" 5 #include "cc/test/animation_test_common.h"
6 6
7 #include "cc/animation/animation_id_provider.h" 7 #include "cc/animation/animation_id_provider.h"
8 #include "cc/animation/keyframed_animation_curve.h" 8 #include "cc/animation/keyframed_animation_curve.h"
9 #include "cc/animation/layer_animation_controller.h" 9 #include "cc/animation/layer_animation_controller.h"
10 #include "cc/animation/transform_operations.h" 10 #include "cc/animation/transform_operations.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 void FakeLayerAnimationValueObserver::OnOpacityAnimated(float opacity) { 213 void FakeLayerAnimationValueObserver::OnOpacityAnimated(float opacity) {
214 opacity_ = opacity; 214 opacity_ = opacity;
215 } 215 }
216 216
217 void FakeLayerAnimationValueObserver::OnTransformAnimated( 217 void FakeLayerAnimationValueObserver::OnTransformAnimated(
218 const gfx::Transform& transform) { 218 const gfx::Transform& transform) {
219 transform_ = transform; 219 transform_ = transform;
220 } 220 }
221 221
222 void FakeLayerAnimationValueObserver::OnScrollOffsetAnimated( 222 void FakeLayerAnimationValueObserver::OnScrollOffsetAnimated(
223 const gfx::Vector2dF& scroll_offset) { 223 const gfx::ScrollOffset& scroll_offset) {
224 scroll_offset_ = scroll_offset; 224 scroll_offset_ = scroll_offset;
225 } 225 }
226 226
227 void FakeLayerAnimationValueObserver::OnAnimationWaitingForDeletion() { 227 void FakeLayerAnimationValueObserver::OnAnimationWaitingForDeletion() {
228 animation_waiting_for_deletion_ = true; 228 animation_waiting_for_deletion_ = true;
229 } 229 }
230 230
231 bool FakeLayerAnimationValueObserver::IsActive() const { 231 bool FakeLayerAnimationValueObserver::IsActive() const {
232 return true; 232 return true;
233 } 233 }
234 234
235 bool FakeInactiveLayerAnimationValueObserver::IsActive() const { 235 bool FakeInactiveLayerAnimationValueObserver::IsActive() const {
236 return false; 236 return false;
237 } 237 }
238 238
239 gfx::Vector2dF FakeLayerAnimationValueProvider::ScrollOffsetForAnimation() 239 gfx::ScrollOffset FakeLayerAnimationValueProvider::ScrollOffsetForAnimation()
240 const { 240 const {
241 return scroll_offset_; 241 return scroll_offset_;
242 } 242 }
243 243
244 scoped_ptr<AnimationCurve> FakeFloatTransition::Clone() const { 244 scoped_ptr<AnimationCurve> FakeFloatTransition::Clone() const {
245 return make_scoped_ptr(new FakeFloatTransition(*this)) 245 return make_scoped_ptr(new FakeFloatTransition(*this))
246 .PassAs<AnimationCurve>(); 246 .PassAs<AnimationCurve>();
247 } 247 }
248 248
249 int AddOpacityTransitionToController(LayerAnimationController* controller, 249 int AddOpacityTransitionToController(LayerAnimationController* controller,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 double duration, 345 double duration,
346 float start_brightness, 346 float start_brightness,
347 float end_brightness) { 347 float end_brightness) {
348 return AddAnimatedFilter(layer->layer_animation_controller(), 348 return AddAnimatedFilter(layer->layer_animation_controller(),
349 duration, 349 duration,
350 start_brightness, 350 start_brightness,
351 end_brightness); 351 end_brightness);
352 } 352 }
353 353
354 } // namespace cc 354 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698