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(); |
} |