| Index: ui/android/java/src/org/chromium/ui/VSyncMonitor.java
|
| diff --git a/ui/android/java/src/org/chromium/ui/VSyncMonitor.java b/ui/android/java/src/org/chromium/ui/VSyncMonitor.java
|
| index 58055857901045caf862fef636e24d4a291d7cd0..7d9d8a6ac98e53d8ddda213c4bba96a070426e76 100644
|
| --- a/ui/android/java/src/org/chromium/ui/VSyncMonitor.java
|
| +++ b/ui/android/java/src/org/chromium/ui/VSyncMonitor.java
|
| @@ -15,9 +15,6 @@ import org.chromium.base.TraceEvent;
|
|
|
| /**
|
| * Notifies clients of the default displays's vertical sync pulses.
|
| - * This class works in "burst" mode: once the update is requested, the listener will be
|
| - * called MAX_VSYNC_COUNT times on the vertical sync pulses (on JB) or on every refresh
|
| - * period (on ICS, see below), unless stop() is called.
|
| * On ICS, VSyncMonitor relies on setVSyncPointForICS() being called to set a reasonable
|
| * approximation of a vertical sync starting point; see also http://crbug.com/156397.
|
| */
|
| @@ -26,7 +23,6 @@ public class VSyncMonitor {
|
| private static final long NANOSECONDS_PER_SECOND = 1000000000;
|
| private static final long NANOSECONDS_PER_MILLISECOND = 1000000;
|
| private static final long NANOSECONDS_PER_MICROSECOND = 1000;
|
| - public static final int MAX_AUTO_ONVSYNC_COUNT = 5;
|
|
|
| /**
|
| * VSync listener class
|
| @@ -46,7 +42,6 @@ public class VSyncMonitor {
|
| private final long mRefreshPeriodNano;
|
|
|
| private boolean mHaveRequestInFlight;
|
| - private int mTriggerNextVSyncCount;
|
|
|
| // Choreographer is used to detect vsync on >= JB.
|
| private final Choreographer mChoreographer;
|
| @@ -84,7 +79,6 @@ public class VSyncMonitor {
|
| .getDefaultDisplay().getRefreshRate();
|
| if (refreshRate <= 0) refreshRate = 60;
|
| mRefreshPeriodNano = (long) (NANOSECONDS_PER_SECOND / refreshRate);
|
| - mTriggerNextVSyncCount = 0;
|
|
|
| if (enableJBVSync && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
|
| // Use Choreographer on JB+ to get notified of vsync.
|
| @@ -141,20 +135,10 @@ public class VSyncMonitor {
|
| }
|
|
|
| /**
|
| - * Stop reporting vsync events. Note that at most one pending vsync event can still be delivered
|
| - * after this function is called.
|
| - */
|
| - public void stop() {
|
| - mTriggerNextVSyncCount = 0;
|
| - }
|
| -
|
| - /**
|
| * Request to be notified of the closest display vsync events.
|
| * Listener.onVSync() will be called soon after the upcoming vsync pulses.
|
| - * It will be called at most MAX_AUTO_ONVSYNC_COUNT times unless requestUpdate() is called.
|
| */
|
| public void requestUpdate() {
|
| - mTriggerNextVSyncCount = MAX_AUTO_ONVSYNC_COUNT;
|
| postCallback();
|
| }
|
|
|
| @@ -174,10 +158,6 @@ public class VSyncMonitor {
|
| assert mHaveRequestInFlight;
|
| mHaveRequestInFlight = false;
|
| mLastVSyncCpuTimeNano = currentTimeNanos;
|
| - if (mTriggerNextVSyncCount >= 0) {
|
| - mTriggerNextVSyncCount--;
|
| - postCallback();
|
| - }
|
| if (mListener != null) {
|
| mListener.onVSync(this, frameTimeNanos / NANOSECONDS_PER_MICROSECOND);
|
| }
|
|
|