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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 settings.impl_side_painting = | 141 settings.impl_side_painting = |
142 render_thread->is_impl_side_painting_enabled(); | 142 render_thread->is_impl_side_painting_enabled(); |
143 if (render_thread->is_gpu_rasterization_forced()) | 143 if (render_thread->is_gpu_rasterization_forced()) |
144 settings.rasterization_site = cc::LayerTreeSettings::GpuRasterization; | 144 settings.rasterization_site = cc::LayerTreeSettings::GpuRasterization; |
145 else if (render_thread->is_gpu_rasterization_enabled()) | 145 else if (render_thread->is_gpu_rasterization_enabled()) |
146 settings.rasterization_site = cc::LayerTreeSettings::HybridRasterization; | 146 settings.rasterization_site = cc::LayerTreeSettings::HybridRasterization; |
147 else | 147 else |
148 settings.rasterization_site = cc::LayerTreeSettings::CpuRasterization; | 148 settings.rasterization_site = cc::LayerTreeSettings::CpuRasterization; |
149 settings.create_low_res_tiling = render_thread->is_low_res_tiling_enabled(); | 149 settings.create_low_res_tiling = render_thread->is_low_res_tiling_enabled(); |
150 settings.can_use_lcd_text = render_thread->is_lcd_text_enabled(); | 150 settings.can_use_lcd_text = render_thread->is_lcd_text_enabled(); |
151 settings.use_map_image = render_thread->is_map_image_enabled(); | 151 settings.use_zero_copy = render_thread->is_zero_copy_enabled(); |
| 152 settings.use_one_copy = render_thread->is_one_copy_enabled(); |
152 } | 153 } |
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) |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 widget_->OnSwapBuffersAborted(); | 657 widget_->OnSwapBuffersAborted(); |
657 } | 658 } |
658 | 659 |
659 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { | 660 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { |
660 cc::ContextProvider* provider = | 661 cc::ContextProvider* provider = |
661 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 662 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
662 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 663 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
663 } | 664 } |
664 | 665 |
665 } // namespace content | 666 } // namespace content |
OLD | NEW |