Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eef19cc2 authored by John Reck's avatar John Reck
Browse files

DisplayList lifecycle fixes

 Bug: 13324014
 Bug: 13324861

 Don't use a DisplayList for the background if the View is detached.
 mAttachInfo can be null in onDetachedFromWindow

Change-Id: I6d1413b956dd35cd2f5256860223013d2a570870
parent 24ba99c2
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -13128,8 +13128,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    private void cleanupDraw() {
        resetDisplayList();
        if (mAttachInfo != null) {
            mAttachInfo.mViewRootImpl.cancelInvalidate(this);
        }
    }
    /**
     * This method ensures the hardware renderer is in a valid state
@@ -15254,9 +15256,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            mBackgroundSizeChanged = false;
        }
        // Attempt to use a display list if requested.
        if (canvas != null && canvas.isHardwareAccelerated()) {
        if (canvas.isHardwareAccelerated() && mAttachInfo != null
                && mAttachInfo.mHardwareRenderer != null) {
            mBackgroundDisplayList = getDrawableDisplayList(background, mBackgroundDisplayList);
            final DisplayList displayList = mBackgroundDisplayList;