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

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

Issue 19106007: cc: Allow the main thread to cancel commits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add more comments Created 7 years, 4 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/scheduler/scheduler_state_machine.h » ('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 "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 state_machine_.SetMainThreadNeedsLayerTextures(); 78 state_machine_.SetMainThreadNeedsLayerTextures();
79 ProcessScheduledActions(); 79 ProcessScheduledActions();
80 } 80 }
81 81
82 void Scheduler::FinishCommit() { 82 void Scheduler::FinishCommit() {
83 TRACE_EVENT0("cc", "Scheduler::FinishCommit"); 83 TRACE_EVENT0("cc", "Scheduler::FinishCommit");
84 state_machine_.FinishCommit(); 84 state_machine_.FinishCommit();
85 ProcessScheduledActions(); 85 ProcessScheduledActions();
86 } 86 }
87 87
88 void Scheduler::BeginFrameAbortedByMainThread() { 88 void Scheduler::BeginFrameAbortedByMainThread(bool did_handle) {
89 TRACE_EVENT0("cc", "Scheduler::BeginFrameAbortedByMainThread"); 89 TRACE_EVENT0("cc", "Scheduler::BeginFrameAbortedByMainThread");
90 state_machine_.BeginFrameAbortedByMainThread(); 90 state_machine_.BeginFrameAbortedByMainThread(did_handle);
91 ProcessScheduledActions(); 91 ProcessScheduledActions();
92 } 92 }
93 93
94 void Scheduler::DidLoseOutputSurface() { 94 void Scheduler::DidLoseOutputSurface() {
95 TRACE_EVENT0("cc", "Scheduler::DidLoseOutputSurface"); 95 TRACE_EVENT0("cc", "Scheduler::DidLoseOutputSurface");
96 state_machine_.DidLoseOutputSurface(); 96 state_machine_.DidLoseOutputSurface();
97 ProcessScheduledActions(); 97 ProcessScheduledActions();
98 } 98 }
99 99
100 void Scheduler::DidCreateAndInitializeOutputSurface() { 100 void Scheduler::DidCreateAndInitializeOutputSurface() {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 SetupNextBeginFrameIfNeeded(); 236 SetupNextBeginFrameIfNeeded();
237 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime()); 237 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime());
238 } 238 }
239 239
240 bool Scheduler::WillDrawIfNeeded() const { 240 bool Scheduler::WillDrawIfNeeded() const {
241 return !state_machine_.DrawSuspendedUntilCommit(); 241 return !state_machine_.DrawSuspendedUntilCommit();
242 } 242 }
243 243
244 } // namespace cc 244 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/scheduler/scheduler_state_machine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698