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

Side by Side Diff: ui/compositor/layer_animator.h

Issue 1944623002: CC Animation: Use ElementId to attach CC animation players. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@erasedomids
Patch Set: Let CC clients generate their own ElementIds locally. Created 4 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef UI_COMPOSITOR_LAYER_ANIMATOR_H_ 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATOR_H_
6 #define UI_COMPOSITOR_LAYER_ANIMATOR_H_ 6 #define UI_COMPOSITOR_LAYER_ANIMATOR_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/linked_ptr.h" 14 #include "base/memory/linked_ptr.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "cc/animation/animation_delegate.h" 18 #include "cc/animation/animation_delegate.h"
19 #include "cc/animation/target_property.h" 19 #include "cc/animation/target_property.h"
20 #include "cc/trees/element_id.h"
20 #include "ui/compositor/compositor_export.h" 21 #include "ui/compositor/compositor_export.h"
21 #include "ui/compositor/layer_animation_element.h" 22 #include "ui/compositor/layer_animation_element.h"
22 #include "ui/compositor/layer_threaded_animation_delegate.h" 23 #include "ui/compositor/layer_threaded_animation_delegate.h"
23 #include "ui/gfx/animation/tween.h" 24 #include "ui/gfx/animation/tween.h"
24 25
25 namespace cc { 26 namespace cc {
26 class Animation; 27 class Animation;
27 class AnimationPlayer; 28 class AnimationPlayer;
28 class AnimationTimeline; 29 class AnimationTimeline;
29 class ElementAnimations; 30 class ElementAnimations;
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 void NotifyAnimationTakeover( 356 void NotifyAnimationTakeover(
356 base::TimeTicks monotonic_time, 357 base::TimeTicks monotonic_time,
357 cc::TargetProperty::Type target_property, 358 cc::TargetProperty::Type target_property,
358 double animation_start_time, 359 double animation_start_time,
359 std::unique_ptr<cc::AnimationCurve> curve) override {} 360 std::unique_ptr<cc::AnimationCurve> curve) override {}
360 361
361 // Implementation of LayerThreadedAnimationDelegate. 362 // Implementation of LayerThreadedAnimationDelegate.
362 void AddThreadedAnimation(std::unique_ptr<cc::Animation> animation) override; 363 void AddThreadedAnimation(std::unique_ptr<cc::Animation> animation) override;
363 void RemoveThreadedAnimation(int animation_id) override; 364 void RemoveThreadedAnimation(int animation_id) override;
364 365
365 void AttachLayerToAnimationPlayer(int layer_id); 366 void AttachElementToAnimationPlayer(cc::ElementId element_id);
366 void DetachLayerFromAnimationPlayer(); 367 void DetachElementFromAnimationPlayer();
367 368
368 // This is the queue of animations to run. 369 // This is the queue of animations to run.
369 AnimationQueue animation_queue_; 370 AnimationQueue animation_queue_;
370 371
371 // The target of all layer animations. 372 // The target of all layer animations.
372 LayerAnimationDelegate* delegate_; 373 LayerAnimationDelegate* delegate_;
373 374
374 // Plays CC animations. 375 // Plays CC animations.
375 scoped_refptr<cc::AnimationPlayer> animation_player_; 376 scoped_refptr<cc::AnimationPlayer> animation_player_;
376 377
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 // ResetCompositor/SetCompositor scope. 413 // ResetCompositor/SetCompositor scope.
413 // TODO(loyso): Remove it. crbug.com/592873. 414 // TODO(loyso): Remove it. crbug.com/592873.
414 scoped_refptr<cc::ElementAnimations> element_animations_state_; 415 scoped_refptr<cc::ElementAnimations> element_animations_state_;
415 416
416 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); 417 DISALLOW_COPY_AND_ASSIGN(LayerAnimator);
417 }; 418 };
418 419
419 } // namespace ui 420 } // namespace ui
420 421
421 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_ 422 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698