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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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_state_machine.h ('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/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 return "ACTION_DRAW_AND_SWAP_ABORT"; 141 return "ACTION_DRAW_AND_SWAP_ABORT";
142 case ACTION_BEGIN_OUTPUT_SURFACE_CREATION: 142 case ACTION_BEGIN_OUTPUT_SURFACE_CREATION:
143 return "ACTION_BEGIN_OUTPUT_SURFACE_CREATION"; 143 return "ACTION_BEGIN_OUTPUT_SURFACE_CREATION";
144 case ACTION_PREPARE_TILES: 144 case ACTION_PREPARE_TILES:
145 return "ACTION_PREPARE_TILES"; 145 return "ACTION_PREPARE_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::trace_event::ConvertableToTraceFormat>
152 SchedulerStateMachine::AsValue() const { 152 SchedulerStateMachine::AsValue() const {
153 scoped_refptr<base::debug::TracedValue> state = 153 scoped_refptr<base::trace_event::TracedValue> state =
154 new base::debug::TracedValue(); 154 new base::trace_event::TracedValue();
155 AsValueInto(state.get(), gfx::FrameTime::Now()); 155 AsValueInto(state.get(), gfx::FrameTime::Now());
156 return state; 156 return state;
157 } 157 }
158 158
159 void SchedulerStateMachine::AsValueInto(base::debug::TracedValue* state, 159 void SchedulerStateMachine::AsValueInto(base::trace_event::TracedValue* state,
160 base::TimeTicks now) const { 160 base::TimeTicks now) const {
161 state->BeginDictionary("major_state"); 161 state->BeginDictionary("major_state");
162 state->SetString("next_action", ActionToString(NextAction())); 162 state->SetString("next_action", ActionToString(NextAction()));
163 state->SetString("begin_impl_frame_state", 163 state->SetString("begin_impl_frame_state",
164 BeginImplFrameStateToString(begin_impl_frame_state_)); 164 BeginImplFrameStateToString(begin_impl_frame_state_));
165 state->SetString("commit_state", CommitStateToString(commit_state_)); 165 state->SetString("commit_state", CommitStateToString(commit_state_));
166 state->SetString("output_surface_state_", 166 state->SetString("output_surface_state_",
167 OutputSurfaceStateToString(output_surface_state_)); 167 OutputSurfaceStateToString(output_surface_state_));
168 state->SetString("forced_redraw_state", 168 state->SetString("forced_redraw_state",
169 ForcedRedrawOnTimeoutStateToString(forced_redraw_state_)); 169 ForcedRedrawOnTimeoutStateToString(forced_redraw_state_));
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 static_cast<int>(begin_impl_frame_state_), 1132 static_cast<int>(begin_impl_frame_state_),
1133 static_cast<int>(commit_state_), 1133 static_cast<int>(commit_state_),
1134 has_pending_tree_ ? 'T' : 'F', 1134 has_pending_tree_ ? 'T' : 'F',
1135 pending_tree_is_ready_for_activation_ ? 'T' : 'F', 1135 pending_tree_is_ready_for_activation_ ? 'T' : 'F',
1136 active_tree_needs_first_draw_ ? 'T' : 'F', 1136 active_tree_needs_first_draw_ ? 'T' : 'F',
1137 max_pending_swaps_, 1137 max_pending_swaps_,
1138 pending_swaps_); 1138 pending_swaps_);
1139 } 1139 }
1140 1140
1141 } // namespace cc 1141 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine.h ('k') | cc/scheduler/scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698