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

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

Issue 1111743002: cc: Adding DidFinishImplFrame to LTHI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing surfaces_scheduler. Created 5 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
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | 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 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 args.AsValue()); 516 args.AsValue());
517 begin_impl_frame_args_ = args; 517 begin_impl_frame_args_ = args;
518 BeginImplFrame(); 518 BeginImplFrame();
519 FinishImplFrame(); 519 FinishImplFrame();
520 } 520 }
521 521
522 void Scheduler::FinishImplFrame() { 522 void Scheduler::FinishImplFrame() {
523 state_machine_.OnBeginImplFrameIdle(); 523 state_machine_.OnBeginImplFrameIdle();
524 ProcessScheduledActions(); 524 ProcessScheduledActions();
525 525
526 client_->DidBeginImplFrameDeadline(); 526 client_->DidFinishImplFrame();
527 frame_source_->DidFinishFrame(begin_retro_frame_args_.size()); 527 frame_source_->DidFinishFrame(begin_retro_frame_args_.size());
528 } 528 }
529 529
530 // BeginImplFrame starts a compositor frame that will wait up until a deadline 530 // BeginImplFrame starts a compositor frame that will wait up until a deadline
531 // for a BeginMainFrame+activation to complete before it times out and draws 531 // for a BeginMainFrame+activation to complete before it times out and draws
532 // any asynchronous animation and scroll/pinch updates. 532 // any asynchronous animation and scroll/pinch updates.
533 void Scheduler::BeginImplFrame() { 533 void Scheduler::BeginImplFrame() {
534 DCHECK_EQ(state_machine_.begin_impl_frame_state(), 534 DCHECK_EQ(state_machine_.begin_impl_frame_state(),
535 SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_IDLE); 535 SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_IDLE);
536 DCHECK(!BeginImplFrameDeadlinePending()); 536 DCHECK(!BeginImplFrameDeadlinePending());
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 } 823 }
824 824
825 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 825 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
826 return (state_machine_.commit_state() == 826 return (state_machine_.commit_state() ==
827 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 827 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
828 state_machine_.commit_state() == 828 state_machine_.commit_state() ==
829 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 829 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
830 } 830 }
831 831
832 } // namespace cc 832 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698