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

Unified Diff: cc/output/begin_frame_args.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 | « cc/layers/delegated_renderer_layer_impl_unittest.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/begin_frame_args.cc
diff --git a/cc/output/begin_frame_args.cc b/cc/output/begin_frame_args.cc
index d7da76c3bcb228f2604544b72b122cccd43257d0..92901afb1f3d897b37ca374297a8e5bc25463cbc 100644
--- a/cc/output/begin_frame_args.cc
+++ b/cc/output/begin_frame_args.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "cc/output/begin_frame_args.h"
+#include "ui/gfx/frame_time.h"
namespace cc {
@@ -29,20 +30,20 @@ BeginFrameArgs BeginFrameArgs::Create(base::TimeTicks frame_time,
BeginFrameArgs BeginFrameArgs::CreateForSynchronousCompositor() {
// For WebView/SynchronousCompositor, we always want to draw immediately,
// so we set the deadline to 0 and guess that the interval is 16 milliseconds.
- return BeginFrameArgs(base::TimeTicks::Now(),
+ return BeginFrameArgs(gfx::FrameTime::Now(),
base::TimeTicks(),
DefaultInterval());
}
BeginFrameArgs BeginFrameArgs::CreateForTesting() {
- base::TimeTicks now = base::TimeTicks::Now();
+ base::TimeTicks now = gfx::FrameTime::Now();
return BeginFrameArgs(now,
now + (DefaultInterval() / 2),
DefaultInterval());
}
BeginFrameArgs BeginFrameArgs::CreateExpiredForTesting() {
- base::TimeTicks now = base::TimeTicks::Now();
+ base::TimeTicks now = gfx::FrameTime::Now();
return BeginFrameArgs(now,
now - DefaultInterval(),
DefaultInterval());
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl_unittest.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698