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

Commit 7e728ca3 authored by Jorge Gil's avatar Jorge Gil Committed by Automerger Merge Worker
Browse files

Merge "Revert "Crop surface to the content size during drag-resizing"" into...

Merge "Revert "Crop surface to the content size during drag-resizing"" into udc-qpr-dev am: 44d6eed2 am: a37d35ad

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23767388



Change-Id: I46ea128007e2bf74b00cf9e784d827f02cd71649
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e4dcd10d a37d35ad
Loading
Loading
Loading
Loading
+4 −14
Original line number Diff line number Diff line
@@ -8315,21 +8315,11 @@ public final class ViewRootImpl implements ViewParent,
            }
        }

        if (mSurfaceControl.isValid()) {
            if (mPendingDragResizing && !mSurfaceSize.equals(
                    mWinFrameInScreen.width(), mWinFrameInScreen.height())) {
                // During drag-resize, a single fullscreen-sized surface is reused for optimization.
                // Crop to the content size instead of the surface size to avoid exposing garbage
                // content that is still on the surface from previous re-layouts (e.g. when
                // resizing to a larger size).
                mTransaction.setWindowCrop(mSurfaceControl,
                        mWinFrameInScreen.width(), mWinFrameInScreen.height());
            } else if (!HardwareRenderer.isDrawingEnabled()) {
        if (mSurfaceControl.isValid() && !HardwareRenderer.isDrawingEnabled()) {
            // When drawing is disabled the window layer won't have a valid buffer.
            // Set a window crop so input can get delivered to the window.
            mTransaction.setWindowCrop(mSurfaceControl, mSurfaceSize.x, mSurfaceSize.y).apply();
        }
        }

        mLastTransformHint = transformHint;