| 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 std::string top_threshold_str = | 324 std::string top_threshold_str = |
| 325 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHideThreshold); | 325 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHideThreshold); |
| 326 double hide_threshold; | 326 double hide_threshold; |
| 327 if (base::StringToDouble(top_threshold_str, &hide_threshold) && | 327 if (base::StringToDouble(top_threshold_str, &hide_threshold) && |
| 328 hide_threshold >= 0.f && hide_threshold <= 1.f) | 328 hide_threshold >= 0.f && hide_threshold <= 1.f) |
| 329 settings.top_controls_hide_threshold = hide_threshold; | 329 settings.top_controls_hide_threshold = hide_threshold; |
| 330 } | 330 } |
| 331 | 331 |
| 332 settings.verify_property_trees = | 332 settings.verify_property_trees = |
| 333 cmd->HasSwitch(cc::switches::kEnablePropertyTreeVerification); | 333 cmd->HasSwitch(cc::switches::kEnablePropertyTreeVerification); |
| 334 settings.use_property_trees = | 334 if (cmd->HasSwitch(cc::switches::kDisableCompositorPropertyTrees)) |
| 335 cmd->HasSwitch(cc::switches::kEnableCompositorPropertyTrees); | 335 settings.use_property_trees = false; |
| 336 settings.renderer_settings.allow_antialiasing &= | 336 settings.renderer_settings.allow_antialiasing &= |
| 337 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); | 337 !cmd->HasSwitch(cc::switches::kDisableCompositedAntialiasing); |
| 338 // The means the renderer compositor has 2 possible modes: | 338 // The means the renderer compositor has 2 possible modes: |
| 339 // - Threaded compositing with a scheduler. | 339 // - Threaded compositing with a scheduler. |
| 340 // - Single threaded compositing without a scheduler (for layout tests only). | 340 // - Single threaded compositing without a scheduler (for layout tests only). |
| 341 // Using the scheduler in layout tests introduces additional composite steps | 341 // Using the scheduler in layout tests introduces additional composite steps |
| 342 // that create flakiness. | 342 // that create flakiness. |
| 343 settings.single_thread_proxy_scheduler = false; | 343 settings.single_thread_proxy_scheduler = false; |
| 344 | 344 |
| 345 // These flags should be mirrored by UI versions in ui/compositor/. | 345 // These flags should be mirrored by UI versions in ui/compositor/. |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 #endif | 1116 #endif |
| 1117 return actual; | 1117 return actual; |
| 1118 } | 1118 } |
| 1119 | 1119 |
| 1120 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( | 1120 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( |
| 1121 float device_scale) { | 1121 float device_scale) { |
| 1122 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); | 1122 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 } // namespace content | 1125 } // namespace content |
| OLD | NEW |