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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 26880010: gfx: Add FrameTime and DisplayTime classes (Closed) Base URL: http://git.chromium.org/chromium/src.git@checkHighResNow4
Patch Set: WIP Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_state_machine.cc
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index 0fd0f57b3b25b8466f8479c933ac10c89db314a7..8f222e634629d0058030bf38c95e272001a509c5 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -194,34 +194,26 @@ scoped_ptr<base::Value> SchedulerStateMachine::AsValue() const {
state->Set("major_state", major_state.release());
scoped_ptr<base::DictionaryValue> timestamps_state(new base::DictionaryValue);
- base::TimeTicks now = gfx::FrameTime::Now();
+ gfx::FrameTime now = gfx::FrameTime::Now();
timestamps_state->SetDouble(
- "0_interval",
- last_begin_impl_frame_args_.interval.InMicroseconds() / 1000.0L);
+ "0_interval", last_begin_impl_frame_args_.interval.InMillisecondsF());
timestamps_state->SetDouble(
"1_now_to_deadline",
- (last_begin_impl_frame_args_.deadline - now).InMicroseconds() / 1000.0L);
+ (last_begin_impl_frame_args_.deadline - now).InMillisecondsF());
timestamps_state->SetDouble(
"2_frame_time_to_now",
- (now - last_begin_impl_frame_args_.frame_time).InMicroseconds() /
- 1000.0L);
+ (now - last_begin_impl_frame_args_.frame_time).InMillisecondsF());
timestamps_state->SetDouble(
"3_frame_time_to_deadline",
(last_begin_impl_frame_args_.deadline -
- last_begin_impl_frame_args_.frame_time).InMicroseconds() /
- 1000.0L);
- timestamps_state->SetDouble(
- "4_now", (now - base::TimeTicks()).InMicroseconds() / 1000.0L);
+ last_begin_impl_frame_args_.frame_time).InMillisecondsF());
+ timestamps_state->SetDouble("4_now", now.Unsafe_InMillisecondsF());
timestamps_state->SetDouble(
"5_frame_time",
- (last_begin_impl_frame_args_.frame_time - base::TimeTicks())
- .InMicroseconds() /
- 1000.0L);
+ last_begin_impl_frame_args_.frame_time.Unsafe_InMillisecondsF());
timestamps_state->SetDouble(
"6_deadline",
- (last_begin_impl_frame_args_.deadline - base::TimeTicks())
- .InMicroseconds() /
- 1000.0L);
+ last_begin_impl_frame_args_.deadline.Unsafe_InMillisecondsF());
state->Set("major_timestamps_in_ms", timestamps_state.release());
scoped_ptr<base::DictionaryValue> minor_state(new base::DictionaryValue);
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698