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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) { | 123 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) { |
124 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1, | 124 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1, |
125 std::numeric_limits<int>::max(), | 125 std::numeric_limits<int>::max(), |
126 &max_untiled_layer_height); | 126 &max_untiled_layer_height); |
127 } | 127 } |
128 | 128 |
129 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, | 129 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, |
130 max_untiled_layer_height); | 130 max_untiled_layer_height); |
131 | 131 |
132 settings.impl_side_painting = cc::switches::IsImplSidePaintingEnabled(); | 132 settings.impl_side_painting = cc::switches::IsImplSidePaintingEnabled(); |
133 settings.gpu_rasterization = cc::switches::IsGPURasterizationEnabled(); | 133 settings.gpu_rasterization = |
| 134 cmd->HasSwitch(cc::switches::kEnableGPURasterization); |
134 | 135 |
135 settings.calculate_top_controls_position = | 136 settings.calculate_top_controls_position = |
136 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); | 137 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); |
137 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { | 138 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { |
138 std::string controls_height_str = | 139 std::string controls_height_str = |
139 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); | 140 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); |
140 double controls_height; | 141 double controls_height; |
141 if (base::StringToDouble(controls_height_str, &controls_height) && | 142 if (base::StringToDouble(controls_height_str, &controls_height) && |
142 controls_height > 0) | 143 controls_height > 0) |
143 settings.top_controls_height = controls_height; | 144 settings.top_controls_height = controls_height; |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 widget_->OnSwapBuffersAborted(); | 637 widget_->OnSwapBuffersAborted(); |
637 } | 638 } |
638 | 639 |
639 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 640 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
640 cc::ContextProvider* provider = | 641 cc::ContextProvider* provider = |
641 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 642 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
642 provider->Context3d()->rateLimitOffscreenContextCHROMIUM(); | 643 provider->Context3d()->rateLimitOffscreenContextCHROMIUM(); |
643 } | 644 } |
644 | 645 |
645 } // namespace content | 646 } // namespace content |
OLD | NEW |