SurfaceView: Use BLAST transaction when visibility changes.

If visibility changes we will try and hide the Surfaces from
the RT. We want to sync this with ViewRoot drawing so
we enable BLAST sync for the next frame in this case.

Bug: 152663327
Bug: 152780239
Test: Existing tests pass
Change-Id: I9cd157954a3ce87a8f95a7be97d6d5c7f324327b
This commit is contained in:
Robert Carr
2020-04-01 14:35:07 -07:00
committed by Rob Carr
parent d58849abe2
commit 59773cbdd4

View File

@@ -1037,7 +1037,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
mTmpTransaction.setWindowCrop(mSurfaceControl, mSurfaceWidth,
mSurfaceHeight);
}
} else if ((layoutSizeChanged || positionChanged) &&
} else if ((layoutSizeChanged || positionChanged || visibleChanged) &&
viewRoot.useBLAST()) {
viewRoot.setUseBLASTSyncTransaction();
}