Merge "Fixing another crash when creating/updating BLASTBufferQueue"

This commit is contained in:
Valerie Hau
2020-02-15 23:24:49 +00:00
committed by Android (Google) Code Review

View File

@@ -1705,12 +1705,13 @@ public final class ViewRootImpl implements ViewParent,
}
Surface getOrCreateBLASTSurface(int width, int height) {
if (mSurfaceControl == null || !mSurfaceControl.isValid()) {
if (mSurfaceControl == null
|| !mSurfaceControl.isValid()
|| mBlastSurfaceControl == null
|| !mBlastSurfaceControl.isValid()) {
return null;
}
if ((mBlastSurfaceControl != null)
&& (mBlastBufferQueue == null)
&& mBlastSurfaceControl.isValid()) {
if (mBlastBufferQueue == null) {
mBlastBufferQueue = new BLASTBufferQueue(
mBlastSurfaceControl, width, height);
}