diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 583b76a4d8d41..d2c6a765d9be8 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -8309,20 +8309,10 @@ 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()) { - // 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(); - } + 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;