| Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| index 6d44e042af538f17c108e45c3c0b3dc3706ee2b3..cc1296bddd4a96a7c2bbfb4d3acaa14d55c3f9ee 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
| @@ -248,6 +248,9 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
|
| // Whether we use hardware-accelerated drawing.
|
| private boolean mHardwareAccelerated = false;
|
|
|
| + // Whether we received a new frame since consumePendingRendererFrame() was last called.
|
| + private boolean mPendingRendererFrame = false;
|
| +
|
| /**
|
| * Constructs a new ContentViewCore. Embedders must call initialize() after constructing
|
| * a ContentViewCore and before using it.
|
| @@ -796,13 +799,14 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
|
| }
|
|
|
| /**
|
| - * Indicate that the browser compositor has consumed a pending renderer frame.
|
| + * Mark any new frames that have arrived since this function was last called as non-pending.
|
| *
|
| - * @return Whether there was a pending renderer frame.
|
| + * @return Whether there was a pending frame from the renderer.
|
| */
|
| public boolean consumePendingRendererFrame() {
|
| - return mNativeContentViewCore == 0 ?
|
| - false : nativeConsumePendingRendererFrame(mNativeContentViewCore);
|
| + boolean hadPendingFrame = mPendingRendererFrame;
|
| + mPendingRendererFrame = false;
|
| + return hadPendingFrame;
|
| }
|
|
|
| /**
|
| @@ -2056,6 +2060,8 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
|
| final float overdrawBottomHeightPix = overdrawBottomHeightCss * deviceScale;
|
| getContentViewClient().onOffsetsForFullscreenChanged(
|
| controlsOffsetPix, contentOffsetYPix, overdrawBottomHeightPix);
|
| +
|
| + mPendingRendererFrame = true;
|
| }
|
|
|
| @SuppressWarnings("unused")
|
| @@ -2670,8 +2676,6 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
|
| int nativeContentViewCoreImpl, String url, int nativeInterstitialPageDelegateAndroid);
|
| private native boolean nativeIsShowingInterstitialPage(int nativeContentViewCoreImpl);
|
|
|
| - private native boolean nativeConsumePendingRendererFrame(int nativeContentViewCoreImpl);
|
| -
|
| private native boolean nativeIsIncognito(int nativeContentViewCoreImpl);
|
|
|
| // Returns true if the native side crashed so that java side can draw a sad tab.
|
|
|