private void tryReleaseSurfaces() {
mSurfaceAlpha = 1f;
synchronized (mSurfaceControlLock) {
mSurface.destroy();
if (mBlastBufferQueue != null) {
mBlastBufferQueue.destroy();
mBlastBufferQueue = null;
}
ViewRootImpl viewRoot = getViewRootImpl();
Transaction transaction = new Transaction();
releaseSurfaces(transaction);
if (viewRoot != null) {
viewRoot.applyTransactionOnDraw(transaction);
} else {
transaction.apply();
}
}
}
Android 12 开始使用了 BLASTBufferQueue。
transaction
合并到下一帧。