Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Issue 430503004: Fix end-of-pattern matching for Skia recording optimization. (Closed)

Created:
6 years, 4 months ago by dneto
Modified:
6 years, 4 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

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 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -1 line) Patch
M src/core/SkPictureRecord.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M tests/PictureTest.cpp View 1 2 3 1 chunk +48 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
mtklein
This looks right to me. Some nits on the test only. Thank you for fixing ...
6 years, 4 months ago (2014-07-30 18:47:26 UTC) #1
robertphillips
https://codereview.chromium.org/430503004/diff/40001/tests/PictureTest.cpp File tests/PictureTest.cpp (right): https://codereview.chromium.org/430503004/diff/40001/tests/PictureTest.cpp#newcode1630 tests/PictureTest.cpp:1630: SkImageInfo onePixelII = SkImageInfo::Make(1,1,kBGRA_8888_SkColorType,kPremul_SkAlphaType); blueBM? - Skia doesn't use ...
6 years, 4 months ago (2014-07-30 19:03:50 UTC) #2
dneto
Thanks for the feedback. I'm new to Skia. I've just uploaded a patch addressing your ...
6 years, 4 months ago (2014-07-30 19:26:21 UTC) #3
mtklein
lgtm
6 years, 4 months ago (2014-07-30 19:30:06 UTC) #4
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 4 months ago (2014-07-30 22:30:47 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dneto@chromium.org/430503004/60001
6 years, 4 months ago (2014-07-30 22:31:00 UTC) #6
commit-bot: I haz the power
6 years, 4 months ago (2014-07-30 22:42:27 UTC) #7
Message was sent while issue was closed.
Change committed as 3f22e8c44a16d93377c0a3881f936e692b5b3320

Powered by Google App Engine
This is Rietveld 408576698