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

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: Block main thread from state machine; remove completion event; Created 7 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
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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 379
380 CommandLine* command_line = CommandLine::ForCurrentProcess(); 380 CommandLine* command_line = CommandLine::ForCurrentProcess();
381 381
382 cc::LayerTreeSettings settings; 382 cc::LayerTreeSettings settings;
383 settings.refresh_rate = 383 settings.refresh_rate =
384 ContextFactory::GetInstance()->DoesCreateTestContexts() 384 ContextFactory::GetInstance()->DoesCreateTestContexts()
385 ? kTestRefreshRate 385 ? kTestRefreshRate
386 : kDefaultRefreshRate; 386 : kDefaultRefreshRate;
387 settings.deadline_scheduling_enabled = 387 settings.deadline_scheduling_enabled =
388 cc::switches::IsDeadlineSchedulingEnabled(); 388 cc::switches::IsDeadlineSchedulingEnabled();
389 settings.start_commit_before_draw_enabled =
390 cc::switches::IsStartCommitBeforeDrawEnabled();
391 settings.start_commit_before_activate_enabled =
392 cc::switches::IsStartCommitBeforeActivateEnabled();
389 settings.partial_swap_enabled = 393 settings.partial_swap_enabled =
390 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap); 394 !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap);
391 settings.per_tile_painting_enabled = 395 settings.per_tile_painting_enabled =
392 command_line->HasSwitch(cc::switches::kUIEnablePerTilePainting); 396 command_line->HasSwitch(cc::switches::kUIEnablePerTilePainting);
393 397
394 // These flags should be mirrored by renderer versions in content/renderer/. 398 // These flags should be mirrored by renderer versions in content/renderer/.
395 settings.initial_debug_state.show_debug_borders = 399 settings.initial_debug_state.show_debug_borders =
396 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders); 400 command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders);
397 settings.initial_debug_state.show_fps_counter = 401 settings.initial_debug_state.show_fps_counter =
398 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); 402 command_line->HasSwitch(cc::switches::kUIShowFPSCounter);
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 } 774 }
771 775
772 void Compositor::NotifyEnd() { 776 void Compositor::NotifyEnd() {
773 last_ended_frame_++; 777 last_ended_frame_++;
774 FOR_EACH_OBSERVER(CompositorObserver, 778 FOR_EACH_OBSERVER(CompositorObserver,
775 observer_list_, 779 observer_list_,
776 OnCompositingEnded(this)); 780 OnCompositingEnded(this));
777 } 781 }
778 782
779 } // namespace ui 783 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698