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

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

Issue 23907006: cc: Allow sending BeginMainFrame before draw or activation (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedDeadline3
Patch Set: Fix smoothness mode Created 6 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
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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 CommandLine* command_line = CommandLine::ForCurrentProcess(); 256 CommandLine* command_line = CommandLine::ForCurrentProcess();
257 257
258 cc::LayerTreeSettings settings; 258 cc::LayerTreeSettings settings;
259 settings.refresh_rate = 259 settings.refresh_rate =
260 ContextFactory::GetInstance()->DoesCreateTestContexts() 260 ContextFactory::GetInstance()->DoesCreateTestContexts()
261 ? kTestRefreshRate 261 ? kTestRefreshRate
262 : kDefaultRefreshRate; 262 : kDefaultRefreshRate;
263 settings.deadline_scheduling_enabled = 263 settings.deadline_scheduling_enabled =
264 switches::IsUIDeadlineSchedulingEnabled(); 264 switches::IsUIDeadlineSchedulingEnabled();
265 settings.start_commit_before_draw_enabled =
266 cc::switches::IsStartCommitBeforeDrawEnabled();
267 settings.start_commit_before_activate_enabled =
268 cc::switches::IsStartCommitBeforeActivateEnabled();
265 settings.partial_swap_enabled = 269 settings.partial_swap_enabled =
266 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); 270 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap);
267 settings.per_tile_painting_enabled = 271 settings.per_tile_painting_enabled =
268 command_line->HasSwitch(cc::switches::kUIEnablePerTilePainting); 272 command_line->HasSwitch(cc::switches::kUIEnablePerTilePainting);
269 273
270 // These flags should be mirrored by renderer versions in content/renderer/. 274 // These flags should be mirrored by renderer versions in content/renderer/.
271 settings.initial_debug_state.show_debug_borders = 275 settings.initial_debug_state.show_debug_borders =
272 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); 276 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders);
273 settings.initial_debug_state.show_fps_counter = 277 settings.initial_debug_state.show_fps_counter =
274 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); 278 command_line->HasSwitch(cc::switches::kUIShowFPSCounter);
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 // CompositorObservers to be notified before starting another 629 // CompositorObservers to be notified before starting another
626 // draw cycle. 630 // draw cycle.
627 ScheduleDraw(); 631 ScheduleDraw();
628 } 632 }
629 FOR_EACH_OBSERVER(CompositorObserver, 633 FOR_EACH_OBSERVER(CompositorObserver,
630 observer_list_, 634 observer_list_,
631 OnCompositingEnded(this)); 635 OnCompositingEnded(this));
632 } 636 }
633 637
634 } // namespace ui 638 } // namespace ui
OLDNEW
« cc/scheduler/scheduler_state_machine.h ('K') | « content/renderer/gpu/render_widget_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698