| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) { | 132 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) { |
| 133 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1, | 133 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1, |
| 134 std::numeric_limits<int>::max(), | 134 std::numeric_limits<int>::max(), |
| 135 &max_untiled_layer_height); | 135 &max_untiled_layer_height); |
| 136 } | 136 } |
| 137 | 137 |
| 138 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, | 138 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, |
| 139 max_untiled_layer_height); | 139 max_untiled_layer_height); |
| 140 | 140 |
| 141 settings.impl_side_painting = cc::switches::IsImplSidePaintingEnabled(); | 141 settings.impl_side_painting = cc::switches::IsImplSidePaintingEnabled(); |
| 142 settings.use_color_estimator = | |
| 143 !cmd->HasSwitch(cc::switches::kDisableColorEstimator); | |
| 144 | 142 |
| 145 settings.calculate_top_controls_position = | 143 settings.calculate_top_controls_position = |
| 146 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); | 144 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); |
| 147 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { | 145 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { |
| 148 std::string controls_height_str = | 146 std::string controls_height_str = |
| 149 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); | 147 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); |
| 150 double controls_height; | 148 double controls_height; |
| 151 if (base::StringToDouble(controls_height_str, &controls_height) && | 149 if (base::StringToDouble(controls_height_str, &controls_height) && |
| 152 controls_height > 0) | 150 controls_height > 0) |
| 153 settings.top_controls_height = controls_height; | 151 settings.top_controls_height = controls_height; |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 557 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 560 } | 558 } |
| 561 | 559 |
| 562 scoped_refptr<cc::ContextProvider> | 560 scoped_refptr<cc::ContextProvider> |
| 563 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 561 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 564 return RenderThreadImpl::current()-> | 562 return RenderThreadImpl::current()-> |
| 565 OffscreenContextProviderForCompositorThread(); | 563 OffscreenContextProviderForCompositorThread(); |
| 566 } | 564 } |
| 567 | 565 |
| 568 } // namespace content | 566 } // namespace content |
| OLD | NEW |