Index: content/renderer/gpu/render_widget_compositor.cc |
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc |
index 82e555b9d7e8d5d0914c39327709519759033985..c1ef5e0a9876e2e84eb6f54be312ff2b1e7cc7b4 100644 |
--- a/content/renderer/gpu/render_widget_compositor.cc |
+++ b/content/renderer/gpu/render_widget_compositor.cc |
@@ -41,6 +41,7 @@ |
#include "cc/trees/latency_info_swap_promise_monitor.h" |
#include "cc/trees/layer_tree_host.h" |
#include "cc/trees/remote_proto_channel.h" |
+#include "content/common/compositor_util.h" |
#include "content/common/content_switches_internal.h" |
#include "content/common/gpu/client/context_provider_command_buffer.h" |
#include "content/public/common/content_client.h" |
@@ -344,14 +345,8 @@ cc::LayerTreeSettings RenderWidgetCompositor::GenerateLayerTreeSettings( |
settings.image_decode_tasks_enabled = |
compositor_deps->AreImageDecodeTasksEnabled(); |
- if (cmd.HasSwitch(cc::switches::kTopControlsShowThreshold)) { |
- std::string top_threshold_str = |
- cmd.GetSwitchValueASCII(cc::switches::kTopControlsShowThreshold); |
- double show_threshold; |
- if (base::StringToDouble(top_threshold_str, &show_threshold) && |
- show_threshold >= 0.f && show_threshold <= 1.f) |
- settings.top_controls_show_threshold = show_threshold; |
- } |
+ // Build LayerTreeSettings from command line args. |
+ CompositorUtil::GenerateLayerTreeSettings(settings, cmd); |
Khushal
2016/08/29 20:21:14
Do you want to just call it SetTopControlsSettings
xingliu
2016/08/29 20:44:33
Done.
|
if (cmd.HasSwitch(cc::switches::kTopControlsHideThreshold)) { |
std::string top_threshold_str = |