| 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 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, | 123 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, |
| 124 max_untiled_layer_height); | 124 max_untiled_layer_height); |
| 125 | 125 |
| 126 settings.right_aligned_scheduling_enabled = | 126 settings.right_aligned_scheduling_enabled = |
| 127 cmd->HasSwitch(cc::switches::kEnableRightAlignedScheduling); | 127 cmd->HasSwitch(cc::switches::kEnableRightAlignedScheduling); |
| 128 settings.impl_side_painting = cc::switches::IsImplSidePaintingEnabled(); | 128 settings.impl_side_painting = cc::switches::IsImplSidePaintingEnabled(); |
| 129 settings.use_cheapness_estimator = | 129 settings.use_cheapness_estimator = |
| 130 !cmd->HasSwitch(cc::switches::kDisableCheapnessEstimator); | 130 !cmd->HasSwitch(cc::switches::kDisableCheapnessEstimator); |
| 131 settings.use_color_estimator = | 131 settings.use_color_estimator = |
| 132 !cmd->HasSwitch(cc::switches::kDisableColorEstimator); | 132 cmd->HasSwitch(cc::switches::kUseColorEstimator); |
| 133 settings.prediction_benchmarking = | 133 settings.prediction_benchmarking = |
| 134 cmd->HasSwitch(cc::switches::kEnablePredictionBenchmarking); | 134 cmd->HasSwitch(cc::switches::kEnablePredictionBenchmarking); |
| 135 | 135 |
| 136 settings.calculate_top_controls_position = | 136 settings.calculate_top_controls_position = |
| 137 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); | 137 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); |
| 138 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { | 138 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { |
| 139 std::string controls_height_str = | 139 std::string controls_height_str = |
| 140 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); | 140 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); |
| 141 double controls_height; | 141 double controls_height; |
| 142 if (base::StringToDouble(controls_height_str, &controls_height) && | 142 if (base::StringToDouble(controls_height_str, &controls_height) && |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 515 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 516 } | 516 } |
| 517 | 517 |
| 518 scoped_refptr<cc::ContextProvider> | 518 scoped_refptr<cc::ContextProvider> |
| 519 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 519 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 520 return RenderThreadImpl::current()-> | 520 return RenderThreadImpl::current()-> |
| 521 OffscreenContextProviderForCompositorThread(); | 521 OffscreenContextProviderForCompositorThread(); |
| 522 } | 522 } |
| 523 | 523 |
| 524 } // namespace content | 524 } // namespace content |
| OLD | NEW |