DescriptionDo not send a frame swap ack from the browser until the frame is drawn
Code to do this was recently removed because it was no longer being
used in r241225 (https://codereview.chromium.org/116103002). This is
now necessary again to throttle renderers when using CoreAnimation.
Frames are acked only when they are drawn. Both the CoreAnimation and
the non-CoreAnimation paths are changed to behave this way. By virtue
of the fact that the non-CoreAnimation path draws immediately, this
should have no functional effect on that path.
This differs from the mechanism deleted in the aforementioned patch in
two ways.
First, it uses a scoped_ptr of a struct instead of a vector of pairs to
store the information about the swap being returned. This should improve
readability in that the ack has struct names instead of just first and
second in the pair, and in that the scoped_ptr does not suggest support
for multiple pending swaps (which does not exist).
Second, it does makes RWHVMac ack frames more aggressively when
inside a draw call, rather than adding a call from RWHImpl to the view,
to effect the ack (which is what the old way does).
BUG=340133
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251918
Patch Set 1 #
Total comments: 4
Patch Set 2 : More 500s #Patch Set 3 : Re-resolve #
Total comments: 4
Patch Set 4 : Incorporate review feedback #Patch Set 5 : Add swap ack missed with devtools overlays #
Messages
Total messages: 15 (0 generated)
|