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

Commit 924d9b75 authored by Craig Mautner's avatar Craig Mautner
Browse files

Force BlackSurface to be a black surface.

BlackSurface transparency was tracking animation transparency causing
background images to peek around the corners.

Fixes bug 4998851.

Change-Id: I48ac7bf5d0cc560b655c9f12faccda411985cbad
parent 139e5aa1
Loading
Loading
Loading
Loading
+11 −12
Original line number Diff line number Diff line
@@ -42,8 +42,17 @@ public class BlackFrame {
            this.layer = layer;
            int w = r-l;
            int h = b-t;
            if (WindowManagerService.DEBUG_SURFACE_TRACE) {
                surface = new WindowStateAnimator.SurfaceTrace(session, 0, "BlackSurface("
                        + l + ", " + t + ")",
                        -1, w, h, PixelFormat.OPAQUE, Surface.FX_SURFACE_DIM);
            } else {
                surface = new Surface(session, 0, "BlackSurface",
                        -1, w, h, PixelFormat.OPAQUE, Surface.FX_SURFACE_DIM);
            }
            surface.setAlpha(1);
            surface.setLayer(layer);
            surface.show();
            if (WindowManagerService.SHOW_TRANSACTIONS ||
                    WindowManagerService.SHOW_SURFACE_ALLOC) Slog.i(WindowManagerService.TAG,
                            "  BLACK " + surface + ": CREATE layer=" + layer);
@@ -58,8 +67,6 @@ public class BlackFrame {
            surface.setMatrix(
                    mTmpFloats[Matrix.MSCALE_X], mTmpFloats[Matrix.MSKEW_Y],
                    mTmpFloats[Matrix.MSKEW_X], mTmpFloats[Matrix.MSCALE_Y]);
            surface.setAlpha(1.0f);
            surface.setLayer(layer);
            if (false) {
                Slog.i(WindowManagerService.TAG, "Black Surface @ (" + left + "," + top + "): ("
                        + mTmpFloats[Matrix.MTRANS_X] + ","
@@ -159,14 +166,6 @@ public class BlackFrame {
        }
    }

    public void setAlpha(float alpha) {
        for (int i=0; i<mBlackSurfaces.length; i++) {
            if (mBlackSurfaces[i] != null) {
                mBlackSurfaces[i].surface.setAlpha(alpha);
            }
        }
    }

    public void clearMatrix() {
        for (int i=0; i<mBlackSurfaces.length; i++) {
            if (mBlackSurfaces[i] != null) {
+0 −1
Original line number Diff line number Diff line
@@ -862,7 +862,6 @@ class ScreenRotationAnimation {
            } else {
                mExitFrameFinalMatrix.setConcat(mExitTransformation.getMatrix(), mFrameInitialMatrix);
                mExitingBlackFrame.setMatrix(mExitFrameFinalMatrix);
                mExitingBlackFrame.setAlpha(mExitTransformation.getAlpha());
            }
        }