Replace SyncTarget with SurfaceSyncGroup
Remove SyncTarget and make all uses of SyncTarget use SurfaceSyncGroup. This makes sense moving forward because we want to add SurfaceSyncGroups to other SurfaceSyncGroups. The flow will be the following: 1. Create a SurfaceSyncGroup 2. Add that SurfaceSyncGroup to another SurfaceSyncGroup if it needs to be combined with other things 3. When no more things need to be added to the SurfaceSyncGroup and it's ready to finish, call onTransactionReady. This will mark the SurfaceSyncGroup as ready and allow it to apply or merge if it has no pending SurfaceSyncGroup children This works well in VRI since we can just create a single SurfaceSyncGroup to represent the VRI itself. SV can add their own SurfaceSyncGroups to the VRI's one. VRI's SurfaceSyncGroup can be added to any other SurfaceSyncGroups that want to synchronize the VRI. VRI just calls onTransactionReady directly on its SurfaceSyncGroup when it has drawn its buffer. If it has a parent, it will be notified and the transaction merged into the parent. If no parent, it will be applied directly. Test: SurfaceSyncGroupTest Test: SurfaceSyncGroupContinuousTest Bug: 237804605 Change-Id: If691412505e8ba2503dd093399227327a0b6fdb1
Loading
Please register or sign in to comment