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

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

Issue 1177383005: cc: Add command line for frame production throttle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 5 years, 5 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
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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 void RenderWidgetCompositor::Initialize() { 218 void RenderWidgetCompositor::Initialize() {
219 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); 219 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
220 220
221 cc::LayerTreeSettings settings; 221 cc::LayerTreeSettings settings;
222 222
223 // For web contents, layer transforms should scale up the contents of layers 223 // For web contents, layer transforms should scale up the contents of layers
224 // to keep content always crisp when possible. 224 // to keep content always crisp when possible.
225 settings.layer_transforms_should_scale_layer_contents = true; 225 settings.layer_transforms_should_scale_layer_contents = true;
226 226
227 settings.renderer_settings.disable_gpu_vsync = 227 settings.renderer_settings.disable_display_vsync =
danakj 2015/07/01 19:47:23 wow is this confusing. we have 2 flags that you c
brianderson 2015/07/01 20:51:57 From a code readability perspective, I agree it's
228 cmd->HasSwitch(switches::kDisableGpuVsync); 228 (cmd->HasSwitch(switches::kDisableGpuVsync) ||
229 cmd->HasSwitch(switches::kDisableDisplayVsync));
230 settings.throttle_frame_production =
231 !(cmd->HasSwitch(switches::kDisableGpuVsync) ||
232 cmd->HasSwitch(cc::switches::kDisableBeginFrameInterval));
233
229 settings.main_frame_before_activation_enabled = 234 settings.main_frame_before_activation_enabled =
230 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) && 235 cmd->HasSwitch(cc::switches::kEnableMainFrameBeforeActivation) &&
231 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation); 236 !cmd->HasSwitch(cc::switches::kDisableMainFrameBeforeActivation);
232 settings.report_overscroll_only_for_scrollable_axes = 237 settings.report_overscroll_only_for_scrollable_axes =
233 !compositor_deps_->IsElasticOverscrollEnabled(); 238 !compositor_deps_->IsElasticOverscrollEnabled();
234 settings.accelerated_animation_enabled = 239 settings.accelerated_animation_enabled =
235 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); 240 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation);
236 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint); 241 settings.use_display_lists = cmd->HasSwitch(switches::kEnableSlimmingPaint);
237 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) { 242 if (cmd->HasSwitch(switches::kEnableCompositorAnimationTimelines)) {
238 settings.use_compositor_animation_timelines = true; 243 settings.use_compositor_animation_timelines = true;
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 return; 1006 return;
1002 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 1007 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
1003 } 1008 }
1004 1009
1005 void RenderWidgetCompositor::SetSurfaceIdNamespace( 1010 void RenderWidgetCompositor::SetSurfaceIdNamespace(
1006 uint32_t surface_id_namespace) { 1011 uint32_t surface_id_namespace) {
1007 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); 1012 layer_tree_host_->set_surface_id_namespace(surface_id_namespace);
1008 } 1013 }
1009 1014
1010 } // namespace content 1015 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698