ViewRootImpl: Fix overlapping BLAST Sync issues.
Currently we aren't well equipped to handle overlapping synchronization.
That is to say where a second BLAST Sync begins before the first one finishes.
We track enabling this in b/149747443. In the mean-time we take a few steps
to prevent overlap:
1. Call finishBLASTSync directly from the RT callback rather than posting
to the UI thread.
2. Before consuming "mNextDrawUseBLASTSync" fence the threaded renderer to make sure
any previous draw has finished and emitted its callback.
3. Use seperate variable for tracking whether the BLAST transaction has been applied
so that an earlier draw finishing inbetween us calling setNextDrawUseBLASTSync
and calling performDraw, will not lear the value of mNextDrawUseBlastSync.
Test: Flip the flag, play with youtube.
Bug: 149747443
Bug: 146598493
Bug: 149251083
Bug: 149315421
Change-Id: I6cfd976cd72345acc814fc99d182b50456014a0e
1 file changed