diff options
author | dneto <dneto@chromium.org> | 2014-07-30 15:42:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-07-30 15:42:22 -0700 |
commit | 3f22e8c44a16d93377c0a3881f936e692b5b3320 (patch) | |
tree | f47787b30555eee25078d6b411f3fbb54e0f2eaf /src | |
parent | 3d822c29d4272a6749e59801b202b1ed6d611be8 (diff) |
Fix 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
R=robertphillips@google.com, reed@google.com, mtklein@google.com
Author: dneto@chromium.org
Review URL: https://codereview.chromium.org/430503004
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkPictureRecord.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp index 566cb196ba..ab4c3fa38e 100644 --- a/src/core/SkPictureRecord.cpp +++ b/src/core/SkPictureRecord.cpp @@ -319,7 +319,6 @@ static bool match(SkWriter32* writer, uint32_t offset, return false; } - curOffset += curSize; if (curOffset < writer->bytesWritten()) { // Something else between the last command and the end of the stream return false; |