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

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

Issue 387493002: Fixing and enhancing OrderedSimpleTaskRunner to allow 100% deterministic tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Lots of changes. Created 6 years, 5 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 BeginImplFrameStateToString(begin_impl_frame_state_)); 156 BeginImplFrameStateToString(begin_impl_frame_state_));
157 major_state->SetString("commit_state", CommitStateToString(commit_state_)); 157 major_state->SetString("commit_state", CommitStateToString(commit_state_));
158 major_state->SetString("output_surface_state_", 158 major_state->SetString("output_surface_state_",
159 OutputSurfaceStateToString(output_surface_state_)); 159 OutputSurfaceStateToString(output_surface_state_));
160 major_state->SetString( 160 major_state->SetString(
161 "forced_redraw_state", 161 "forced_redraw_state",
162 ForcedRedrawOnTimeoutStateToString(forced_redraw_state_)); 162 ForcedRedrawOnTimeoutStateToString(forced_redraw_state_));
163 state->Set("major_state", major_state.release()); 163 state->Set("major_state", major_state.release());
164 164
165 scoped_ptr<base::DictionaryValue> timestamps_state(new base::DictionaryValue); 165 scoped_ptr<base::DictionaryValue> timestamps_state(new base::DictionaryValue);
166 base::TimeTicks now = gfx::FrameTime::Now(); 166 base::TimeTicks now = base::TimeTicks(); // gfx::FrameTime::Now();
brianderson 2014/07/17 05:26:03 Why did this change?
mithro-old 2014/07/17 06:51:58 Opps, this shouldn't be in this commit :)
167 timestamps_state->SetDouble( 167 timestamps_state->SetDouble(
168 "0_interval", begin_impl_frame_args_.interval.InMicroseconds() / 1000.0L); 168 "0_interval", begin_impl_frame_args_.interval.InMicroseconds() / 1000.0L);
169 timestamps_state->SetDouble( 169 timestamps_state->SetDouble(
170 "1_now_to_deadline", 170 "1_now_to_deadline",
171 (begin_impl_frame_args_.deadline - now).InMicroseconds() / 1000.0L); 171 (begin_impl_frame_args_.deadline - now).InMicroseconds() / 1000.0L);
172 timestamps_state->SetDouble( 172 timestamps_state->SetDouble(
173 "2_frame_time_to_now", 173 "2_frame_time_to_now",
174 (now - begin_impl_frame_args_.frame_time).InMicroseconds() / 1000.0L); 174 (now - begin_impl_frame_args_.frame_time).InMicroseconds() / 1000.0L);
175 timestamps_state->SetDouble( 175 timestamps_state->SetDouble(
176 "3_frame_time_to_deadline", 176 "3_frame_time_to_deadline",
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 case OUTPUT_SURFACE_ACTIVE: 1070 case OUTPUT_SURFACE_ACTIVE:
1071 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT: 1071 case OUTPUT_SURFACE_WAITING_FOR_FIRST_COMMIT:
1072 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION: 1072 case OUTPUT_SURFACE_WAITING_FOR_FIRST_ACTIVATION:
1073 return true; 1073 return true;
1074 } 1074 }
1075 NOTREACHED(); 1075 NOTREACHED();
1076 return false; 1076 return false;
1077 } 1077 }
1078 1078
1079 } // namespace cc 1079 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698