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