Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1086)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 14210004: Consolidate UpdateFrameInfo and SwapCompositorFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/port/browser/render_widget_host_view_port.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « content/port/browser/render_widget_host_view_port.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698