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

Unified Diff: cc/scheduler/scheduler.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/scheduler/scheduler.cc
diff --git a/cc/scheduler/scheduler.cc b/cc/scheduler/scheduler.cc
index 3240028aa27f0f1265081f61c5ca13fcccf5a6cd..4f90cda8b4aa74067cc25f16441aacfa84d23b8b 100644
--- a/cc/scheduler/scheduler.cc
+++ b/cc/scheduler/scheduler.cc
@@ -9,6 +9,7 @@
#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "cc/debug/traced_value.h"
+#include "ui/gfx/frame_time.h"
namespace cc {
@@ -118,7 +119,7 @@ base::TimeTicks Scheduler::AnticipatedDrawTime() {
last_begin_frame_args_.interval <= base::TimeDelta())
return base::TimeTicks();
- base::TimeTicks now = base::TimeTicks::Now();
+ base::TimeTicks now = gfx::FrameTime::Now();
base::TimeTicks timebase = std::max(last_begin_frame_args_.frame_time,
last_begin_frame_args_.deadline);
int64 intervals = 1 + ((now - timebase) / last_begin_frame_args_.interval);

Powered by Google App Engine
This is Rietveld 408576698