OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 std::string top_threshold_str = | 318 std::string top_threshold_str = |
319 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHideThreshold); | 319 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHideThreshold); |
320 double hide_threshold; | 320 double hide_threshold; |
321 if (base::StringToDouble(top_threshold_str, &hide_threshold) && | 321 if (base::StringToDouble(top_threshold_str, &hide_threshold) && |
322 hide_threshold >= 0.f && hide_threshold <= 1.f) | 322 hide_threshold >= 0.f && hide_threshold <= 1.f) |
323 settings.top_controls_hide_threshold = hide_threshold; | 323 settings.top_controls_hide_threshold = hide_threshold; |
324 } | 324 } |
325 | 325 |
326 settings.verify_property_trees = | 326 settings.verify_property_trees = |
327 cmd->HasSwitch(cc::switches::kEnablePropertyTreeVerification); | 327 cmd->HasSwitch(cc::switches::kEnablePropertyTreeVerification); |
| 328 settings.use_property_trees = |
| 329 cmd->HasSwitch(cc::switches::kEnableCompositorPropertyTrees); |
328 settings.renderer_settings.allow_antialiasing &= | 330 settings.renderer_settings.allow_antialiasing &= |
329 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); | 331 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); |
330 // The means the renderer compositor has 2 possible modes: | 332 // The means the renderer compositor has 2 possible modes: |
331 // - Threaded compositing with a scheduler. | 333 // - Threaded compositing with a scheduler. |
332 // - Single threaded compositing without a scheduler (for layout tests only). | 334 // - Single threaded compositing without a scheduler (for layout tests only). |
333 // Using the scheduler in layout tests introduces additional composite steps | 335 // Using the scheduler in layout tests introduces additional composite steps |
334 // that create flakiness. | 336 // that create flakiness. |
335 settings.single_thread_proxy_scheduler = false; | 337 settings.single_thread_proxy_scheduler = false; |
336 | 338 |
337 // These flags should be mirrored by UI versions in ui/compositor/. | 339 // These flags should be mirrored by UI versions in ui/compositor/. |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 #endif | 1081 #endif |
1080 return actual; | 1082 return actual; |
1081 } | 1083 } |
1082 | 1084 |
1083 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( | 1085 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( |
1084 float device_scale) { | 1086 float device_scale) { |
1085 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); | 1087 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); |
1086 } | 1088 } |
1087 | 1089 |
1088 } // namespace content | 1090 } // namespace content |
OLD | NEW |