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

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

Issue 168183004: Turn on GPU rasterization when --enable-bleeding-edge-rendering-fast-paths is true. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed per comments. Created 6 years, 10 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 | « no previous file | no next file » | 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) { 120 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) {
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 =
131 cc::switches::IsGpuRasterizationEnabled() ||
132 cmd->HasSwitch(switches::kEnableBleedingEdgeRenderingFastPaths);
131 133
132 settings.calculate_top_controls_position = 134 settings.calculate_top_controls_position =
133 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); 135 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation);
134 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { 136 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) {
135 std::string controls_height_str = 137 std::string controls_height_str =
136 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); 138 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight);
137 double controls_height; 139 double controls_height;
138 if (base::StringToDouble(controls_height_str, &controls_height) && 140 if (base::StringToDouble(controls_height_str, &controls_height) &&
139 controls_height > 0) 141 controls_height > 0)
140 settings.top_controls_height = controls_height; 142 settings.top_controls_height = controls_height;
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 widget_->OnSwapBuffersAborted(); 634 widget_->OnSwapBuffersAborted();
633 } 635 }
634 636
635 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { 637 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() {
636 cc::ContextProvider* provider = 638 cc::ContextProvider* provider =
637 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); 639 RenderThreadImpl::current()->SharedMainThreadContextProvider().get();
638 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 640 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
639 } 641 }
640 642
641 } // namespace content 643 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698