Skip to content
Commit a8ff59df authored by chaviw's avatar chaviw Committed by Chavi Weingarten
Browse files

Clean up unused code.

Since SurfaceView no longer enables blast sync transactions, a lot of
the code is no longer needed.

BlastSync is only set when ViewRootImpl calls relayout that returns the
blast sync flag. This means, we are guaranteed to pause the UI thread
since we don't want to allow overlapping relayouts. Because of this, we
can remove a lot of the complex code and variables.

1. We no longer need both mSendNextFrameToWm and
mNextDrawUseBLASTSyncTransaction. This is because if mSendNextFrameToWm
is true, we will pause the traverse and never set
mNextDrawUseBLASTSyncTransaction until mSendNextFrameToWm is set to
false.

2. Similarly, we don't need mRtNextFrameReportedConsumeWithBlast. This
was added to help with overlapping requests. Since that's no longer
possible, we can just remove this and use mSendNextFrameToWm as the
check

3. We also don't have to be thread safe with mRtBLASTSyncTransaction
since we only update it when the UI thread is paused.

4. We no longer need to call setNextTransaction with null since that was
only when SurfaceView was calling useBlastSyncTransaction and the main
window wasn't drawing. That no longer happens and we are guaranteed
that setNextTransaction is only set when a relayout occurs.

Test: Enable blast sync and use split/pip
Bug: 175229445
Change-Id: I0bebd15804ea3b960e85c20235ae5ce98bcc3f00
parent 6fbb788f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment