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

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

Issue 27200003: Trigger deadline immediately after an aborted main thread commit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 ProcessScheduledActions(); 91 ProcessScheduledActions();
92 92
93 if (state_machine_.ShouldTriggerBeginFrameDeadlineEarly()) 93 if (state_machine_.ShouldTriggerBeginFrameDeadlineEarly())
94 PostBeginFrameDeadline(base::TimeTicks()); 94 PostBeginFrameDeadline(base::TimeTicks());
95 } 95 }
96 96
97 void Scheduler::BeginFrameAbortedByMainThread(bool did_handle) { 97 void Scheduler::BeginFrameAbortedByMainThread(bool did_handle) {
98 TRACE_EVENT0("cc", "Scheduler::BeginFrameAbortedByMainThread"); 98 TRACE_EVENT0("cc", "Scheduler::BeginFrameAbortedByMainThread");
99 state_machine_.BeginFrameAbortedByMainThread(did_handle); 99 state_machine_.BeginFrameAbortedByMainThread(did_handle);
100 ProcessScheduledActions(); 100 ProcessScheduledActions();
101
102 if (state_machine_.ShouldTriggerBeginFrameDeadlineEarly())
103 PostBeginFrameDeadline(base::TimeTicks());
101 } 104 }
102 105
103 void Scheduler::DidLoseOutputSurface() { 106 void Scheduler::DidLoseOutputSurface() {
104 TRACE_EVENT0("cc", "Scheduler::DidLoseOutputSurface"); 107 TRACE_EVENT0("cc", "Scheduler::DidLoseOutputSurface");
105 last_set_needs_begin_frame_ = false; 108 last_set_needs_begin_frame_ = false;
106 begin_frame_deadline_closure_.Cancel(); 109 begin_frame_deadline_closure_.Cancel();
107 state_machine_.DidLoseOutputSurface(); 110 state_machine_.DidLoseOutputSurface();
108 ProcessScheduledActions(); 111 ProcessScheduledActions();
109 } 112 }
110 113
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 333
331 SetupNextBeginFrameIfNeeded(); 334 SetupNextBeginFrameIfNeeded();
332 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime()); 335 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime());
333 } 336 }
334 337
335 bool Scheduler::WillDrawIfNeeded() const { 338 bool Scheduler::WillDrawIfNeeded() const {
336 return !state_machine_.PendingDrawsShouldBeAborted(); 339 return !state_machine_.PendingDrawsShouldBeAborted();
337 } 340 }
338 341
339 } // namespace cc 342 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/scheduler/scheduler_state_machine.cc » ('j') | cc/scheduler/scheduler_state_machine.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698