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

Unified Diff: ui/compositor/compositor.cc

Issue 1130043003: [Sketch] CC Animations: Torpedo the old intrusive animation system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@implscroll
Patch Set: Delete more (headers and animation_registrar_ leftover) Created 5 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 | « content/test/web_layer_tree_view_impl_for_testing.cc ('k') | ui/compositor/compositor_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 06fb427d984ab258cbd59ecacb7f9671b1a8e5d2..f34a7075629d211e7e7dcbed502206ccd3e429e0 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -138,9 +138,6 @@ Compositor::Compositor(gfx::AcceleratedWidget widget,
// raster threads.
settings.gather_pixel_refs = false;
- settings.use_compositor_animation_timelines =
- command_line->HasSwitch(switches::kUIEnableCompositorAnimationTimelines);
-
base::TimeTicks before_create = base::TimeTicks::Now();
host_ = cc::LayerTreeHost::CreateSingleThreaded(
this, this, context_factory_->GetSharedBitmapManager(),
@@ -149,11 +146,10 @@ Compositor::Compositor(gfx::AcceleratedWidget widget,
UMA_HISTOGRAM_TIMES("GPU.CreateBrowserCompositor",
base::TimeTicks::Now() - before_create);
- if (settings.use_compositor_animation_timelines) {
- animation_timeline_ = cc::AnimationTimeline::Create(
- cc::AnimationIdProvider::NextTimelineId());
- host_->animation_host()->AddAnimationTimeline(animation_timeline_.get());
- }
+ animation_timeline_ =
+ cc::AnimationTimeline::Create(cc::AnimationIdProvider::NextTimelineId());
+ host_->animation_host()->AddAnimationTimeline(animation_timeline_.get());
+
host_->SetRootLayer(root_web_layer_);
host_->set_surface_id_namespace(surface_id_allocator_->id_namespace());
host_->SetLayerTreeHostClientReady();
@@ -173,8 +169,7 @@ Compositor::~Compositor() {
if (root_layer_)
root_layer_->ResetCompositor();
- if (animation_timeline_)
- host_->animation_host()->RemoveAnimationTimeline(animation_timeline_.get());
+ host_->animation_host()->RemoveAnimationTimeline(animation_timeline_.get());
// Stop all outstanding draws before telling the ContextFactory to tear
// down any contexts that the |host_| may rely upon.
@@ -206,7 +201,6 @@ void Compositor::SetRootLayer(Layer* root_layer) {
}
cc::AnimationTimeline* Compositor::GetAnimationTimeline() const {
- DCHECK(animation_timeline_);
return animation_timeline_.get();
}
« no previous file with comments | « content/test/web_layer_tree_view_impl_for_testing.cc ('k') | ui/compositor/compositor_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698