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

Unified Diff: cc/layers/heads_up_display_layer_impl.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/layers/heads_up_display_layer_impl.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/heads_up_display_layer_impl.cc
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc
index b7437bff1c9bc5384b7cbd11accb5e1d31e313ee..750e79ca01e0c55f7909fb5b13a7c8fc1eb8615e 100644
--- a/cc/layers/heads_up_display_layer_impl.cc
+++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -188,9 +188,9 @@ void HeadsUpDisplayLayerImpl::UpdateHudContents() {
const LayerTreeDebugState& debug_state = layer_tree_impl()->debug_state();
// Don't update numbers every frame so text is readable.
- base::TimeTicks now = layer_tree_impl()->CurrentFrameTimeTicks();
- if (base::TimeDelta(now - time_of_last_graph_update_).InSecondsF() > 0.25f) {
- time_of_last_graph_update_ = now;
+ gfx::FrameTime frame_time = layer_tree_impl()->CurrentFrameTimeTicks();
+ if ((frame_time - time_of_last_graph_update_).InSecondsF() > 0.25f) {
+ time_of_last_graph_update_ = frame_time;
if (debug_state.show_fps_counter) {
FrameRateCounter* fps_counter = layer_tree_impl()->frame_rate_counter();
« no previous file with comments | « cc/layers/heads_up_display_layer_impl.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698