Chromium Code Reviews| 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..8fed979651fcf8686564f757bbbab2fcb5cdd88f 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. |
|
Sami
2013/04/16 09:44:21
Nit: no comma.
no sievers
2013/04/16 18:37:04
Done.
|
| + private boolean mPendingRendererFrame = false; |
| + |
| /** |
| * Constructs a new ContentViewCore. Embedders must call initialize() after constructing |
| * a ContentViewCore and before using it. |
| @@ -801,8 +804,9 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient { |
| * @return Whether there was a pending renderer frame. |
| */ |
| public boolean consumePendingRendererFrame() { |
|
palmer
2013/04/16 17:21:30
Should be named |hasConsumed...|?
no sievers
2013/04/16 18:37:04
...and related to this question: Yes and no :)
The
|
| - 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. |