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

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

Issue 881513004: Add a command-line flag to set GPU rasterization multisampling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cache msaa sample count to avoid double-parsing it. Created 5 years, 11 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
« no previous file with comments | « content/renderer/gpu/compositor_dependencies.h ('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 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 int max_untiled_layer_height = settings.max_untiled_layer_size.height(); 225 int max_untiled_layer_height = settings.max_untiled_layer_size.height();
226 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) { 226 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) {
227 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1, 227 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1,
228 std::numeric_limits<int>::max(), 228 std::numeric_limits<int>::max(),
229 &max_untiled_layer_height); 229 &max_untiled_layer_height);
230 } 230 }
231 231
232 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, 232 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width,
233 max_untiled_layer_height); 233 max_untiled_layer_height);
234 234
235 settings.gpu_rasterization_msaa_sample_count =
236 compositor_deps_->GetGpuRasterizationMSAASampleCount();
235 settings.impl_side_painting = compositor_deps_->IsImplSidePaintingEnabled(); 237 settings.impl_side_painting = compositor_deps_->IsImplSidePaintingEnabled();
236 settings.gpu_rasterization_forced = 238 settings.gpu_rasterization_forced =
237 compositor_deps_->IsGpuRasterizationForced(); 239 compositor_deps_->IsGpuRasterizationForced();
238 settings.gpu_rasterization_enabled = 240 settings.gpu_rasterization_enabled =
239 compositor_deps_->IsGpuRasterizationEnabled(); 241 compositor_deps_->IsGpuRasterizationEnabled();
240 settings.can_use_lcd_text = compositor_deps_->IsLcdTextEnabled(); 242 settings.can_use_lcd_text = compositor_deps_->IsLcdTextEnabled();
241 settings.use_distance_field_text = 243 settings.use_distance_field_text =
242 compositor_deps_->IsDistanceFieldTextEnabled(); 244 compositor_deps_->IsDistanceFieldTextEnabled();
243 settings.use_zero_copy = compositor_deps_->IsZeroCopyEnabled(); 245 settings.use_zero_copy = compositor_deps_->IsZeroCopyEnabled();
244 settings.use_one_copy = compositor_deps_->IsOneCopyEnabled(); 246 settings.use_one_copy = compositor_deps_->IsOneCopyEnabled();
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 widget_->OnSwapBuffersAborted(); 872 widget_->OnSwapBuffersAborted();
871 } 873 }
872 874
873 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() { 875 void RenderWidgetCompositor::RateLimitSharedMainThreadContext() {
874 cc::ContextProvider* provider = 876 cc::ContextProvider* provider =
875 compositor_deps_->GetSharedMainThreadContextProvider(); 877 compositor_deps_->GetSharedMainThreadContextProvider();
876 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 878 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
877 } 879 }
878 880
879 } // namespace content 881 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/compositor_dependencies.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698