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

Side by Side Diff: ui/compositor/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: hope to be final patch 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
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/gl/gl_switches.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 cc::LayerTreeSettings settings; 86 cc::LayerTreeSettings settings;
87 87
88 // When impl-side painting is enabled, this will ensure PictureLayers always 88 // When impl-side painting is enabled, this will ensure PictureLayers always
89 // can have LCD text, to match the previous behaviour with ContentLayers, 89 // can have LCD text, to match the previous behaviour with ContentLayers,
90 // where LCD-not-allowed notifications were ignored. 90 // where LCD-not-allowed notifications were ignored.
91 settings.layers_always_allowed_lcd_text = true; 91 settings.layers_always_allowed_lcd_text = true;
92 settings.renderer_settings.refresh_rate = 92 settings.renderer_settings.refresh_rate =
93 context_factory_->DoesCreateTestContexts() ? kTestRefreshRate 93 context_factory_->DoesCreateTestContexts() ? kTestRefreshRate
94 : kDefaultRefreshRate; 94 : kDefaultRefreshRate;
95 settings.main_frame_before_activation_enabled = false; 95 settings.main_frame_before_activation_enabled = false;
96 settings.renderer_settings.disable_gpu_vsync = 96 if (command_line->HasSwitch(switches::kDisableGpuVsync)) {
97 command_line->HasSwitch(switches::kDisableGpuVsync); 97 std::string display_vsync_string =
98 command_line->GetSwitchValueASCII(switches::kDisableGpuVsync);
99 if (display_vsync_string == "gpu") {
100 settings.renderer_settings.disable_display_vsync = true;
101 } else if (display_vsync_string == "beginframe") {
102 settings.wait_for_beginframe_interval = false;
103 } else {
104 settings.renderer_settings.disable_display_vsync = true;
105 settings.wait_for_beginframe_interval = false;
106 }
107 }
98 settings.renderer_settings.partial_swap_enabled = 108 settings.renderer_settings.partial_swap_enabled =
99 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); 109 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap);
100 #if defined(OS_WIN) 110 #if defined(OS_WIN)
101 settings.renderer_settings.finish_rendering_on_resize = true; 111 settings.renderer_settings.finish_rendering_on_resize = true;
102 #endif 112 #endif
103 113
104 // These flags should be mirrored by renderer versions in content/renderer/. 114 // These flags should be mirrored by renderer versions in content/renderer/.
105 settings.initial_debug_state.show_debug_borders = 115 settings.initial_debug_state.show_debug_borders =
106 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); 116 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders);
107 settings.initial_debug_state.show_fps_counter = 117 settings.initial_debug_state.show_fps_counter =
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 observer_list_, 458 observer_list_,
449 OnCompositingLockStateChanged(this)); 459 OnCompositingLockStateChanged(this));
450 } 460 }
451 461
452 void Compositor::CancelCompositorLock() { 462 void Compositor::CancelCompositorLock() {
453 if (compositor_lock_) 463 if (compositor_lock_)
454 compositor_lock_->CancelLock(); 464 compositor_lock_->CancelLock();
455 } 465 }
456 466
457 } // namespace ui 467 } // namespace ui
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/gl/gl_switches.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698