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

Issue 189913021: Implement support for a Context parameter in image filters (Closed)

Created:
6 years, 9 months ago by Stephen White
Modified:
6 years, 9 months ago
Reviewers:
bsalomon, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Implement support for a Context parameter in image filters Some upcoming work (support for expanding crop rects) requires the clip bounds to be available during filter traversal. This change replaces the SkMatrix parameter in the onFilterImage() traversals with a Context parameter. It contains the CTM, as well as the clip bounds. BUG=skia: R=reed@google.com Committed: https://code.google.com/p/skia/source/detail?r=13803

Patch Set 1 #

Patch Set 2 : Use the layer bounds as clip bounds for filtering #

Patch Set 3 : Update to ToT; SkOffsetImageFilter fixes #

Patch Set 4 : Move bitmap locking above applyCropRect; new GM; other goodness #

Patch Set 5 : Update to ToT; srcOffset fixes; SkOffsetImageFilter fixes; displacement GPU fixes #

Patch Set 6 : applyCropRect() flavours now take similar params; fixed comments #

Patch Set 7 : Fix drop-shadow case; revert to old-style applyCropRect() where possible; fix comments #

Total comments: 2

Patch Set 8 : Update to ToT #

Patch Set 9 : Revert all but the Context changes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -176 lines) Patch
M gm/imagefiltersbase.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M gm/imagefiltersgraph.cpp View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download
M include/core/SkBitmapDevice.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M include/core/SkDevice.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M include/core/SkImageFilter.h View 1 2 3 4 5 6 7 8 7 chunks +18 lines, -6 lines 0 comments Download
M include/effects/SkBicubicImageFilter.h View 1 chunk +2 lines, -2 lines 0 comments Download
M include/effects/SkBitmapSource.h View 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkBlurImageFilter.h View 1 chunk +2 lines, -2 lines 0 comments Download
M include/effects/SkColorFilterImageFilter.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkComposeImageFilter.h View 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkDisplacementMapEffect.h View 2 chunks +2 lines, -2 lines 0 comments Download
M include/effects/SkDropShadowImageFilter.h View 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkMagnifierImageFilter.h View 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkMatrixConvolutionImageFilter.h View 1 chunk +2 lines, -2 lines 0 comments Download
M include/effects/SkMergeImageFilter.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkMorphologyImageFilter.h View 3 chunks +6 lines, -6 lines 0 comments Download
M include/effects/SkOffsetImageFilter.h View 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkPictureImageFilter.h View 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkRectShaderImageFilter.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkResizeImageFilter.h View 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkTestImageFilters.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkTileImageFilter.h View 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkXfermodeImageFilter.h View 1 chunk +2 lines, -2 lines 0 comments Download
M include/gpu/SkGpuDevice.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M src/core/SkBitmapDevice.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 4 5 6 7 2 chunks +6 lines, -2 lines 0 comments Download
M src/core/SkDeviceImageFilterProxy.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/core/SkImageFilter.cpp View 1 2 3 4 5 6 7 8 7 chunks +11 lines, -11 lines 0 comments Download
M src/effects/SkAlphaThresholdFilter.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M src/effects/SkBicubicImageFilter.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M src/effects/SkBitmapSource.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M src/effects/SkBlurImageFilter.cpp View 1 2 3 4 5 6 7 8 4 chunks +8 lines, -8 lines 0 comments Download
M src/effects/SkColorFilterImageFilter.cpp View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download
M src/effects/SkComposeImageFilter.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M src/effects/SkDisplacementMapEffect.cpp View 1 2 3 4 5 6 7 8 6 chunks +12 lines, -12 lines 0 comments Download
M src/effects/SkDropShadowImageFilter.cpp View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -5 lines 0 comments Download
M src/effects/SkLightingImageFilter.cpp View 1 2 3 4 5 6 7 8 8 chunks +10 lines, -10 lines 0 comments Download
M src/effects/SkMagnifierImageFilter.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkMatrixConvolutionImageFilter.cpp View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M src/effects/SkMergeImageFilter.cpp View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M src/effects/SkMorphologyImageFilter.cpp View 1 2 3 4 5 6 7 8 8 chunks +16 lines, -16 lines 0 comments Download
M src/effects/SkOffsetImageFilter.cpp View 1 2 3 4 5 6 7 8 4 chunks +6 lines, -6 lines 0 comments Download
M src/effects/SkPictureImageFilter.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M src/effects/SkRectShaderImageFilter.cpp View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M src/effects/SkResizeImageFilter.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M src/effects/SkTestImageFilters.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkTileImageFilter.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M src/effects/SkXfermodeImageFilter.cpp View 1 2 3 4 5 6 7 8 4 chunks +7 lines, -7 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 6 chunks +12 lines, -8 lines 0 comments Download
M src/utils/SkDeferredCanvas.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M src/utils/SkGatherPixelRefsAndRects.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M src/utils/SkPictureUtils.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M tests/ImageFilterTest.cpp View 3 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Stephen White
reed@, bsalomon@: PTAL. Thanks!
6 years, 9 months ago (2014-03-13 20:14:06 UTC) #1
reed1
looks like maybe 2 different CLs..? 1. replace CTM with Context param 2. some new ...
6 years, 9 months ago (2014-03-13 20:32:25 UTC) #2
Stephen White
On 2014/03/13 20:32:25, reed1 wrote: > looks like maybe 2 different CLs..? > > 1. ...
6 years, 9 months ago (2014-03-13 23:16:07 UTC) #3
Stephen White
New patch up: reverted everything but the Context changes. https://codereview.chromium.org/189913021/diff/120001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/189913021/diff/120001/include/core/SkImageFilter.h#newcode74 include/core/SkImageFilter.h:74: ...
6 years, 9 months ago (2014-03-13 23:19:32 UTC) #4
reed1
lgtm
6 years, 9 months ago (2014-03-14 12:46:33 UTC) #5
Stephen White
6 years, 9 months ago (2014-03-14 15:44:25 UTC) #6
Message was sent while issue was closed.
Committed patchset #9 manually as r13803 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698