From d9778cca7adc98309edcaff49f323b9490af9fb9 Mon Sep 17 00:00:00 2001 From: "jinho.bang@samsung.com" Date: Tue, 28 Jan 2014 23:46:37 +0000 Subject: Returning back from any app [after share via] is creating a black screen When the surfaceView is destroyed during compositing, ContentViewRenderView can't receive the message. So, the onSwapBuffers event will not occurs, and the value of mPendingSwapBuffers will increasing without bound. To prevent the problem, currently, the value is initialized in onReadyToRender method. However, content_shell and chromium_test_shell override the method and don't call super method. BUG=337770 Review URL: https://codereview.chromium.org/134353004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247525 0039d316-1c4b-4281-b951-d872f2087c98 --- .../src/org/chromium/content/browser/ContentViewRenderView.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 6b7706b..90481f6 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 @@ -78,6 +78,10 @@ public class ContentViewRenderView extends FrameLayout { public void surfaceCreated(SurfaceHolder holder) { assert mNativeContentViewRenderView != 0; nativeSurfaceCreated(mNativeContentViewRenderView, holder.getSurface()); + + mPendingSwapBuffers = 0; + mPendingRenders = 0; + onReadyToRender(); } @@ -207,8 +211,6 @@ public class ContentViewRenderView extends FrameLayout { * render. */ protected void onReadyToRender() { - mPendingSwapBuffers = 0; - mPendingRenders = 0; } /** -- cgit v1.1