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

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

Issue 671653005: SetNeedsRedraw directly when updating a visible tile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pinchblurmerge-test: comments Created 6 years, 1 month 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 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/debug/trace_event_argument.h" 10 #include "base/debug/trace_event_argument.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 void Scheduler::DidSwapBuffers() { 230 void Scheduler::DidSwapBuffers() {
231 state_machine_.DidSwapBuffers(); 231 state_machine_.DidSwapBuffers();
232 232
233 // There is no need to call ProcessScheduledActions here because 233 // There is no need to call ProcessScheduledActions here because
234 // swapping should not trigger any new actions. 234 // swapping should not trigger any new actions.
235 if (!inside_process_scheduled_actions_) { 235 if (!inside_process_scheduled_actions_) {
236 DCHECK_EQ(state_machine_.NextAction(), SchedulerStateMachine::ACTION_NONE); 236 DCHECK_EQ(state_machine_.NextAction(), SchedulerStateMachine::ACTION_NONE);
237 } 237 }
238 } 238 }
239 239
240 void Scheduler::SetSwapUsedIncompleteTile(bool used_incomplete_tile) {
241 state_machine_.SetSwapUsedIncompleteTile(used_incomplete_tile);
242 ProcessScheduledActions();
243 }
244
245 void Scheduler::DidSwapBuffersComplete() { 240 void Scheduler::DidSwapBuffersComplete() {
246 state_machine_.DidSwapBuffersComplete(); 241 state_machine_.DidSwapBuffersComplete();
247 ProcessScheduledActions(); 242 ProcessScheduledActions();
248 } 243 }
249 244
250 void Scheduler::SetImplLatencyTakesPriority(bool impl_latency_takes_priority) { 245 void Scheduler::SetImplLatencyTakesPriority(bool impl_latency_takes_priority) {
251 state_machine_.SetImplLatencyTakesPriority(impl_latency_takes_priority); 246 state_machine_.SetImplLatencyTakesPriority(impl_latency_takes_priority);
252 ProcessScheduledActions(); 247 ProcessScheduledActions();
253 } 248 }
254 249
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 break; 650 break;
656 case SchedulerStateMachine::ACTION_ANIMATE: 651 case SchedulerStateMachine::ACTION_ANIMATE:
657 client_->ScheduledActionAnimate(); 652 client_->ScheduledActionAnimate();
658 break; 653 break;
659 case SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME: 654 case SchedulerStateMachine::ACTION_SEND_BEGIN_MAIN_FRAME:
660 client_->ScheduledActionSendBeginMainFrame(); 655 client_->ScheduledActionSendBeginMainFrame();
661 break; 656 break;
662 case SchedulerStateMachine::ACTION_COMMIT: 657 case SchedulerStateMachine::ACTION_COMMIT:
663 client_->ScheduledActionCommit(); 658 client_->ScheduledActionCommit();
664 break; 659 break;
665 case SchedulerStateMachine::ACTION_UPDATE_VISIBLE_TILES:
666 client_->ScheduledActionUpdateVisibleTiles();
667 break;
668 case SchedulerStateMachine::ACTION_ACTIVATE_SYNC_TREE: 660 case SchedulerStateMachine::ACTION_ACTIVATE_SYNC_TREE:
669 client_->ScheduledActionActivateSyncTree(); 661 client_->ScheduledActionActivateSyncTree();
670 break; 662 break;
671 case SchedulerStateMachine::ACTION_DRAW_AND_SWAP_IF_POSSIBLE: 663 case SchedulerStateMachine::ACTION_DRAW_AND_SWAP_IF_POSSIBLE:
672 DrawAndSwapIfPossible(); 664 DrawAndSwapIfPossible();
673 break; 665 break;
674 case SchedulerStateMachine::ACTION_DRAW_AND_SWAP_FORCED: 666 case SchedulerStateMachine::ACTION_DRAW_AND_SWAP_FORCED:
675 client_->ScheduledActionDrawAndSwapForced(); 667 client_->ScheduledActionDrawAndSwapForced();
676 break; 668 break;
677 case SchedulerStateMachine::ACTION_DRAW_AND_SWAP_ABORT: 669 case SchedulerStateMachine::ACTION_DRAW_AND_SWAP_ABORT:
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 } 769 }
778 770
779 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 771 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
780 return (state_machine_.commit_state() == 772 return (state_machine_.commit_state() ==
781 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 773 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
782 state_machine_.commit_state() == 774 state_machine_.commit_state() ==
783 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 775 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
784 } 776 }
785 777
786 } // namespace cc 778 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698