android: Trigger vsync immediately when started from idle
commit2fcae0f28b8c7dee14fa611c22fe198651e8cde0
authorskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 28 Nov 2013 16:47:55 +0000 (28 16:47 +0000)
committerskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 28 Nov 2013 16:47:55 +0000 (28 16:47 +0000)
treec13e0a25efa84e32b261ac84ea78573ecab9e4d8
parent89cee33bd33769684e2261f6d79446dafdbdcf7c
android: Trigger vsync immediately when started from idle

If the vsync monitor is started from idle, the vsync notification will
only get delivered for the upcoming frame instead of the current one. To
reduce latency, this patch makes VSyncMonitor synthesize a vsync signal
right away. The frame time for the synthesized signal is estimated from
previous vsync events.

BUG=321245

Review URL: https://codereview.chromium.org/88633002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237805 0039d316-1c4b-4281-b951-d872f2087c98
content/public/android/java/src/org/chromium/content/browser/VSyncMonitor.java
content/public/android/javatests/src/org/chromium/content/browser/VSyncMonitorTest.java