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

Unified Diff: cc/scheduler/scheduler.cc

Issue 246753008: cc: Unify use of DidSwapBuffers() and did_request_swap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: cc/scheduler/scheduler.cc
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index 592cbf10dee350e459dd2e0ab24a32967b1d62f4..97098ec543fc316b27690f2a346a4f273e6e5ad3 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -98,6 +98,10 @@ void Scheduler::SetMaxSwapsPending(int max) {
void Scheduler::DidSwapBuffers() {
state_machine_.DidSwapBuffers();
+
+ // Swap should not occur by readback operation.
+ DCHECK(!IsInsideAction(SchedulerStateMachine::ACTION_DRAW_AND_READBACK));
brianderson 2014/04/24 01:54:15 Can you move this DCHECK into the state machine? I
simonhong 2014/04/25 01:13:37 I tried but i think checking this condition in sta
+
// There is no need to call ProcessScheduledActions here because
// swapping should not trigger any new actions.
if (!inside_process_scheduled_actions_) {
@@ -450,8 +454,7 @@ void Scheduler::DrawAndSwapForced() {
}
void Scheduler::DrawAndReadback() {
- DrawSwapReadbackResult result = client_->ScheduledActionDrawAndReadback();
- DCHECK(!result.did_request_swap);
+ client_->ScheduledActionDrawAndReadback();
}
void Scheduler::ProcessScheduledActions() {

Powered by Google App Engine
This is Rietveld 408576698