Chromium Code Reviews| 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 |