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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 1584743002: CC Animation: Replace AnimiationEventsVector with AnimiationEvents class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 11 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/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 70740935217a4482d62abd598cb54e879017a7d4..59136103a120bb54e16eeb630e0f7a79cd10ff45 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -23,6 +23,7 @@
#include "base/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_argument.h"
+#include "cc/animation/animation_events.h"
#include "cc/animation/animation_host.h"
#include "cc/animation/animation_registrar.h"
#include "cc/animation/layer_animation_controller.h"
@@ -552,8 +553,7 @@ void LayerTreeHost::SetNextCommitForcesRedraw() {
proxy_->SetNeedsUpdateLayers();
}
-void LayerTreeHost::SetAnimationEvents(
- scoped_ptr<AnimationEventsVector> events) {
+void LayerTreeHost::SetAnimationEvents(scoped_ptr<AnimationEvents> events) {
DCHECK(task_runner_provider_->IsMainThread());
if (animation_host_)
animation_host_->SetAnimationEvents(std::move(events));
@@ -921,16 +921,18 @@ void LayerTreeHost::AnimateLayers(base::TimeTicks monotonic_time) {
if (!settings_.accelerated_animation_enabled)
return;
- AnimationEventsVector events;
+ scoped_ptr<AnimationEvents> events;
if (animation_host_) {
+ events = animation_host_->CreateEvents();
if (animation_host_->AnimateLayers(monotonic_time))
- animation_host_->UpdateAnimationState(true, &events);
+ animation_host_->UpdateAnimationState(true, events.get());
} else {
+ events = animation_registrar_->CreateEvents();
if (animation_registrar_->AnimateLayers(monotonic_time))
- animation_registrar_->UpdateAnimationState(true, &events);
+ animation_registrar_->UpdateAnimationState(true, events.get());
}
- if (!events.empty())
+ if (!events->events_.empty())
property_trees_.needs_rebuild = true;
}
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698