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

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

Issue 23907006: cc: Allow sending BeginMainFrame before draw or activation (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedDeadline3
Patch Set: Block main thread from state machine; remove completion event; Created 7 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
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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 client_->ScheduledActionAcquireLayerTexturesForMainThread(); 296 client_->ScheduledActionAcquireLayerTexturesForMainThread();
297 break; 297 break;
298 } 298 }
299 } while (action != SchedulerStateMachine::ACTION_NONE); 299 } while (action != SchedulerStateMachine::ACTION_NONE);
300 300
301 state_machine_.AdvanceBeginFrameStateWhenNoActionsRemain(); 301 state_machine_.AdvanceBeginFrameStateWhenNoActionsRemain();
302 SetupNextBeginFrameIfNeeded(); 302 SetupNextBeginFrameIfNeeded();
303 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime()); 303 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime());
304 } 304 }
305 305
306 bool Scheduler::ActiveTreeNeedsFirstDraw() const {
307 return state_machine_.active_tree_needs_first_draw();
308 }
309
306 bool Scheduler::WillDrawIfNeeded() const { 310 bool Scheduler::WillDrawIfNeeded() const {
307 return !state_machine_.PendingDrawsShouldBeAborted(); 311 return !state_machine_.PendingDrawsShouldBeAborted();
308 } 312 }
309 313
310 } // namespace cc 314 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698