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

Commit 83aec80f authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Fix hardware layers lifecycle Bug #10075732" into klp-dev

parents 567c7408 46bfc481
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3865,7 +3865,7 @@ public final class ActivityThread {
        }
    }

    final void freeTextLayoutCachesIfNeeded(int configDiff) {
    static void freeTextLayoutCachesIfNeeded(int configDiff) {
        if (configDiff != 0) {
            // Ask text layout engine to free its caches if there is a locale change
            boolean hasLocaleConfigChange = ((configDiff & ActivityInfo.CONFIG_LOCALE) != 0);
+1 −0
Original line number Diff line number Diff line
@@ -486,6 +486,7 @@ public class GestureOverlayView extends FrameLayout {

    @Override
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        cancelClearAnimation();
    }

+13 −9
Original line number Diff line number Diff line
@@ -208,9 +208,22 @@ public abstract class DisplayList {
     * {@link #isValid()} will return false.
     *
     * @see #isValid()
     * @see #reset()
     */
    public abstract void clear();


    /**
     * Reset native resources. This is called when cleaning up the state of display lists
     * during destruction of hardware resources, to ensure that we do not hold onto
     * obsolete resources after related resources are gone.
     *
     * @see #clear()
     *
     * @hide
     */
    public abstract void reset();

    /**
     * Sets the dirty flag. When a display list is dirty, {@link #clear()} should
     * be invoked whenever possible.
@@ -670,13 +683,4 @@ public abstract class DisplayList {
     * @see View#offsetTopAndBottom(int)
     */
    public abstract void offsetTopAndBottom(float offset);

    /**
     * Reset native resources. This is called when cleaning up the state of display lists
     * during destruction of hardware resources, to ensure that we do not hold onto
     * obsolete resources after related resources are gone.
     *
     * @hide
     */
    public abstract void reset();
}
+1 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ class GLES20DisplayList extends DisplayList {
        if (hasNativeDisplayList()) {
            nReset(mFinalizer.mNativeDisplayList);
        }
        clear();
    }

    @Override
+3 −0
Original line number Diff line number Diff line
@@ -59,6 +59,9 @@ abstract class GLES20Layer extends HardwareLayer {

    @Override
    public void destroy() {
        if (mDisplayList != null) {
            mDisplayList.reset();
        }
        if (mFinalizer != null) {
            mFinalizer.destroy();
            mFinalizer = null;
Loading