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

Unified Diff: cc/animation/element_animations.h

Issue 1987123002: cc : Track transform animation changes on transform tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/animation/element_animations.cc » ('j') | cc/animation/element_animations.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/element_animations.h
diff --git a/cc/animation/element_animations.h b/cc/animation/element_animations.h
index a3317a09a77ad1c3b233aa71e688cae7f21c000e..b29d99587d010991599a632282ac4f3ade0aed96 100644
--- a/cc/animation/element_animations.h
+++ b/cc/animation/element_animations.h
@@ -224,19 +224,13 @@ class CC_EXPORT ElementAnimations : public base::RefCounted<ElementAnimations> {
void NotifyClientAnimationWaitingForDeletion();
- void NotifyClientTransformIsPotentiallyAnimatingChanged(
- bool notify_active_elements,
- bool notify_pending_elements);
+ void NotifyClientAnimationChanged(
+ TargetProperty::Type property,
+ ElementListType list_type,
+ bool notify_elements_about_potential_animation,
+ bool notify_elements_about_running_animation);
- void UpdatePotentiallyAnimatingTransform();
-
- void NotifyClientOpacityAnimationChanged(
- bool notify_active_elements_about_potential_animation,
- bool notify_active_elements_about_running_animation,
- bool notify_pending_elements_about_potential_aniamtion,
- bool notify_pending_elements_about_running_animation);
-
- void UpdateAnimatingOpacity();
+ void UpdateClientAnimationState(TargetProperty::Type property);
void OnFilterAnimated(ElementListType list_type,
const FilterOperations& filters);
@@ -246,11 +240,10 @@ class CC_EXPORT ElementAnimations : public base::RefCounted<ElementAnimations> {
void OnScrollOffsetAnimated(ElementListType list_type,
const gfx::ScrollOffset& scroll_offset);
void OnAnimationWaitingForDeletion();
- void OnTransformIsPotentiallyAnimatingChanged(ElementListType list_type,
- bool is_animating);
- void OnOpacityIsAnimatingChanged(ElementListType list_type,
- AnimationChangeType change_type,
- bool is_animating);
+ void IsAnimatingChanged(ElementListType list_type,
+ TargetProperty::Type property,
+ AnimationChangeType change_type,
+ bool is_animating);
gfx::ScrollOffset ScrollOffsetForAnimation() const;
void NotifyPlayersAnimationStarted(base::TimeTicks monotonic_time,
@@ -287,13 +280,21 @@ class CC_EXPORT ElementAnimations : public base::RefCounted<ElementAnimations> {
bool scroll_offset_animation_was_interrupted_;
- bool potentially_animating_transform_for_active_elements_;
- bool potentially_animating_transform_for_pending_elements_;
-
- bool currently_running_opacity_animation_for_active_elements_;
- bool currently_running_opacity_animation_for_pending_elements_;
- bool potentially_animating_opacity_for_active_elements_;
- bool potentially_animating_opacity_for_pending_elements_;
+ struct AnimationStateForClient {
ajuma 2016/05/18 22:03:30 nit: PropertyAnimationState might be a better name
jaydasika 2016/05/19 00:56:42 Done.
+ bool currently_running_for_active_elements = false;
+ bool currently_running_for_pending_elements = false;
+ bool potentially_animating_for_active_elements = false;
+ bool potentially_animating_for_pending_elements = false;
+ void Clear() {
+ currently_running_for_active_elements = false;
+ currently_running_for_pending_elements = false;
+ potentially_animating_for_active_elements = false;
+ potentially_animating_for_pending_elements = false;
+ }
+ };
+
+ struct AnimationStateForClient opacity_animation_;
ajuma 2016/05/18 22:03:30 opacity_animation_state_
jaydasika 2016/05/19 00:56:42 Done.
+ struct AnimationStateForClient transform_animation_;
DISALLOW_COPY_AND_ASSIGN(ElementAnimations);
};
« no previous file with comments | « no previous file | cc/animation/element_animations.cc » ('j') | cc/animation/element_animations.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698