summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorchaviw <chaviw@google.com>2020-08-31 18:57:15 -0700
committerchaviw <chaviw@google.com>2020-09-22 13:39:03 -0700
commit422dd22c3d58394a47c26b1199c7172260543543 (patch)
tree91aacef4ba00ce924a1665674e7533456c1a4454 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parentb222d48559fdb10955e7a7c321c9e0e4e9dbd812 (diff)
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
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions