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

Side by Side Diff: ui/compositor/compositor.cc

Issue 2323123002: Make disable vsync run the renderer independently (Closed)
Patch Set: Rebase Created 4 years, 3 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/render_thread_impl.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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <deque> 10 #include <deque>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 settings.layers_always_allowed_lcd_text = true; 103 settings.layers_always_allowed_lcd_text = true;
104 // Use occlusion to allow more overlapping windows to take less memory. 104 // Use occlusion to allow more overlapping windows to take less memory.
105 settings.use_occlusion_for_tile_prioritization = true; 105 settings.use_occlusion_for_tile_prioritization = true;
106 settings.renderer_settings.refresh_rate = 106 settings.renderer_settings.refresh_rate =
107 context_factory_->DoesCreateTestContexts() ? kTestRefreshRate 107 context_factory_->DoesCreateTestContexts() ? kTestRefreshRate
108 : kDefaultRefreshRate; 108 : kDefaultRefreshRate;
109 settings.main_frame_before_activation_enabled = false; 109 settings.main_frame_before_activation_enabled = false;
110 if (command_line->HasSwitch(switches::kDisableGpuVsync)) { 110 if (command_line->HasSwitch(switches::kDisableGpuVsync)) {
111 std::string display_vsync_string = 111 std::string display_vsync_string =
112 command_line->GetSwitchValueASCII(switches::kDisableGpuVsync); 112 command_line->GetSwitchValueASCII(switches::kDisableGpuVsync);
113 if (display_vsync_string == "gpu") { 113 // See comments in gl_switches about this flag. The browser compositor
114 // is only unthrottled when "gpu" or no switch value is passed, as it
115 // is driven directly by the display compositor.
116 if (display_vsync_string != "beginframe") {
114 settings.renderer_settings.disable_display_vsync = true; 117 settings.renderer_settings.disable_display_vsync = true;
115 } else if (display_vsync_string == "beginframe") {
116 settings.wait_for_beginframe_interval = false;
117 } else {
118 settings.renderer_settings.disable_display_vsync = true;
119 settings.wait_for_beginframe_interval = false;
120 } 118 }
121 } 119 }
122 settings.renderer_settings.partial_swap_enabled = 120 settings.renderer_settings.partial_swap_enabled =
123 !command_line->HasSwitch(switches::kUIDisablePartialSwap); 121 !command_line->HasSwitch(switches::kUIDisablePartialSwap);
124 #if defined(OS_WIN) 122 #if defined(OS_WIN)
125 settings.renderer_settings.finish_rendering_on_resize = true; 123 settings.renderer_settings.finish_rendering_on_resize = true;
126 #elif defined(OS_MACOSX) 124 #elif defined(OS_MACOSX)
127 settings.renderer_settings.release_overlay_resources_after_gpu_query = true; 125 settings.renderer_settings.release_overlay_resources_after_gpu_query = true;
128 #endif 126 #endif
129 settings.renderer_settings.gl_composited_texture_quad_border = 127 settings.renderer_settings.gl_composited_texture_quad_border =
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 observer_list_, 549 observer_list_,
552 OnCompositingLockStateChanged(this)); 550 OnCompositingLockStateChanged(this));
553 } 551 }
554 552
555 void Compositor::CancelCompositorLock() { 553 void Compositor::CancelCompositorLock() {
556 if (compositor_lock_) 554 if (compositor_lock_)
557 compositor_lock_->CancelLock(); 555 compositor_lock_->CancelLock();
558 } 556 }
559 557
560 } // namespace ui 558 } // namespace ui
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | ui/gl/gl_switches.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698