Descriptioncc: Remove static from leaf invalidation perf test
Make DidCommitAndDraw always change the value of the layer's opacity to
force commits and draws rather than depending on a static bool.
LayerTreeHostPerfTestLeafInvalidates had a static bool for whether to
flip a layer to 1.0 or 0.5 opacity. The leaf layer happens to start at
opacity 1.0. So, on the first run, the tree would draw once,
DidCommitAndDraw would get called, and opacity would be set to the same
value. This would cause no damage, so the tree would never draw again.
Because it would never draw again, DidCommitAndDraw wouldn't get called
again, and the opacity would never change again. The tree kept
committing (because of the test harness) but would never draw again.
The second test would do the same thing, draw once, and then encounter
this static boolean (now false). It would flip the opacity to zero (an
actual change), and would then keep alternating back and forth because
each draw would succeed.
Therefore, any test that was fast would always be followed by a slow
test, and any slow test would have a 50% chance of being followed by a
fast or a slow test.
This was exposed by r291451 because it made perf tests use the
scheduler (and would then early out of drawing for single-threaded).
The threaded version always had this bug.
*** Note: unsurprisingly, this will "regress" the performance of
LayerTreeHostPerfTestLeafInvalidates.TenTenSingleThread because it's
now doing something real.
R=danakj@chromium.org
BUG=407117
Committed: https://crrev.com/81145970e2b1c0ceff32af1de3239c48cb4b1d7e
Cr-Commit-Position: refs/heads/master@{#293408}
Patch Set 1 #
Messages
Total messages: 6 (1 generated)
|