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..935df011032876d5cf303a6af140b3e8a54f95ab 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. |
@@ -145,16 +139,13 @@ public class VSyncMonitor { |
* 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 +165,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); |
} |