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

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

Merge "WSA/ViewRootImpl: Move resize detection to client"

parents 2e04dc8e 60af5183
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -465,6 +465,7 @@ public final class ViewRootImpl implements ViewParent,
    // used in relayout to get SurfaceControl size
    // for BLAST adapter surface setup
    private final Point mSurfaceSize = new Point();
    private final Point mLastSurfaceSize = new Point();

    final Rect mTempRect; // used in the transaction to not thrash the heap.
    final Rect mVisRect; // used to retrieve visible rect of focused view.
@@ -2641,8 +2642,11 @@ public final class ViewRootImpl implements ViewParent,
                }

                cutoutChanged = !mPendingDisplayCutout.equals(mAttachInfo.mDisplayCutout);
                surfaceSizeChanged = (relayoutResult
                        & WindowManagerGlobal.RELAYOUT_RES_SURFACE_RESIZED) != 0;
                surfaceSizeChanged = false;
                if (!mLastSurfaceSize.equals(mSurfaceSize)) {
                    surfaceSizeChanged = true;
                    mLastSurfaceSize.set(mSurfaceSize.x, mSurfaceSize.y);
                }
                  final boolean alwaysConsumeSystemBarsChanged =
                        mPendingAlwaysConsumeSystemBars != mAttachInfo.mAlwaysConsumeSystemBars;
                updateColorModeIfNeeded(lp.getColorMode());
+0 −4
Original line number Diff line number Diff line
@@ -2386,10 +2386,6 @@ public class WindowManagerService extends IWindowManager.Stub
            if (win.mActivityRecord != null) {
                win.mActivityRecord.updateReportedVisibilityLocked();
            }
            if (winAnimator.mReportSurfaceResized) {
                winAnimator.mReportSurfaceResized = false;
                result |= WindowManagerGlobal.RELAYOUT_RES_SURFACE_RESIZED;
            }
            if (displayPolicy.areSystemBarsForcedShownLw(win)) {
                result |= WindowManagerGlobal.RELAYOUT_RES_CONSUME_ALWAYS_SYSTEM_BARS;
            }
+1 −6
Original line number Diff line number Diff line
@@ -126,11 +126,7 @@ class WindowStateAnimator {
     * we must tell them application to resize (and thus redraw itself).
     */
    boolean mSurfaceResized;
    /**
     * Whether we should inform the client on next relayoutWindow that
     * the surface has been resized since last time.
     */
    boolean mReportSurfaceResized;

    WindowSurfaceController mSurfaceController;
    private WindowSurfaceController mPendingDestroySurface;

@@ -872,7 +868,6 @@ class WindowStateAnimator {
        }

        if (mSurfaceResized) {
            mReportSurfaceResized = true;
            mWin.getDisplayContent().pendingLayoutChanges |= FINISH_LAYOUT_REDO_WALLPAPER;
        }
    }