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

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

Issue 802353002: cc: Trigger BeginFrame when children needs it without SetNeedsCommit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | 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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 // Queuing the frame counts as "using it", so we need to return true. 439 // Queuing the frame counts as "using it", so we need to return true.
440 } else { 440 } else {
441 BeginImplFrame(adjusted_args); 441 BeginImplFrame(adjusted_args);
442 } 442 }
443 return true; 443 return true;
444 } 444 }
445 445
446 void Scheduler::SetChildrenNeedBeginFrames(bool children_need_begin_frames) { 446 void Scheduler::SetChildrenNeedBeginFrames(bool children_need_begin_frames) {
447 DCHECK(settings_.forward_begin_frames_to_children); 447 DCHECK(settings_.forward_begin_frames_to_children);
448 state_machine_.SetChildrenNeedBeginFrames(children_need_begin_frames); 448 state_machine_.SetChildrenNeedBeginFrames(children_need_begin_frames);
449 ProcessScheduledActions();
449 DCHECK_EQ(state_machine_.NextAction(), SchedulerStateMachine::ACTION_NONE); 450 DCHECK_EQ(state_machine_.NextAction(), SchedulerStateMachine::ACTION_NONE);
brianderson 2014/12/15 20:25:40 lgtm after you delete this DCHECK.
simonhong 2014/12/15 22:34:52 Done.
450 } 451 }
451 452
452 // BeginRetroFrame is called for BeginFrames that we've deferred because 453 // BeginRetroFrame is called for BeginFrames that we've deferred because
453 // the scheduler was in the middle of processing a previous BeginFrame. 454 // the scheduler was in the middle of processing a previous BeginFrame.
454 void Scheduler::BeginRetroFrame() { 455 void Scheduler::BeginRetroFrame() {
455 TRACE_EVENT0("cc", "Scheduler::BeginRetroFrame"); 456 TRACE_EVENT0("cc", "Scheduler::BeginRetroFrame");
456 DCHECK(!settings_.using_synchronous_renderer_compositor); 457 DCHECK(!settings_.using_synchronous_renderer_compositor);
457 DCHECK(begin_retro_frame_posted_); 458 DCHECK(begin_retro_frame_posted_);
458 begin_retro_frame_posted_ = false; 459 begin_retro_frame_posted_ = false;
459 460
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 } 801 }
801 802
802 bool Scheduler::IsBeginMainFrameSentOrStarted() const { 803 bool Scheduler::IsBeginMainFrameSentOrStarted() const {
803 return (state_machine_.commit_state() == 804 return (state_machine_.commit_state() ==
804 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || 805 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT ||
805 state_machine_.commit_state() == 806 state_machine_.commit_state() ==
806 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); 807 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED);
807 } 808 }
808 809
809 } // namespace cc 810 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698