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

Issue 496963003: Fix saveLayer() with a pixel-moving filter vs SkBBoxHierarchyRecord / SkRecordDraw (Closed)

Created:
6 years, 4 months ago by mtklein_C
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 saveLayer() with a pixel-moving filter vs SkBBoxHierarchyRecord / SkRecordDraw In SkBBoxHierarchyRecord: Since the bounds we pass to saveLayer are in the pre-filtering coordinate space, they aren't correct for determining the actual device pixels touched by the saveLayer in this case. The easiest fix for now is to pass the clip bounds, since the final draw done in restore() will never draw outside the clip. In SkRecordDraw: We do adjust the bounds passed to saveLayer, so we just need to make sure that when we're using a paint that may affect transparent black, we ignore the calculated bounds of draw ops and use the clip intersected with those adjusted bounds. See originally crrev.com/497773002 BUG=skia: Committed: https://skia.googlesource.com/skia/+/d910f544439fffa6c2bcc5181b79b2811a4c130a

Patch Set 1 #

Total comments: 1

Patch Set 2 : Simpler, no need to drop the bounds intersection. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -11 lines) Patch
M src/core/SkBBoxHierarchyRecord.cpp View 1 chunk +3 lines, -8 lines 0 comments Download
M src/core/SkRecordDraw.cpp View 1 1 chunk +13 lines, -3 lines 0 comments Download
M tests/ImageFilterTest.cpp View 1 chunk +48 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
mtklein
Here's what I understand to be the implementation for SkRecordDraw. SkBBHR.cpp and test are unchanged.
6 years, 4 months ago (2014-08-22 15:40:03 UTC) #1
Stephen White
Great! LGTM (with the bug description a bit more verbose)
6 years, 4 months ago (2014-08-22 15:45:10 UTC) #2
mtklein
https://codereview.chromium.org/496963003/diff/1/src/core/SkRecordDraw.cpp File src/core/SkRecordDraw.cpp (right): https://codereview.chromium.org/496963003/diff/1/src/core/SkRecordDraw.cpp#newcode182 src/core/SkRecordDraw.cpp:182: if (op.bounds && !PaintMayAffectTransparentBlack(op.paint)) { Just reading again: "Since ...
6 years, 4 months ago (2014-08-22 15:45:58 UTC) #3
mtklein
On 2014/08/22 15:45:58, mtklein wrote: > https://codereview.chromium.org/496963003/diff/1/src/core/SkRecordDraw.cpp > File src/core/SkRecordDraw.cpp (right): > > https://codereview.chromium.org/496963003/diff/1/src/core/SkRecordDraw.cpp#newcode182 > ...
6 years, 4 months ago (2014-08-22 15:49:25 UTC) #4
Stephen White
On 2014/08/22 15:49:25, mtklein wrote: > On 2014/08/22 15:45:58, mtklein wrote: > > https://codereview.chromium.org/496963003/diff/1/src/core/SkRecordDraw.cpp > ...
6 years, 4 months ago (2014-08-22 15:51:26 UTC) #5
mtklein
> Yes, I think if you're munging the bounds in the restore, that should be ...
6 years, 4 months ago (2014-08-22 15:54:26 UTC) #6
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 4 months ago (2014-08-22 15:55:29 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@chromium.org/496963003/20001
6 years, 4 months ago (2014-08-22 15:56:08 UTC) #8
commit-bot: I haz the power
6 years, 4 months ago (2014-08-22 16:06:40 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 (20001) as d910f544439fffa6c2bcc5181b79b2811a4c130a

Powered by Google App Engine
This is Rietveld 408576698