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

Unified Diff: cc/animation/animation_host.h

Issue 1922833002: CC Animation: Start replacing int layer_id with ElementId element_id. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/animation/animation_events.cc ('k') | cc/animation/animation_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation_host.h
diff --git a/cc/animation/animation_host.h b/cc/animation/animation_host.h
index 82ae75f715fa0dc516f7d754084c7f9643f78569..88e7e7720d6e8aa2db5efeb20666f8724d171a1c 100644
--- a/cc/animation/animation_host.h
+++ b/cc/animation/animation_host.h
@@ -14,6 +14,7 @@
#include "base/time/time.h"
#include "cc/animation/animation.h"
#include "cc/base/cc_export.h"
+#include "cc/trees/mutator_host_client.h"
#include "ui/gfx/geometry/box_f.h"
#include "ui/gfx/geometry/vector2d_f.h"
@@ -28,8 +29,6 @@ class AnimationPlayer;
class AnimationTimeline;
class ElementAnimations;
class LayerTreeHost;
-class MutatorHostClient;
-enum class LayerTreeType;
enum class ThreadInstance { MAIN, IMPL };
@@ -55,14 +54,14 @@ class CC_EXPORT AnimationHost {
void ClearTimelines();
- void RegisterLayer(int layer_id, LayerTreeType tree_type);
- void UnregisterLayer(int layer_id, LayerTreeType tree_type);
+ void RegisterLayer(ElementId element_id, LayerTreeType tree_type);
+ void UnregisterLayer(ElementId element_id, LayerTreeType tree_type);
- void RegisterPlayerForLayer(int layer_id, AnimationPlayer* player);
- void UnregisterPlayerForLayer(int layer_id, AnimationPlayer* player);
+ void RegisterPlayerForLayer(ElementId element_id, AnimationPlayer* player);
+ void UnregisterPlayerForLayer(ElementId element_id, AnimationPlayer* player);
scoped_refptr<ElementAnimations> GetElementAnimationsForLayerId(
- int layer_id) const;
+ ElementId element_id) const;
// Parent LayerTreeHost or LayerTreeHostImpl.
MutatorHostClient* mutator_host_client() { return mutator_host_client_; }
@@ -88,58 +87,60 @@ class CC_EXPORT AnimationHost {
std::unique_ptr<AnimationEvents> CreateEvents();
void SetAnimationEvents(std::unique_ptr<AnimationEvents> events);
- bool ScrollOffsetAnimationWasInterrupted(int layer_id) const;
+ bool ScrollOffsetAnimationWasInterrupted(ElementId element_id) const;
- bool IsAnimatingFilterProperty(int layer_id, LayerTreeType tree_type) const;
- bool IsAnimatingOpacityProperty(int layer_id, LayerTreeType tree_type) const;
- bool IsAnimatingTransformProperty(int layer_id,
+ bool IsAnimatingFilterProperty(ElementId element_id,
+ LayerTreeType tree_type) const;
+ bool IsAnimatingOpacityProperty(ElementId element_id,
+ LayerTreeType tree_type) const;
+ bool IsAnimatingTransformProperty(ElementId element_id,
LayerTreeType tree_type) const;
- bool HasPotentiallyRunningFilterAnimation(int layer_id,
+ bool HasPotentiallyRunningFilterAnimation(ElementId element_id,
LayerTreeType tree_type) const;
- bool HasPotentiallyRunningOpacityAnimation(int layer_id,
+ bool HasPotentiallyRunningOpacityAnimation(ElementId element_id,
LayerTreeType tree_type) const;
- bool HasPotentiallyRunningTransformAnimation(int layer_id,
+ bool HasPotentiallyRunningTransformAnimation(ElementId element_id,
LayerTreeType tree_type) const;
- bool HasAnyAnimationTargetingProperty(int layer_id,
+ bool HasAnyAnimationTargetingProperty(ElementId element_id,
TargetProperty::Type property) const;
- bool FilterIsAnimatingOnImplOnly(int layer_id) const;
- bool OpacityIsAnimatingOnImplOnly(int layer_id) const;
- bool ScrollOffsetIsAnimatingOnImplOnly(int layer_id) const;
- bool TransformIsAnimatingOnImplOnly(int layer_id) const;
+ bool FilterIsAnimatingOnImplOnly(ElementId element_id) const;
+ bool OpacityIsAnimatingOnImplOnly(ElementId element_id) const;
+ bool ScrollOffsetIsAnimatingOnImplOnly(ElementId element_id) const;
+ bool TransformIsAnimatingOnImplOnly(ElementId element_id) const;
- bool HasFilterAnimationThatInflatesBounds(int layer_id) const;
- bool HasTransformAnimationThatInflatesBounds(int layer_id) const;
- bool HasAnimationThatInflatesBounds(int layer_id) const;
+ bool HasFilterAnimationThatInflatesBounds(ElementId element_id) const;
+ bool HasTransformAnimationThatInflatesBounds(ElementId element_id) const;
+ bool HasAnimationThatInflatesBounds(ElementId element_id) const;
- bool FilterAnimationBoundsForBox(int layer_id,
+ bool FilterAnimationBoundsForBox(ElementId element_id,
const gfx::BoxF& box,
gfx::BoxF* bounds) const;
- bool TransformAnimationBoundsForBox(int layer_id,
+ bool TransformAnimationBoundsForBox(ElementId element_id,
const gfx::BoxF& box,
gfx::BoxF* bounds) const;
- bool HasOnlyTranslationTransforms(int layer_id,
+ bool HasOnlyTranslationTransforms(ElementId element_id,
LayerTreeType tree_type) const;
- bool AnimationsPreserveAxisAlignment(int layer_id) const;
+ bool AnimationsPreserveAxisAlignment(ElementId element_id) const;
- bool MaximumTargetScale(int layer_id,
+ bool MaximumTargetScale(ElementId element_id,
LayerTreeType tree_type,
float* max_scale) const;
- bool AnimationStartScale(int layer_id,
+ bool AnimationStartScale(ElementId element_id,
LayerTreeType tree_type,
float* start_scale) const;
- bool HasAnyAnimation(int layer_id) const;
- bool HasActiveAnimationForTesting(int layer_id) const;
+ bool HasAnyAnimation(ElementId element_id) const;
+ bool HasActiveAnimationForTesting(ElementId element_id) const;
- void ImplOnlyScrollAnimationCreate(int layer_id,
+ void ImplOnlyScrollAnimationCreate(ElementId element_id,
const gfx::ScrollOffset& target_offset,
const gfx::ScrollOffset& current_offset);
bool ImplOnlyScrollAnimationUpdateTarget(
- int layer_id,
+ ElementId element_id,
const gfx::Vector2dF& scroll_delta,
const gfx::ScrollOffset& max_scroll_offset,
base::TimeTicks frame_monotonic_time);
« no previous file with comments | « cc/animation/animation_events.cc ('k') | cc/animation/animation_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698