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

Unified Diff: ui/compositor/compositor.cc

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-work Android LayerSettings. 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
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;

Powered by Google App Engine
This is Rietveld 408576698