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

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

Issue 502203003: Remove implicit conversions from scoped_refptr to T* in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to use .get() instead of rewriting local variable 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
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/scheduler/scheduler_unittest.cc » ('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_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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return "ACTION_MANAGE_TILES"; 145 return "ACTION_MANAGE_TILES";
146 } 146 }
147 NOTREACHED(); 147 NOTREACHED();
148 return "???"; 148 return "???";
149 } 149 }
150 150
151 scoped_refptr<base::debug::ConvertableToTraceFormat> 151 scoped_refptr<base::debug::ConvertableToTraceFormat>
152 SchedulerStateMachine::AsValue() const { 152 SchedulerStateMachine::AsValue() const {
153 scoped_refptr<base::debug::TracedValue> state = 153 scoped_refptr<base::debug::TracedValue> state =
154 new base::debug::TracedValue(); 154 new base::debug::TracedValue();
155 AsValueInto(state); 155 AsValueInto(state.get());
156 return state; 156 return state;
157 } 157 }
158 158
159 void SchedulerStateMachine::AsValueInto(base::debug::TracedValue* state) const { 159 void SchedulerStateMachine::AsValueInto(base::debug::TracedValue* state) const {
160 state->BeginDictionary("major_state"); 160 state->BeginDictionary("major_state");
161 state->SetString("next_action", ActionToString(NextAction())); 161 state->SetString("next_action", ActionToString(NextAction()));
162 state->SetString("begin_impl_frame_state", 162 state->SetString("begin_impl_frame_state",
163 BeginImplFrameStateToString(begin_impl_frame_state_)); 163 BeginImplFrameStateToString(begin_impl_frame_state_));
164 state->SetString("commit_state", CommitStateToString(commit_state_)); 164 state->SetString("commit_state", CommitStateToString(commit_state_));
165 state->SetString("output_surface_state_", 165 state->SetString("output_surface_state_",
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 case OUTPUT_SURFACE_ACTIVE: 1080 case OUTPUT_SURFACE_ACTIVE:
1081 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: 1081 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT:
1082 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: 1082 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION:
1083 return true; 1083 return true;
1084 } 1084 }
1085 NOTREACHED(); 1085 NOTREACHED();
1086 return false; 1086 return false;
1087 } 1087 }
1088 1088
1089 } // namespace cc 1089 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698