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

Unified Diff: ui/compositor/compositor.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 missing include 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: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 6266f00cbb0522b70057d3b03ed75b47ac083f99..64749bcbb2eb1960d10758d14d61390f65047728 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -31,6 +31,7 @@
#include "ui/compositor/dip_util.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/reflector.h"
+#include "ui/gfx/frame_time.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface.h"
@@ -552,7 +553,7 @@ void Compositor::Terminate() {
void Compositor::ScheduleDraw() {
if (g_compositor_thread) {
- host_->Composite(base::TimeTicks::Now());
+ host_->Composite(gfx::FrameTime::Now());
} else if (!defer_draw_scheduling_) {
defer_draw_scheduling_ = true;
base::MessageLoop::current()->PostTask(
@@ -600,7 +601,7 @@ void Compositor::Draw() {
// TODO(nduca): Temporary while compositor calls
// compositeImmediately() directly.
Layout();
- host_->Composite(base::TimeTicks::Now());
+ host_->Composite(gfx::FrameTime::Now());
#if defined(OS_WIN)
// While we resize, we are usually a few frames behind. By blocking

Powered by Google App Engine
This is Rietveld 408576698