diff options
| author | John Reck <jreck@google.com> | 2014-02-28 13:02:15 -0800 |
|---|---|---|
| committer | John Reck <jreck@google.com> | 2014-02-28 13:02:15 -0800 |
| commit | f9a901e1018408ddf9e21105695b2bd5814db1fb (patch) | |
| tree | 082627f3ce8bf73af91dcf5bcb706b1e8d1e0177 /core/java/android/view/ViewRootImpl.java | |
| parent | 8fb4cf1ef4ca3b3c5ea1897cc1a4f9f5dc454877 (diff) | |
| download | frameworks_base-f9a901e1018408ddf9e21105695b2bd5814db1fb.zip frameworks_base-f9a901e1018408ddf9e21105695b2bd5814db1fb.tar.gz frameworks_base-f9a901e1018408ddf9e21105695b2bd5814db1fb.tar.bz2 | |
Avoid running functors after detach
Bug: 10861732
Change-Id: Ida55fff716c37c6ab1c98eef02582282de0034f6
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 2b32d70..a338e6e 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -267,6 +267,10 @@ public final class ViewRootImpl implements ViewParent, HardwareLayer mResizeBuffer; long mResizeBufferStartTime; int mResizeBufferDuration; + // Used to block the creation of the ResizeBuffer due to invalidations in + // the previous DisplayList tree that must prevent re-execution. + // Currently this means a functor was detached. + boolean mBlockResizeBuffer; static final Interpolator mResizeInterpolator = new AccelerateDecelerateInterpolator(); private ArrayList<LayoutTransition> mPendingTransitions; @@ -667,6 +671,7 @@ public final class ViewRootImpl implements ViewParent, } public void detachFunctor(int functor) { + mBlockResizeBuffer = true; if (mAttachInfo.mHardwareRenderer != null) { mAttachInfo.mHardwareRenderer.detachFunctor(functor); } @@ -1454,7 +1459,8 @@ public final class ViewRootImpl implements ViewParent, !mAttachInfo.mTurnOffWindowResizeAnim && mAttachInfo.mHardwareRenderer != null && mAttachInfo.mHardwareRenderer.isEnabled() && - lp != null && !PixelFormat.formatHasAlpha(lp.format)) { + lp != null && !PixelFormat.formatHasAlpha(lp.format) + && !mBlockResizeBuffer) { disposeResizeBuffer(); @@ -2377,6 +2383,7 @@ public final class ViewRootImpl implements ViewParent, mCurrentDirty.set(dirty); dirty.setEmpty(); + mBlockResizeBuffer = false; attachInfo.mHardwareRenderer.draw(mView, attachInfo, this, animating ? null : mCurrentDirty); } else { |
