Index: content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java |
index 3c7f70bbfed632537eb6bbe7851df3f8718ac582..16e5bd4d56a3825498620a010612842a3bc398f0 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java |
@@ -264,29 +264,28 @@ public class ContentViewRenderView extends FrameLayout { |
if (mPendingSwapBuffers > 0) mPendingSwapBuffers--; |
} |
- private void didCompositeAndDraw() { |
+ private void render() { |
+ if (mPendingRenders > 0) mPendingRenders--; |
+ |
+ // Waiting for the content view contents to be ready avoids compositing |
+ // when the surface texture is still empty. |
if (mCurrentContentView == null) return; |
ContentViewCore contentViewCore = mCurrentContentView.getContentViewCore(); |
- if (contentViewCore == null || !contentViewCore.isReady() || getBackground() == null) { |
+ if (contentViewCore == null || !contentViewCore.isReady()) { |
return; |
} |
- if (getBackground() != null) { |
- post(new Runnable() { |
- @Override |
- public void run() { |
- setBackgroundResource(0); |
- } |
- }); |
- } |
- } |
- |
- private void render() { |
- if (mPendingRenders > 0) mPendingRenders--; |
boolean didDraw = nativeComposite(mNativeContentViewRenderView); |
if (didDraw) { |
mPendingSwapBuffers++; |
- didCompositeAndDraw(); |
+ if (getBackground() != null) { |
+ post(new Runnable() { |
bulach
2013/11/15 15:54:02
while at it then.... is churning out new Runnable(
Sami
2013/11/15 16:06:28
This runnable is just removing the static backgrou
bulach
2013/11/15 16:07:40
got it, thanks!
|
+ @Override |
+ public void run() { |
+ setBackgroundResource(0); |
+ } |
+ }); |
+ } |
} |
} |