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

Unified Diff: third_party/WebKit/Source/web/tests/sim/SimCompositor.cpp

Issue 2746223003: Enable control over frame time in SimTests (Closed)
Patch Set: reviewchange Created 3 years, 9 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 | « third_party/WebKit/Source/web/tests/sim/SimCompositor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/sim/SimCompositor.cpp
diff --git a/third_party/WebKit/Source/web/tests/sim/SimCompositor.cpp b/third_party/WebKit/Source/web/tests/sim/SimCompositor.cpp
index 23a105cd9670e131486ec65b5917a79e8cf10f9a..69e3239eb49758c51fa71a75f4b591eb8a3b3b87 100644
--- a/third_party/WebKit/Source/web/tests/sim/SimCompositor.cpp
+++ b/third_party/WebKit/Source/web/tests/sim/SimCompositor.cpp
@@ -79,14 +79,14 @@ void SimCompositor::clearSelection() {
m_hasSelection = false;
}
-SimDisplayItemList SimCompositor::beginFrame() {
+SimDisplayItemList SimCompositor::beginFrame(double timeDeltaInSeconds) {
DCHECK(m_webViewImpl);
DCHECK(!m_deferCommits);
DCHECK(m_needsBeginFrame);
+ DCHECK_GT(timeDeltaInSeconds, 0);
m_needsBeginFrame = false;
- // Always advance the time as if the compositor was running at 60fps.
- m_lastFrameTimeMonotonic = monotonicallyIncreasingTime() + 0.016;
+ m_lastFrameTimeMonotonic += timeDeltaInSeconds;
m_webViewImpl->beginFrame(m_lastFrameTimeMonotonic);
m_webViewImpl->updateAllLifecyclePhases();
« no previous file with comments | « third_party/WebKit/Source/web/tests/sim/SimCompositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698