From 6683426dbfc5e048d04970c4a10cdec6bcb1506e Mon Sep 17 00:00:00 2001 From: Hongwei Wang Date: Thu, 2 Jun 2022 10:49:31 -0700 Subject: [PATCH] Remove conflict window crop We actually do not need to crop the snapshot re-parented to the leash since it's bound to the Task's bounds. Video: http://recall/-/aaaaaabFQoRHlzixHdtY/eh7phISItWvnhSoZz8GKh8 Bug: 234642410 Test: Enter content-pip from content away from the top, see video Change-Id: I43c1ed6088d1be15b87326fb4f0cf459956a7c00 --- .../Shell/src/com/android/wm/shell/pip/PipContentOverlay.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipContentOverlay.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipContentOverlay.java index 3dea0e02c5304..0e32663955d3e 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipContentOverlay.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipContentOverlay.java @@ -134,9 +134,6 @@ public abstract class PipContentOverlay { tx.setBuffer(mLeash, mSnapshot.getHardwareBuffer()); // Relocate the content to parentLeash's coordinates. tx.setPosition(mLeash, -mSourceRectHint.left, -mSourceRectHint.top); - tx.setWindowCrop(mLeash, - (int) (mSourceRectHint.width() * mTaskSnapshotScaleX), - (int) (mSourceRectHint.height() * mTaskSnapshotScaleY)); tx.setScale(mLeash, mTaskSnapshotScaleX, mTaskSnapshotScaleY); tx.reparent(mLeash, parentLeash); tx.apply();