DescriptionUse Begin/End semantics for synthetic delays
Currently synthetic delays use an Activate/Apply scheme were Activate
can be called several times and a single call to Apply will execute the
delay. Both calls need to happen on the same thread.
This patch changes this to a Begin/End model where the delay start point
is designated with Begin and executed with End. Both calls can happen on
any thread for a given delay. Calls can also be nested so that the inner
Begin/End pairs do nothing and only the outermost End will apply the
delay.
This change is primarily to make it easier to integrate synthetic delays
to asynchronous tasks such as texture uploads. One only needs to call
Begin for every queued task and then End in each individual tasks to
apply the delay automatically to a "burst" of work.
This patch also introduces parallel versions of Begin and End. They are
useful for several applying independent instances of the same delay.
We also add a function for resetting all registered synthetic delays.
This is needed for telemetry tests to reset delays to a clean slate
between pages.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243409
Patch Set 1 #Patch Set 2 : Add parallel Begin/End and reset. #
Total comments: 4
Patch Set 3 : Allow several scoped delays to run in parallel. #Patch Set 4 : Rebased. #
Messages
Total messages: 7 (0 generated)
|