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

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: Android working Created 6 years, 6 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/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.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) << *AsValue(); 1014 DCHECK(commit_state_ == COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED) << *AsValue();
1013 commit_state_ = COMMIT_STATE_READY_TO_COMMIT; 1015 commit_state_ = COMMIT_STATE_READY_TO_COMMIT;
1014 } 1016 }
1015 1017
1016 void SchedulerStateMachine::BeginMainFrameAborted(bool did_handle) { 1018 void SchedulerStateMachine::BeginMainFrameAborted(bool did_handle) {
1017 DCHECK_EQ(commit_state_, COMMIT_STATE_BEGIN_MAIN_FRAME_SENT); 1019 DCHECK_EQ(commit_state_, COMMIT_STATE_BEGIN_MAIN_FRAME_SENT);
1018 if (did_handle) { 1020 if (did_handle) {
1019 bool commit_was_aborted = true; 1021 bool commit_was_aborted = true;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 case OUTPUT_SURFACE_ACTIVE: 1072 case OUTPUT_SURFACE_ACTIVE:
1071 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: 1073 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT:
1072 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: 1074 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION:
1073 return true; 1075 return true;
1074 } 1076 }
1075 NOTREACHED(); 1077 NOTREACHED();
1076 return false; 1078 return false;
1077 } 1079 }
1078 1080
1079 } // namespace cc 1081 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698