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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 27710005: cc: Use HighResNow as timebase if it is fast and reliable (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add frame_time.h 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
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 8afd94bfead13ded96f619cae32af8899631b1d2..85e84a26276fe37c597f2e86433327f354c14270 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -51,6 +51,7 @@
#include "third_party/khronos/GLES2/gl2.h"
#include "third_party/khronos/GLES2/gl2ext.h"
#include "third_party/skia/include/core/SkPicture.h"
+#include "ui/gfx/frame_time.h"
#include "ui/gfx/point_conversions.h"
#include "ui/gfx/size_conversions.h"
#include "ui/gfx/vector2d_conversions.h"
@@ -1004,10 +1005,9 @@ class LayerTreeHostTestFrameTimeUpdatesAfterDraw : public LayerTreeHostTest {
first_frame_time_ = impl->CurrentFrameTimeTicks();
impl->SetNeedsRedraw();
- // Since base::TimeTicks::Now() uses a low-resolution clock on
- // Windows, we need to make sure that the clock has incremented past
- // first_frame_time_.
- while (first_frame_time_ == base::TimeTicks::Now()) {}
+ // Since we might use a low-resolution clock on Windows, we need to
+ // make sure that the clock has incremented past first_frame_time_.
+ while (first_frame_time_ == gfx::FrameTime::Now()) {}
return;
}

Powered by Google App Engine
This is Rietveld 408576698