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

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

Issue 1782433002: CC Animation: Erase old animation system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@erasetests
Patch Set: Remove vtbl in LayerAnimationController. Fix formatting. Created 4 years, 9 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
« no previous file with comments | « cc/test/animation_test_common.h ('k') | cc/test/layer_tree_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_host.h" 7 #include "cc/animation/animation_host.h"
8 #include "cc/animation/animation_id_provider.h" 8 #include "cc/animation/animation_id_provider.h"
9 #include "cc/animation/animation_player.h" 9 #include "cc/animation/animation_player.h"
10 #include "cc/animation/keyframed_animation_curve.h" 10 #include "cc/animation/keyframed_animation_curve.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 286
287 int AddAnimatedFilterToController(LayerAnimationController* controller, 287 int AddAnimatedFilterToController(LayerAnimationController* controller,
288 double duration, 288 double duration,
289 float start_brightness, 289 float start_brightness,
290 float end_brightness) { 290 float end_brightness) {
291 return AddAnimatedFilter( 291 return AddAnimatedFilter(
292 controller, duration, start_brightness, end_brightness); 292 controller, duration, start_brightness, end_brightness);
293 } 293 }
294 294
295 int AddOpacityTransitionToLayer(Layer* layer,
296 double duration,
297 float start_opacity,
298 float end_opacity,
299 bool use_timing_function) {
300 return AddOpacityTransition(layer,
301 duration,
302 start_opacity,
303 end_opacity,
304 use_timing_function);
305 }
306
307 int AddOpacityTransitionToLayer(LayerImpl* layer,
308 double duration,
309 float start_opacity,
310 float end_opacity,
311 bool use_timing_function) {
312 return AddOpacityTransition(layer->layer_animation_controller(),
313 duration,
314 start_opacity,
315 end_opacity,
316 use_timing_function);
317 }
318
319 int AddAnimatedTransformToLayer(Layer* layer,
320 double duration,
321 int delta_x,
322 int delta_y) {
323 return AddAnimatedTransform(layer, duration, delta_x, delta_y);
324 }
325
326 int AddAnimatedTransformToLayer(LayerImpl* layer,
327 double duration,
328 int delta_x,
329 int delta_y) {
330 return AddAnimatedTransform(layer->layer_animation_controller(),
331 duration,
332 delta_x,
333 delta_y);
334 }
335
336 int AddAnimatedTransformToLayer(Layer* layer,
337 double duration,
338 TransformOperations start_operations,
339 TransformOperations operations) {
340 return AddAnimatedTransform(layer, duration, start_operations, operations);
341 }
342
343 int AddAnimatedTransformToLayer(LayerImpl* layer,
344 double duration,
345 TransformOperations start_operations,
346 TransformOperations operations) {
347 return AddAnimatedTransform(layer->layer_animation_controller(),
348 duration,
349 start_operations,
350 operations);
351 }
352
353 int AddAnimatedFilterToLayer(Layer* layer,
354 double duration,
355 float start_brightness,
356 float end_brightness) {
357 return AddAnimatedFilter(layer, duration, start_brightness, end_brightness);
358 }
359
360 int AddAnimatedFilterToLayer(LayerImpl* layer,
361 double duration,
362 float start_brightness,
363 float end_brightness) {
364 return AddAnimatedFilter(layer->layer_animation_controller(),
365 duration,
366 start_brightness,
367 end_brightness);
368 }
369
370 int AddAnimatedTransformToPlayer(AnimationPlayer* player, 295 int AddAnimatedTransformToPlayer(AnimationPlayer* player,
371 double duration, 296 double duration,
372 int delta_x, 297 int delta_x,
373 int delta_y) { 298 int delta_y) {
374 return AddAnimatedTransform(player, duration, delta_x, delta_y); 299 return AddAnimatedTransform(player, duration, delta_x, delta_y);
375 } 300 }
376 301
377 int AddAnimatedTransformToPlayer(AnimationPlayer* player, 302 int AddAnimatedTransformToPlayer(AnimationPlayer* player,
378 double duration, 303 double duration,
379 TransformOperations start_operations, 304 TransformOperations start_operations,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 void AbortAnimationsOnLayerWithPlayer(int layer_id, 453 void AbortAnimationsOnLayerWithPlayer(int layer_id,
529 scoped_refptr<AnimationTimeline> timeline, 454 scoped_refptr<AnimationTimeline> timeline,
530 TargetProperty::Type target_property) { 455 TargetProperty::Type target_property) {
531 LayerAnimationController* controller = 456 LayerAnimationController* controller =
532 timeline->animation_host()->GetControllerForLayerId(layer_id); 457 timeline->animation_host()->GetControllerForLayerId(layer_id);
533 DCHECK(controller); 458 DCHECK(controller);
534 controller->AbortAnimations(target_property); 459 controller->AbortAnimations(target_property);
535 } 460 }
536 461
537 } // namespace cc 462 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/animation_test_common.h ('k') | cc/test/layer_tree_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698