Loading core/java/android/view/SurfaceView.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -138,6 +138,8 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb case DRAW_FINISHED_MSG: { case DRAW_FINISHED_MSG: { mDrawFinished = true; mDrawFinished = true; if (mAttachedToWindow) { if (mAttachedToWindow) { mParent.requestTransparentRegion(SurfaceView.this); notifyDrawFinished(); notifyDrawFinished(); invalidate(); invalidate(); } } Loading Loading @@ -247,7 +249,6 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb getViewRootImpl().addWindowStoppedCallback(this); getViewRootImpl().addWindowStoppedCallback(this); mWindowStopped = false; mWindowStopped = false; mParent.requestTransparentRegion(this); mViewVisibility = getVisibility() == VISIBLE; mViewVisibility = getVisibility() == VISIBLE; updateRequestedVisibility(); updateRequestedVisibility(); Loading Loading @@ -352,7 +353,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb @Override @Override public boolean gatherTransparentRegion(Region region) { public boolean gatherTransparentRegion(Region region) { if (isAboveParent()) { if (isAboveParent() || !mDrawFinished) { return super.gatherTransparentRegion(region); return super.gatherTransparentRegion(region); } } Loading Loading
core/java/android/view/SurfaceView.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -138,6 +138,8 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb case DRAW_FINISHED_MSG: { case DRAW_FINISHED_MSG: { mDrawFinished = true; mDrawFinished = true; if (mAttachedToWindow) { if (mAttachedToWindow) { mParent.requestTransparentRegion(SurfaceView.this); notifyDrawFinished(); notifyDrawFinished(); invalidate(); invalidate(); } } Loading Loading @@ -247,7 +249,6 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb getViewRootImpl().addWindowStoppedCallback(this); getViewRootImpl().addWindowStoppedCallback(this); mWindowStopped = false; mWindowStopped = false; mParent.requestTransparentRegion(this); mViewVisibility = getVisibility() == VISIBLE; mViewVisibility = getVisibility() == VISIBLE; updateRequestedVisibility(); updateRequestedVisibility(); Loading Loading @@ -352,7 +353,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb @Override @Override public boolean gatherTransparentRegion(Region region) { public boolean gatherTransparentRegion(Region region) { if (isAboveParent()) { if (isAboveParent() || !mDrawFinished) { return super.gatherTransparentRegion(region); return super.gatherTransparentRegion(region); } } Loading