DescriptionAdd SwapPromise support to LayerTreeHost and LayerTreeImpl
When a change to the compositor's state/invalidation/whatever happens, a
Swap Promise can be inserted into LayerTreeHost/LayerTreeImpl, to track
whether the compositor's reply to the new state/invaliadtion/whatever is
completed in the compositor, i.e. the compositor knows it has been sent
to its output or not.
If the new compositor state is sent to the output, SwapPromise::DidSwap()
will be called, and if the compositor fails to send its new state to the
output, e.g. commit fails on main thread, new frame data has no actual
damage so LayerTreeHostImpl::SwapBuffers() bails out early, then
Promise::DidNotSwap() will be called.
BUG=246034, 271583
TEST=unittests pass.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=237444
Patch Set 1 #Patch Set 2 : Add comments for when to use QueueSwapPromise() #
Total comments: 14
Patch Set 3 : rework SwapPromise() interface to have virtual DidSwap() & DidNotSwap() interface #
Total comments: 50
Patch Set 4 : address Dana's comments #
Total comments: 1
Patch Set 5 : rename TakeSwapPromises to PassSwapPromises & remove 'type' from SwapPromise #Patch Set 6 : remove SwapPromiseType #Patch Set 7 : check NULL SwapPromise* before using it #Patch Set 8 : Remove FinishSwapPromise from LTH; Add lock to TestSwapPromiseResult #Patch Set 9 : Resubmit : Remove FinishSwapPromise from LTH; Add lock to TestSwapPromiseResult #Patch Set 10 : resubmit again #Patch Set 11 : rebase & reupload #Patch Set 12 : fix typo #
Total comments: 2
Patch Set 13 : DCHECK(swap_promise_list_[i]) before dereference #
Total comments: 4
Patch Set 14 : Move DCHECK of NULL SwapPromise into QueueSwapPromise() #
Total comments: 4
Patch Set 15 : no .get() on scoped_ptr for DCHECK #Patch Set 16 : add OVERRIDE to TestSwapPromise::DidNotSwap #
Messages
Total messages: 28 (0 generated)
|