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: cc/output/begin_frame_args.cc

Issue 273823002: Adding gtest helpers for BeginFrameArgs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change EXPECT_EQ(true/false to EXPECT_TRUE/FALSE(. Created 6 years, 7 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/output/begin_frame_args.h ('k') | cc/output/begin_frame_args_unittest.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 2d7cd969f9b666eb2e4c4efd6bc2330f21d42bf8..a592ecc5c02e90a540389e5f81c95807d990eda3 100644
--- a/cc/output/begin_frame_args.cc
+++ b/cc/output/begin_frame_args.cc
@@ -37,12 +37,13 @@ scoped_ptr<base::Value> BeginFrameArgs::AsValue() const {
return state.PassAs<base::Value>();
}
-BeginFrameArgs BeginFrameArgs::CreateForSynchronousCompositor() {
+BeginFrameArgs BeginFrameArgs::CreateForSynchronousCompositor(
+ base::TimeTicks now) {
// 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(gfx::FrameTime::Now(),
- base::TimeTicks(),
- DefaultInterval());
+ if (now.is_null())
+ now = gfx::FrameTime::Now();
+ return BeginFrameArgs(now, base::TimeTicks(), DefaultInterval());
}
// This is a hard-coded deadline adjustment that assumes 60Hz, to be used in
« no previous file with comments | « cc/output/begin_frame_args.h ('k') | cc/output/begin_frame_args_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698