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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1, | 121 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1, |
122 std::numeric_limits<int>::max(), | 122 std::numeric_limits<int>::max(), |
123 &max_untiled_layer_height); | 123 &max_untiled_layer_height); |
124 } | 124 } |
125 | 125 |
126 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, | 126 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, |
127 max_untiled_layer_height); | 127 max_untiled_layer_height); |
128 | 128 |
129 settings.impl_side_painting = cc::switches::IsImplSidePaintingEnabled(); | 129 settings.impl_side_painting = cc::switches::IsImplSidePaintingEnabled(); |
130 settings.gpu_rasterization = cc::switches::IsGpuRasterizationEnabled(); | 130 settings.gpu_rasterization = cc::switches::IsGpuRasterizationEnabled(); |
| 131 settings.low_res_tiling = cc::switches::IsLowResTilingEnabled(); |
131 | 132 |
132 settings.calculate_top_controls_position = | 133 settings.calculate_top_controls_position = |
133 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); | 134 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); |
134 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { | 135 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { |
135 std::string controls_height_str = | 136 std::string controls_height_str = |
136 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); | 137 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); |
137 double controls_height; | 138 double controls_height; |
138 if (base::StringToDouble(controls_height_str, &controls_height) && | 139 if (base::StringToDouble(controls_height_str, &controls_height) && |
139 controls_height > 0) | 140 controls_height > 0) |
140 settings.top_controls_height = controls_height; | 141 settings.top_controls_height = controls_height; |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 widget_->OnSwapBuffersAborted(); | 633 widget_->OnSwapBuffersAborted(); |
633 } | 634 } |
634 | 635 |
635 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 636 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
636 cc::ContextProvider* provider = | 637 cc::ContextProvider* provider = |
637 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 638 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
638 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 639 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
639 } | 640 } |
640 | 641 |
641 } // namespace content | 642 } // namespace content |
OLD | NEW |