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

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: Fix DCHECK 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 | « content/test/web_layer_tree_view_impl_for_testing.cc ('k') | ui/compositor/layer_animator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 6f6b08461d997be9af83c116ec7fa1f7995f1a8a..9c57dc7c65044c6148bbd9b89c21f6506df46d50 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"
@@ -555,7 +556,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(
@@ -603,7 +604,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
@@ -740,7 +741,7 @@ void Compositor::DidCommit() {
}
void Compositor::DidCommitAndDrawFrame() {
- base::TimeTicks start_time = base::TimeTicks::Now();
+ base::TimeTicks start_time = gfx::FrameTime::Now();
FOR_EACH_OBSERVER(CompositorObserver,
observer_list_,
OnCompositingStarted(this, start_time));
« no previous file with comments | « content/test/web_layer_tree_view_impl_for_testing.cc ('k') | ui/compositor/layer_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698