DescriptionFix end-of-pattern matching for Skia recording optimization.
The recorder optimizer's pattern matcher was accepting command sequences
when it shouldn't have.
In the submitted case, and the pattern matcher was looking for:
saveLayer, drawBitmap, restore
and in the rendering for the submitted case, the sequence of commands
were:
saveLayer, drawBitmap, drawBitmap, restore
This sequence was improperly accepted by the matcher, and the optimizer
reduced the sequence to:
drawBitmap, drawBitmap
where the opacity from the saveLayer paint argument was applied
to the first drawBitmap only.
The user-visible effect in Chrome was a flashing effect on an image
caused by incorrect (too-high) opacity.
The patch adds a Skia test to check for pixel colour values in
a similarly structured recording. All other Skia tests pass.
Blink layout tests also pass with this change.
BUG=chromium:344987
Committed: https://skia.googlesource.com/skia/+/3f22e8c44a16d93377c0a3881f936e692b5b3320
Patch Set 1 #Patch Set 2 : Test: use colour values that avoid rounding edge cases #Patch Set 3 : Test: use explicit color type when reading pixels #
Total comments: 12
Patch Set 4 : Test fixes: leak, var names, lint #
Messages
Total messages: 7 (0 generated)
|