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 #if defined(OS_ANDROID) | 10 #if defined(OS_ANDROID) |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) { | 143 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) { |
144 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1, | 144 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1, |
145 std::numeric_limits<int>::max(), | 145 std::numeric_limits<int>::max(), |
146 &max_untiled_layer_height); | 146 &max_untiled_layer_height); |
147 } | 147 } |
148 | 148 |
149 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, | 149 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, |
150 max_untiled_layer_height); | 150 max_untiled_layer_height); |
151 | 151 |
152 settings.impl_side_painting = cc::switches::IsImplSidePaintingEnabled(); | 152 settings.impl_side_painting = cc::switches::IsImplSidePaintingEnabled(); |
| 153 settings.gpu_rasterizing = cc::switches::IsGpuRasterizingEnabled(); |
153 | 154 |
154 settings.calculate_top_controls_position = | 155 settings.calculate_top_controls_position = |
155 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); | 156 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); |
156 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { | 157 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { |
157 std::string controls_height_str = | 158 std::string controls_height_str = |
158 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); | 159 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); |
159 double controls_height; | 160 double controls_height; |
160 if (base::StringToDouble(controls_height_str, &controls_height) && | 161 if (base::StringToDouble(controls_height_str, &controls_height) && |
161 controls_height > 0) | 162 controls_height > 0) |
162 settings.top_controls_height = controls_height; | 163 settings.top_controls_height = controls_height; |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 widget_->OnSwapBuffersAborted(); | 664 widget_->OnSwapBuffersAborted(); |
664 } | 665 } |
665 | 666 |
666 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 667 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
667 cc::ContextProvider* provider = | 668 cc::ContextProvider* provider = |
668 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 669 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
669 provider->Context3d()->rateLimitOffscreenContextCHROMIUM(); | 670 provider->Context3d()->rateLimitOffscreenContextCHROMIUM(); |
670 } | 671 } |
671 | 672 |
672 } // namespace content | 673 } // namespace content |
OLD | NEW |