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
Loading
Please register or sign in to comment