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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 max_untiled_layer_height); | 127 max_untiled_layer_height); |
128 | 128 |
129 settings.impl_side_painting = | 129 settings.impl_side_painting = |
130 RenderThreadImpl::current()->is_impl_side_painting_enabled(); | 130 RenderThreadImpl::current()->is_impl_side_painting_enabled(); |
131 if (RenderThreadImpl::current()->is_gpu_rasterization_forced()) | 131 if (RenderThreadImpl::current()->is_gpu_rasterization_forced()) |
132 settings.rasterization_site = cc::LayerTreeSettings::GpuRasterization; | 132 settings.rasterization_site = cc::LayerTreeSettings::GpuRasterization; |
133 else if (RenderThreadImpl::current()->is_gpu_rasterization_enabled()) | 133 else if (RenderThreadImpl::current()->is_gpu_rasterization_enabled()) |
134 settings.rasterization_site = cc::LayerTreeSettings::HybridRasterization; | 134 settings.rasterization_site = cc::LayerTreeSettings::HybridRasterization; |
135 else | 135 else |
136 settings.rasterization_site = cc::LayerTreeSettings::CpuRasterization; | 136 settings.rasterization_site = cc::LayerTreeSettings::CpuRasterization; |
| 137 settings.low_res_tiling = cc::switches::IsLowResTilingEnabled(); |
137 | 138 |
138 settings.calculate_top_controls_position = | 139 settings.calculate_top_controls_position = |
139 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); | 140 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); |
140 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { | 141 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { |
141 std::string controls_height_str = | 142 std::string controls_height_str = |
142 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); | 143 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); |
143 double controls_height; | 144 double controls_height; |
144 if (base::StringToDouble(controls_height_str, &controls_height) && | 145 if (base::StringToDouble(controls_height_str, &controls_height) && |
145 controls_height > 0) | 146 controls_height > 0) |
146 settings.top_controls_height = controls_height; | 147 settings.top_controls_height = controls_height; |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 widget_->OnSwapBuffersAborted(); | 636 widget_->OnSwapBuffersAborted(); |
636 } | 637 } |
637 | 638 |
638 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 639 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
639 cc::ContextProvider* provider = | 640 cc::ContextProvider* provider = |
640 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 641 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
641 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 642 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
642 } | 643 } |
643 | 644 |
644 } // namespace content | 645 } // namespace content |
OLD | NEW |