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

Issue 803183003: Fix layer hoisting image filter corner cases (Closed)

Created:
6 years ago by robertphillips
Modified:
6 years ago
Reviewers:
bsalomon
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Fix layer hoisting image filter corner cases This CL fixes 5 bugs related to hoisting image filters: For image filters the src layer (the one prior to filtering) often needs to be smaller then the final layer. This requires the saveLayer's optional bounds to be stored (in SkLayerInfo.h and SkRecordDraw.cpp) and then used in compute_source_rect and carried around in GrCachedLayer. The image filters can add an extra offset to the final draw operation. This is now computed in GrLayerHoister::FilterLayer and carried around in GrCachedLayer. Filtered layers must use exact matches. This is now done in GrLayerCache::lock. The filter cache requires a valid matrix so it can compute the correct offset. This is now done in GrLayerHoister::FilterLayer. Filtered layers need to be drawn with drawSprite while unfiltered (and therefore hopefully atlased) layers can be drawn with drawBitmap. This is now done in draw_replacement_bitmap. Committed: https://skia.googlesource.com/skia/+/702eb9622102599d94ab6798e6227cf29f48c2d3 Committed: https://skia.googlesource.com/skia/+/478dd723362fefc2023aee03e11216d913eeac03

Patch Set 1 #

Patch Set 2 : Clean up #

Patch Set 3 : More clean up #

Patch Set 4 : Fix unit test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -79 lines) Patch
M gm/gmmain.cpp View 1 7 chunks +19 lines, -13 lines 0 comments Download
M src/core/SkLayerInfo.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/core/SkRecordDraw.cpp View 1 4 chunks +10 lines, -5 lines 0 comments Download
M src/gpu/GrLayerCache.h View 1 2 7 chunks +25 lines, -8 lines 0 comments Download
M src/gpu/GrLayerCache.cpp View 1 2 4 chunks +16 lines, -5 lines 0 comments Download
M src/gpu/GrLayerHoister.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/gpu/GrLayerHoister.cpp View 1 2 8 chunks +83 lines, -31 lines 0 comments Download
M src/gpu/GrRecordReplaceDraw.cpp View 2 chunks +16 lines, -6 lines 0 comments Download
M tests/GpuLayerCacheTest.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M tests/RecordReplaceDrawTest.cpp View 1 2 3 2 chunks +7 lines, -9 lines 0 comments Download

Messages

Total messages: 15 (5 generated)
robertphillips
6 years ago (2014-12-15 21:36:10 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/803183003/40001
6 years ago (2014-12-15 22:23:25 UTC) #4
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
6 years ago (2014-12-15 22:23:26 UTC) #5
robertphillips
ping
6 years ago (2014-12-16 14:51:06 UTC) #7
bsalomon
lgtm
6 years ago (2014-12-16 15:25:59 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/803183003/40001
6 years ago (2014-12-16 15:27:21 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://skia.googlesource.com/skia/+/702eb9622102599d94ab6798e6227cf29f48c2d3
6 years ago (2014-12-16 15:27:34 UTC) #11
robertphillips
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/790643009/ by robertphillips@google.com. ...
6 years ago (2014-12-16 15:41:15 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/803183003/60001
6 years ago (2014-12-16 16:11:40 UTC) #14
commit-bot: I haz the power
6 years ago (2014-12-16 16:25:59 UTC) #15
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://skia.googlesource.com/skia/+/478dd723362fefc2023aee03e11216d913eeac03

Powered by Google App Engine
This is Rietveld 408576698