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

Unified Diff: public/platform/WebFrameTime.h

Issue 369793003: Make the web-animations engine use the passed in blink::WebFrameTime values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing remaining usages of -1 in the code. Created 6 years, 5 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 | « Source/web/PageWidgetDelegate.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebFrameTime.h
diff --git a/public/platform/WebFrameTime.h b/public/platform/WebFrameTime.h
index 1050291c23f3db6177e84cc5bb3a7aa9feec7b15..4f4dc76949ba9ef2676341ec544b2c0223e48142 100644
--- a/public/platform/WebFrameTime.h
+++ b/public/platform/WebFrameTime.h
@@ -36,6 +36,15 @@
namespace blink {
struct WebFrameTime {
+ const static int64_t Undefined = -1;
+
+ WebFrameTime()
+ : lastFrameTime(Undefined)
+ , renderDeadline(Undefined)
+ , displayFrameTime(Undefined)
+ , predictedNextDisplayFrameTime(Undefined)
+ { }
+
WebFrameTime(double lastFrameTime, double renderDeadline, double displayFrameTime, double predictedNextDisplayFrameTime)
: lastFrameTime(lastFrameTime)
, renderDeadline(renderDeadline)
@@ -43,6 +52,15 @@ struct WebFrameTime {
, predictedNextDisplayFrameTime(predictedNextDisplayFrameTime)
{ }
+ bool isNull() const
+ {
+ return (
+ lastFrameTime == Undefined
+ && renderDeadline == Undefined
+ && displayFrameTime == Undefined
+ && predictedNextDisplayFrameTime == Undefined);
+ }
+
// FIXME(mithro): Upgrade the time in CLOCK_MONOTONIC values to use a
// TimeTick like class rather than a bare double.
« no previous file with comments | « Source/web/PageWidgetDelegate.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698