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

Side by Side Diff: cc/scheduler/scheduler.cc

Issue 285663003: cc: Remove redundant ActivatePendingTree method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/scheduler/scheduler.h" 5 #include "cc/scheduler/scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 void Scheduler::SetCanDraw(bool can_draw) { 152 void Scheduler::SetCanDraw(bool can_draw) {
153 state_machine_.SetCanDraw(can_draw); 153 state_machine_.SetCanDraw(can_draw);
154 ProcessScheduledActions(); 154 ProcessScheduledActions();
155 } 155 }
156 156
157 void Scheduler::NotifyReadyToActivate() { 157 void Scheduler::NotifyReadyToActivate() {
158 state_machine_.NotifyReadyToActivate(); 158 state_machine_.NotifyReadyToActivate();
159 ProcessScheduledActions(); 159 ProcessScheduledActions();
160 } 160 }
161 161
162 void Scheduler::ActivatePendingTree() {
163 client_->ScheduledActionActivatePendingTree();
164 }
165
166 void Scheduler::SetNeedsCommit() { 162 void Scheduler::SetNeedsCommit() {
167 state_machine_.SetNeedsCommit(); 163 state_machine_.SetNeedsCommit();
168 ProcessScheduledActions(); 164 ProcessScheduledActions();
169 } 165 }
170 166
171 void Scheduler::SetNeedsForcedCommitForReadback() { 167 void Scheduler::SetNeedsForcedCommitForReadback() {
172 state_machine_.SetNeedsForcedCommitForReadback(); 168 state_machine_.SetNeedsForcedCommitForReadback();
173 ProcessScheduledActions(); 169 ProcessScheduledActions();
174 } 170 }
175 171
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 case SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME: 636 case SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME:
641 client_->ScheduledActionSendBeginMainFrame(); 637 client_->ScheduledActionSendBeginMainFrame();
642 break; 638 break;
643 case SchedulerStateMachine::ACTION_COMMIT: 639 case SchedulerStateMachine::ACTION_COMMIT:
644 client_->ScheduledActionCommit(); 640 client_->ScheduledActionCommit();
645 break; 641 break;
646 case SchedulerStateMachine::ACTION_UPDATE_VISIBLE_TILES: 642 case SchedulerStateMachine::ACTION_UPDATE_VISIBLE_TILES:
647 client_->ScheduledActionUpdateVisibleTiles(); 643 client_->ScheduledActionUpdateVisibleTiles();
648 break; 644 break;
649 case SchedulerStateMachine::ACTION_ACTIVATE_PENDING_TREE: 645 case SchedulerStateMachine::ACTION_ACTIVATE_PENDING_TREE:
650 ActivatePendingTree(); 646 client_->ScheduledActionActivatePendingTree();
651 break; 647 break;
652 case SchedulerStateMachine::ACTION_DRAW_AND_SWAP_IF_POSSIBLE: 648 case SchedulerStateMachine::ACTION_DRAW_AND_SWAP_IF_POSSIBLE:
653 DrawAndSwapIfPossible(); 649 DrawAndSwapIfPossible();
654 break; 650 break;
655 case SchedulerStateMachine::ACTION_DRAW_AND_SWAP_FORCED: 651 case SchedulerStateMachine::ACTION_DRAW_AND_SWAP_FORCED:
656 client_->ScheduledActionDrawAndSwapForced(); 652 client_->ScheduledActionDrawAndSwapForced();
657 break; 653 break;
658 case SchedulerStateMachine::ACTION_DRAW_AND_SWAP_ABORT: 654 case SchedulerStateMachine::ACTION_DRAW_AND_SWAP_ABORT:
659 // No action is actually performed, but this allows the state machine to 655 // No action is actually performed, but this allows the state machine to
660 // advance out of its waiting to draw state without actually drawing. 656 // advance out of its waiting to draw state without actually drawing.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 } 744 }
749 745
750 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 746 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
751 return (state_machine_.commit_state() == 747 return (state_machine_.commit_state() ==
752 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 748 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
753 state_machine_.commit_state() == 749 state_machine_.commit_state() ==
754 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 750 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
755 } 751 }
756 752
757 } // namespace cc 753 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698