Index: ui/compositor/compositor.cc |
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc |
index f80b75fe298d605fc960165d0c257b4659733907..34d04190fe54a92021f1b7cf16f867e9022e91df 100644 |
--- a/ui/compositor/compositor.cc |
+++ b/ui/compositor/compositor.cc |
@@ -81,11 +81,21 @@ Compositor::Compositor(gfx::AcceleratedWidget widget, |
compositor_lock_(NULL), |
layer_animator_collection_(this), |
weak_ptr_factory_(this) { |
- root_web_layer_ = cc::Layer::Create(); |
- |
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
cc::LayerTreeSettings settings; |
+ |
+ cc::LayerSettings ui_layer_settings; |
+ if (command_line->HasSwitch( |
+ switches::kUIEnableCompositorAnimationTimelines)) { |
+ ui_layer_settings.use_compositor_animation_timelines = true; |
+ } |
+ Layer::SetUILayerSettings(ui_layer_settings); |
piman
2015/05/12 20:06:54
I think we should do this initialization only once
loyso (OOO)
2015/05/19 04:21:48
Done.
|
+ |
+ settings.hud_layer_settings = Layer::UILayerSettings(); |
+ |
+ root_web_layer_ = cc::Layer::Create(Layer::UILayerSettings()); |
+ |
// When impl-side painting is enabled, this will ensure PictureLayers always |
// can have LCD text, to match the previous behaviour with ContentLayers, |
// where LCD-not-allowed notifications were ignored. |
@@ -136,9 +146,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(); |
cc::LayerTreeHost::InitParams params; |