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

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

Issue 189553007: cc: modify the waiting condition of forced commit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/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/logging.h" 10 #include "base/logging.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 287 }
288 288
289 void Scheduler::PollForAnticipatedDrawTriggers() { 289 void Scheduler::PollForAnticipatedDrawTriggers() {
290 TRACE_EVENT0("cc", "Scheduler::PollForAnticipatedDrawTriggers"); 290 TRACE_EVENT0("cc", "Scheduler::PollForAnticipatedDrawTriggers");
291 poll_for_draw_triggers_closure_.Cancel(); 291 poll_for_draw_triggers_closure_.Cancel();
292 state_machine_.DidEnterPollForAnticipatedDrawTriggers(); 292 state_machine_.DidEnterPollForAnticipatedDrawTriggers();
293 ProcessScheduledActions(); 293 ProcessScheduledActions();
294 state_machine_.DidLeavePollForAnticipatedDrawTriggers(); 294 state_machine_.DidLeavePollForAnticipatedDrawTriggers();
295 } 295 }
296 296
297 bool Scheduler::IsBeginMainFrameSent() const {
298 return state_machine_.commit_state() ==
299 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT;
300 }
301
297 void Scheduler::DrawAndSwapIfPossible() { 302 void Scheduler::DrawAndSwapIfPossible() {
298 DrawSwapReadbackResult result = 303 DrawSwapReadbackResult result =
299 client_->ScheduledActionDrawAndSwapIfPossible(); 304 client_->ScheduledActionDrawAndSwapIfPossible();
300 state_machine_.DidDrawIfPossibleCompleted(result.draw_result); 305 state_machine_.DidDrawIfPossibleCompleted(result.draw_result);
301 } 306 }
302 307
303 void Scheduler::DrawAndSwapForced() { 308 void Scheduler::DrawAndSwapForced() {
304 client_->ScheduledActionDrawAndSwapForced(); 309 client_->ScheduledActionDrawAndSwapForced();
305 } 310 }
306 311
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } 424 }
420 425
421 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 426 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
422 return (state_machine_.commit_state() == 427 return (state_machine_.commit_state() ==
423 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 428 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
424 state_machine_.commit_state() == 429 state_machine_.commit_state() ==
425 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 430 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
426 } 431 }
427 432
428 } // namespace cc 433 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698