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

Commit c954780a authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge "Prevent SurfaceView flash while resizing."

parents b2d8e4f0 84b0574c
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2863,7 +2863,11 @@ public class WindowManagerService extends IWindowManager.Stub
        // notifying the client to render to with an offset from the surface's top-left.
        if (win.isDragResizeChanged()) {
            win.setDragResizing();
            if (win.mHasSurface) {
            // We can only change top level windows to the full-screen surface when
            // resizing (as we only have one full-screen surface). So there is no need
            // to preserve and destroy windows which are attached to another, they 
            // will keep their surface and its size may change over time.
            if (win.mHasSurface && win.mAttachedWindow == null) {
                winAnimator.preserveSurfaceLocked();
                result |= WindowManagerGlobal.RELAYOUT_RES_FIRST_TIME;
            }
+6 −1
Original line number Diff line number Diff line
@@ -735,7 +735,12 @@ class WindowStateAnimator {

        if (mSurfaceController != null) {
            int i = mWin.mChildWindows.size();
            while (i > 0) {
            // When destroying a surface we want to make sure child windows
            // are hidden. If we are preserving the surface until redraw though
            // we intend to swap it out with another surface for resizing. In this case
            // the window always remains visible to the user and the child windows
            // should likewise remain visable.
            while (!mDestroyPreservedSurfaceUponRedraw && i > 0) {
                i--;
                WindowState c = mWin.mChildWindows.get(i);
                c.mAttachedHidden = true;