Merge "Fix input when hardware renderer drawing is disabled." into tm-qpr-dev am: 0854d61745

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

Change-Id: Ice90045eed7057cdef92ec2c1e28826222172a18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-10-05 20:38:09 +00:00
committed by Automerger Merge Worker
2 changed files with 8 additions and 1 deletions

View File

@@ -8160,6 +8160,7 @@ public final class ViewRootImpl implements ViewParent,
mLastSyncSeqId, mTmpFrames, mPendingMergedConfiguration, mSurfaceControl,
mTempInsets, mTempControls, mRelayoutBundle);
mRelayoutRequested = true;
final int maybeSyncSeqId = mRelayoutBundle.getInt("seqid");
if (maybeSyncSeqId > 0) {
mSyncSeqId = maybeSyncSeqId;
@@ -8199,6 +8200,12 @@ public final class ViewRootImpl implements ViewParent,
}
}
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;
mSurfaceControl.setTransformHint(transformHint);

View File

@@ -481,7 +481,7 @@ final class LetterboxUiController {
}
private void updateRoundedCorners(WindowState mainWindow) {
final SurfaceControl windowSurface = mainWindow.getClientViewRootSurface();
final SurfaceControl windowSurface = mainWindow.getSurfaceControl();
if (windowSurface != null && windowSurface.isValid()) {
final Transaction transaction = mActivityRecord.getSyncTransaction();