Descriptioncc: Use SaveLayerAlpha bounds when doing Save-Draw-Restore optimization
When a recording does SaveLayerAlpha followed by a single drawing op
and a Restore, we can optimize that as drawing the single op with a
modified alpha. When we can't do this optimization, we were sometimes
throwing away the bounds of the SaveLayerAlpha. This would make a
different set of calls for SaveLayerAlpha-Draw-Draw-Restore vs
SaveLayerAlpha-Draw-Restore, where the latter would not use the
bounds but the former would.
Because we were dropping bounds, we've accrued code that gave
incorrect bounds and relied on them being dropped. I've fixed that
in PaintGeneratedImage in this CL to give correct LayoutTest results.
This change is verified by layout tests such as
http/tests/csspaint/background-image-alpha.html
which would fail with this CL if we didn't make the change, as this
CL would cause us to clip things outside the incorrect bounds.
BUG=671433
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
Review-Url: https://codereview.chromium.org/2914863003
Cr-Commit-Position: refs/heads/master@{#476303}
Committed: https://chromium.googlesource.com/chromium/src/+/b8da9c95f075fcaf5cbe8e646d22a711f1ccac30
Patch Set 1 #Patch Set 2 : savebounds . #
Messages
Total messages: 26 (21 generated)
|