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

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

Issue 536123002: cc: Use Scheduler::BeginFrame() in SingleThreadProxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move to private Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/trees/single_thread_proxy.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 #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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 ProcessScheduledActions(); 600 ProcessScheduledActions();
601 state_machine_.DidLeavePollForAnticipatedDrawTriggers(); 601 state_machine_.DidLeavePollForAnticipatedDrawTriggers();
602 } 602 }
603 603
604 void Scheduler::PollToAdvanceCommitState() { 604 void Scheduler::PollToAdvanceCommitState() {
605 TRACE_EVENT0("cc", "Scheduler::PollToAdvanceCommitState"); 605 TRACE_EVENT0("cc", "Scheduler::PollToAdvanceCommitState");
606 advance_commit_state_task_.Cancel(); 606 advance_commit_state_task_.Cancel();
607 ProcessScheduledActions(); 607 ProcessScheduledActions();
608 } 608 }
609 609
610 bool Scheduler::IsBeginMainFrameSent() const {
611 return state_machine_.commit_state() ==
612 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT;
613 }
614
615 void Scheduler::DrawAndSwapIfPossible() { 610 void Scheduler::DrawAndSwapIfPossible() {
616 DrawResult result = client_->ScheduledActionDrawAndSwapIfPossible(); 611 DrawResult result = client_->ScheduledActionDrawAndSwapIfPossible();
617 state_machine_.DidDrawIfPossibleCompleted(result); 612 state_machine_.DidDrawIfPossibleCompleted(result);
618 } 613 }
619 614
620 void Scheduler::ProcessScheduledActions() { 615 void Scheduler::ProcessScheduledActions() {
621 // We do not allow ProcessScheduledActions to be recursive. 616 // We do not allow ProcessScheduledActions to be recursive.
622 // The top-level call will iteratively execute the next action for us anyway. 617 // The top-level call will iteratively execute the next action for us anyway.
623 if (inside_process_scheduled_actions_) 618 if (inside_process_scheduled_actions_)
624 return; 619 return;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 } 753 }
759 754
760 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 755 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
761 return (state_machine_.commit_state() == 756 return (state_machine_.commit_state() ==
762 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 757 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
763 state_machine_.commit_state() == 758 state_machine_.commit_state() ==
764 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 759 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
765 } 760 }
766 761
767 } // namespace cc 762 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698