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

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: Make commit waiting states explicit Created 6 years, 10 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 CommandLine* command_line = CommandLine::ForCurrentProcess(); 203 CommandLine* command_line = CommandLine::ForCurrentProcess();
204 204
205 cc::LayerTreeSettings settings; 205 cc::LayerTreeSettings settings;
206 settings.refresh_rate = 206 settings.refresh_rate =
207 ContextFactory::GetInstance()->DoesCreateTestContexts() 207 ContextFactory::GetInstance()->DoesCreateTestContexts()
208 ? kTestRefreshRate 208 ? kTestRefreshRate
209 : kDefaultRefreshRate; 209 : kDefaultRefreshRate;
210 settings.deadline_scheduling_enabled = 210 settings.deadline_scheduling_enabled =
211 switches::IsUIDeadlineSchedulingEnabled(); 211 switches::IsUIDeadlineSchedulingEnabled();
212 settings.start_commit_before_draw_enabled =
213 cc::switches::IsStartCommitBeforeDrawEnabled();
214 settings.start_commit_before_activate_enabled =
215 cc::switches::IsStartCommitBeforeActivateEnabled();
212 settings.partial_swap_enabled = 216 settings.partial_swap_enabled =
213 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); 217 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap);
214 settings.per_tile_painting_enabled = 218 settings.per_tile_painting_enabled =
215 command_line->HasSwitch(cc::switches::kUIEnablePerTilePainting); 219 command_line->HasSwitch(cc::switches::kUIEnablePerTilePainting);
216 220
217 // These flags should be mirrored by renderer versions in content/renderer/. 221 // These flags should be mirrored by renderer versions in content/renderer/.
218 settings.initial_debug_state.show_debug_borders = 222 settings.initial_debug_state.show_debug_borders =
219 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); 223 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders);
220 settings.initial_debug_state.show_fps_counter = 224 settings.initial_debug_state.show_fps_counter =
221 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); 225 command_line->HasSwitch(cc::switches::kUIShowFPSCounter);
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 // CompositorObservers to be notified before starting another 561 // CompositorObservers to be notified before starting another
558 // draw cycle. 562 // draw cycle.
559 ScheduleDraw(); 563 ScheduleDraw();
560 } 564 }
561 FOR_EACH_OBSERVER(CompositorObserver, 565 FOR_EACH_OBSERVER(CompositorObserver,
562 observer_list_, 566 observer_list_,
563 OnCompositingEnded(this)); 567 OnCompositingEnded(this));
564 } 568 }
565 569
566 } // namespace ui 570 } // namespace ui
OLDNEW
« cc/scheduler/scheduler_state_machine.cc ('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