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

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

Issue 134623005: Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Abort commits properly, handle swap promises, test those Created 6 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
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_state_machine.h" 5 #include "cc/scheduler/scheduler_state_machine.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/debug/trace_event_argument.h" 8 #include "base/debug/trace_event_argument.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 case DRAW_ABORTED_MISSING_HIGH_RES_CONTENT: 999 case DRAW_ABORTED_MISSING_HIGH_RES_CONTENT:
1000 // It's not clear whether this missing content is because of missing 1000 // It's not clear whether this missing content is because of missing
1001 // pictures (which requires a commit) or because of memory pressure 1001 // pictures (which requires a commit) or because of memory pressure
1002 // removing textures (which might not). To be safe, request a commit 1002 // removing textures (which might not). To be safe, request a commit
1003 // anyway. 1003 // anyway.
1004 needs_commit_ = true; 1004 needs_commit_ = true;
1005 break; 1005 break;
1006 } 1006 }
1007 } 1007 }
1008 1008
1009 void SchedulerStateMachine::SetNeedsCommit() { needs_commit_ = true; } 1009 void SchedulerStateMachine::SetNeedsCommit() {
1010 needs_commit_ = true;
1011 }
1010 1012
1011 void SchedulerStateMachine::NotifyReadyToCommit() { 1013 void SchedulerStateMachine::NotifyReadyToCommit() {
1012 DCHECK(commit_state_ == COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED) 1014 DCHECK(commit_state_ == COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED)
1013 << AsValue()->ToString(); 1015 << AsValue()->ToString();
1014 commit_state_ = COMMIT_STATE_READY_TO_COMMIT; 1016 commit_state_ = COMMIT_STATE_READY_TO_COMMIT;
1015 } 1017 }
1016 1018
1017 void SchedulerStateMachine::BeginMainFrameAborted(bool did_handle) { 1019 void SchedulerStateMachine::BeginMainFrameAborted(bool did_handle) {
1018 DCHECK_EQ(commit_state_, COMMIT_STATE_BEGIN_MAIN_FRAME_SENT); 1020 DCHECK_EQ(commit_state_, COMMIT_STATE_BEGIN_MAIN_FRAME_SENT);
1019 if (did_handle) { 1021 if (did_handle) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 case OUTPUT_SURFACE_ACTIVE: 1073 case OUTPUT_SURFACE_ACTIVE:
1072 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: 1074 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT:
1073 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: 1075 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION:
1074 return true; 1076 return true;
1075 } 1077 }
1076 NOTREACHED(); 1078 NOTREACHED();
1077 return false; 1079 return false;
1078 } 1080 }
1079 1081
1080 } // namespace cc 1082 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698