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

This commit is contained in:
TreeHugger Robot
2022-10-05 20:22:11 +00:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 1 deletions

View File

@@ -8158,6 +8158,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;
@@ -8197,6 +8198,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();