Ensure overlapping draws won't break BLAST sync
Previously, the code would pause the renderer and then call setNextTransaction. This was to ensure the transaction would wait for the upcoming frame, not the previous one that may about to get processed. This was bad becuase it slows down the renderer. Instead, add a frameCallback listener to the renderer and call setNextTransaction when the frame callback is invoked. This will ensure that we only call setNextTransaction when the renderer is ready to draw, ensuring the next frame in BLASTBufferQueue is the correct frame to sync with the transaction. SurfaceView doesn't need to check if VRI is in a blast sync transaction since any call to PositionListener can be assumed to be a in a blast sync. This is because SV requests to use blast sync when position, size, or visibility changes. Test: Youtube with BLAST enabled Contains a SurfaceView that will force blast sync transaction Test: SurfaceViewSyncTest Fixes: 149747443 Change-Id: I3e42f87aa8473ee0ee65f23cc00db95f112b4f63
Loading
Please register or sign in to comment