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

Unified Diff: public/platform/WebFrameTime.h

Issue 321373003: Changing animate to beginFrame and use struct rather than naked double to allow extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebasing onto master. Created 6 years, 6 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/WebViewImpl.cpp ('k') | public/web/WebWidget.h » ('j') | 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/WebWaitableEvent.h b/public/platform/WebFrameTime.h
similarity index 58%
copy from public/platform/WebWaitableEvent.h
copy to public/platform/WebFrameTime.h
index f1b59f0a263afe5afd887863e98d52d9cfa3e95e..1050291c23f3db6177e84cc5bb3a7aa9feec7b15 100644
--- a/public/platform/WebWaitableEvent.h
+++ b/public/platform/WebFrameTime.h
@@ -28,28 +28,42 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebWaitableEvent_h
-#define WebWaitableEvent_h
+#ifndef WebFrameTime_h
+#define WebFrameTime_h
#include "WebCommon.h"
namespace blink {
-// Provides a thread synchronization that can be used to allow one thread to
-// wait until another thread to finish some work.
-class WebWaitableEvent {
-public:
- virtual ~WebWaitableEvent() { }
+struct WebFrameTime {
Sami 2014/07/02 13:24:38 Any reason not just to call this WebBeginFrameArgs
+ WebFrameTime(double lastFrameTime, double renderDeadline, double displayFrameTime, double predictedNextDisplayFrameTime)
+ : lastFrameTime(lastFrameTime)
+ , renderDeadline(renderDeadline)
+ , displayFrameTime(displayFrameTime)
+ , predictedNextDisplayFrameTime(predictedNextDisplayFrameTime)
+ { }
- // Waits indefinitely for the event to be signaled.
- virtual void wait() = 0;
+ // FIXME(mithro): Upgrade the time in CLOCK_MONOTONIC values to use a
+ // TimeTick like class rather than a bare double.
- // Puts the event in the signaled state. Causing any thread blocked on Wait
- // to be woken up. The event state is reset to non-signaled after
- // a waiting thread has been released.
- virtual void signal() = 0;
+ // Time in CLOCK_MONOTONIC that is the most recent vsync time.
+ double lastFrameTime;
+
+ // Time in CLOCK_MONOTONIC by which rendering must be finished by to not
+ // stall the pipeline.
+ double renderDeadline;
+
+ // Time in CLOCK_MONOTONIC that the frame will hit the glass of the display
+ // if rendered within the deadline. This time may be identical to
+ // lastFrameTime.
+ double displayFrameTime;
+
+ // Time in CLOCK_MONOTONIC that is the predicated next value for
+ // displayFrameTime. The next displayFrameTime should be this value or
+ // greater.
+ double predictedNextDisplayFrameTime;
};
} // namespace blink
-#endif // WebWaitableEvent_h
+#endif
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | public/web/WebWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698