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

Unified Diff: cc/layer_tree_host.cc

Issue 12453010: Allow impl-only animations, and return opacity values via AnimationEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
Index: cc/layer_tree_host.cc
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc
index 7f37e23cf88f20d46572ce9737202d3b2b74e544..7904378530e2716b944f99f52b6b61ea8612f07f 100644
--- a/cc/layer_tree_host.cc
+++ b/cc/layer_tree_host.cc
@@ -887,10 +887,22 @@ void LayerTreeHost::setAnimationEventsRecursive(const AnimationEventsVector& eve
for (size_t eventIndex = 0; eventIndex < events.size(); ++eventIndex) {
if (layer->id() == events[eventIndex].layerId) {
- if (events[eventIndex].type == AnimationEvent::Started)
+ switch (events[eventIndex].type) {
+ case AnimationEvent::Started :
layer->notifyAnimationStarted(events[eventIndex], wallClockTime.ToDoubleT());
- else
+ break;
+
+ case AnimationEvent::Finished :
layer->notifyAnimationFinished(wallClockTime.ToDoubleT());
+ break;
+
+ case AnimationEvent::PropertyUpdate :
+ layer->notifyAnimationPropertyUpdate(events[eventIndex]);
+ break;
+
+ default:
+ NOTREACHED();
+ }
}
}
« cc/layer_animation_controller_unittest.cc ('K') | « cc/layer_animation_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698