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

Unified Diff: cc/animation/element_animations.cc

Issue 2966793002: NOT FOR REVIEW - convert to cc animation
Patch Set: switch to transform operations Created 3 years, 6 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/element_animations.h ('k') | cc/animation/keyframed_animation_curve.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/element_animations.cc
diff --git a/cc/animation/element_animations.cc b/cc/animation/element_animations.cc
index ebb9c3fc83ee7853a0dfb5d0ff342b792c774aab..1882d2a4f87cb8af8138e95ca273d5d4652cbcd8 100644
--- a/cc/animation/element_animations.cc
+++ b/cc/animation/element_animations.cc
@@ -200,14 +200,18 @@ void ElementAnimations::NotifyAnimationPropertyUpdate(
bool notify_active_elements = true;
bool notify_pending_elements = true;
switch (event.target_property) {
- case TargetProperty::OPACITY:
+ case TargetProperty::OPACITY: {
NotifyClientOpacityAnimated(event.opacity, notify_active_elements,
notify_pending_elements);
break;
- case TargetProperty::TRANSFORM:
- NotifyClientTransformAnimated(event.transform, notify_active_elements,
- notify_pending_elements);
+ }
+ case TargetProperty::TRANSFORM: {
+ TransformOperations operations;
+ operations.AppendMatrix(event.transform);
+ NotifyClientTransformOperationsAnimated(
+ operations, notify_active_elements, notify_pending_elements);
break;
+ }
default:
NOTREACHED();
}
@@ -324,10 +328,11 @@ void ElementAnimations::NotifyClientOpacityAnimated(
OnOpacityAnimated(ElementListType::PENDING, opacity);
}
-void ElementAnimations::NotifyClientTransformAnimated(
- const gfx::Transform& transform,
+void ElementAnimations::NotifyClientTransformOperationsAnimated(
+ const TransformOperations& operations,
bool notify_active_elements,
bool notify_pending_elements) {
+ gfx::Transform transform = operations.Apply();
if (notify_active_elements && has_element_in_active_list())
OnTransformAnimated(ElementListType::ACTIVE, transform);
if (notify_pending_elements && has_element_in_pending_list())
« no previous file with comments | « cc/animation/element_animations.h ('k') | cc/animation/keyframed_animation_curve.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698