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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 max_untiled_layer_height); | 134 max_untiled_layer_height); |
135 | 135 |
136 settings.impl_side_painting = | 136 settings.impl_side_painting = |
137 RenderThreadImpl::current()->is_impl_side_painting_enabled(); | 137 RenderThreadImpl::current()->is_impl_side_painting_enabled(); |
138 if (RenderThreadImpl::current()->is_gpu_rasterization_forced()) | 138 if (RenderThreadImpl::current()->is_gpu_rasterization_forced()) |
139 settings.rasterization_site = cc::LayerTreeSettings::GpuRasterization; | 139 settings.rasterization_site = cc::LayerTreeSettings::GpuRasterization; |
140 else if (RenderThreadImpl::current()->is_gpu_rasterization_enabled()) | 140 else if (RenderThreadImpl::current()->is_gpu_rasterization_enabled()) |
141 settings.rasterization_site = cc::LayerTreeSettings::HybridRasterization; | 141 settings.rasterization_site = cc::LayerTreeSettings::HybridRasterization; |
142 else | 142 else |
143 settings.rasterization_site = cc::LayerTreeSettings::CpuRasterization; | 143 settings.rasterization_site = cc::LayerTreeSettings::CpuRasterization; |
| 144 settings.create_low_res_tiling = |
| 145 RenderThreadImpl::current()->is_low_res_tiling_enabled(); |
144 | 146 |
145 settings.calculate_top_controls_position = | 147 settings.calculate_top_controls_position = |
146 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); | 148 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); |
147 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { | 149 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { |
148 std::string controls_height_str = | 150 std::string controls_height_str = |
149 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); | 151 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); |
150 double controls_height; | 152 double controls_height; |
151 if (base::StringToDouble(controls_height_str, &controls_height) && | 153 if (base::StringToDouble(controls_height_str, &controls_height) && |
152 controls_height > 0) | 154 controls_height > 0) |
153 settings.top_controls_height = controls_height; | 155 settings.top_controls_height = controls_height; |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 widget_->OnSwapBuffersAborted(); | 645 widget_->OnSwapBuffersAborted(); |
644 } | 646 } |
645 | 647 |
646 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 648 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
647 cc::ContextProvider* provider = | 649 cc::ContextProvider* provider = |
648 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 650 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
649 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 651 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
650 } | 652 } |
651 | 653 |
652 } // namespace content | 654 } // namespace content |
OLD | NEW |