Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 236313006: cc: Add initial GPU-to-GPU copy rasterizer implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698