Check if window is using blastSync when deciding to use change tx
Even when blast sync is enabled, we still need to check if the window is part of a sync transaction when deciding if it should use the change transaction. If the window is not part of a sync transaction, we should still apply the bounds change transaction directly. In the cases where the window is part of a sync transaction, there will be no need for the bounds change transaction since the buffer will be part of the sync transaction Test: PIP works with blast sync enabled Change-Id: Ie249d787213238a65995823cec344acba881522c
This commit is contained in:
@@ -631,25 +631,25 @@ class WindowStateAnimator {
|
||||
}
|
||||
|
||||
private boolean shouldConsumeMainWindowSizeTransaction() {
|
||||
// If we use BLASTSync we always consume the transaction when finishing
|
||||
// the sync.
|
||||
if (mService.useBLASTSync()) {
|
||||
return false;
|
||||
}
|
||||
// We only consume the transaction when the client is calling relayout
|
||||
// because this is the only time we know the frameNumber will be valid
|
||||
// due to the client renderer being paused. Put otherwise, only when
|
||||
// mInRelayout is true can we guarantee the next frame will contain
|
||||
// the most recent configuration.
|
||||
if (!mWin.mInRelayout) return false;
|
||||
// Since we can only do this for one window, we focus on the main application window
|
||||
if (mAttrType != TYPE_BASE_APPLICATION) return false;
|
||||
final Task task = mWin.getTask();
|
||||
if (task == null) return false;
|
||||
if (task.getMainWindowSizeChangeTransaction() == null) return false;
|
||||
// Likewise we only focus on the task root, since we can only use one window
|
||||
if (!mWin.mActivityRecord.isRootOfTask()) return false;
|
||||
return true;
|
||||
// If we use BLASTSync we always consume the transaction when finishing
|
||||
// the sync.
|
||||
if (mService.useBLASTSync() && mWin.useBLASTSync()) {
|
||||
return false;
|
||||
}
|
||||
// We only consume the transaction when the client is calling relayout
|
||||
// because this is the only time we know the frameNumber will be valid
|
||||
// due to the client renderer being paused. Put otherwise, only when
|
||||
// mInRelayout is true can we guarantee the next frame will contain
|
||||
// the most recent configuration.
|
||||
if (!mWin.mInRelayout) return false;
|
||||
// Since we can only do this for one window, we focus on the main application window
|
||||
if (mAttrType != TYPE_BASE_APPLICATION) return false;
|
||||
final Task task = mWin.getTask();
|
||||
if (task == null) return false;
|
||||
if (task.getMainWindowSizeChangeTransaction() == null) return false;
|
||||
// Likewise we only focus on the task root, since we can only use one window
|
||||
if (!mWin.mActivityRecord.isRootOfTask()) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void setSurfaceBoundariesLocked(SurfaceControl.Transaction t, final boolean recoveringMemory) {
|
||||
|
||||
Reference in New Issue
Block a user