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

Issue 1964043002: Image filters: implement SkImage::makeWithFilter(). (Closed)

Created:
4 years, 7 months ago by Stephen White
Modified:
4 years, 7 months ago
Reviewers:
robertphillips, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Image filters: implement SkImage::makeWithFilter(). This API provides a way to directly filter a subregion of an SkImage (usually texture-backed), and returns an SkImage which may include extra padding, along with a size to indicate the active region. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1964043002 Committed: https://skia.googlesource.com/skia/+/5878dbdf1b5d86201d299c6e07d53e35048713c7

Patch Set 1 #

Patch Set 2 : Use new variant of filterImage instead #

Patch Set 3 : Fix comments #

Patch Set 4 : Cleanup #

Patch Set 5 : Update to ToT #

Total comments: 1

Patch Set 6 : subset SkISize -> SkIRect, Context -> clipBounds #

Patch Set 7 : Fix style; revert unrelated change #

Patch Set 8 : Move API to SkImage #

Patch Set 9 : #

Patch Set 10 : Fix comment #

Patch Set 11 : Add unit tests #

Patch Set 12 : Add a GM #

Patch Set 13 : GM tweakage #

Patch Set 14 : #

Patch Set 15 : Speculative win fix #

Patch Set 16 : Fix tests in serialize mode (check for null SkCanvas::makeSurface()). #

Total comments: 2

Patch Set 17 : Clip subset to clipBounds; incorporate GM changes #

Total comments: 12

Patch Set 18 : Fixes per Mike's comments #

Patch Set 19 : Docs and formatting fixes per Rob's remarks. #

Patch Set 20 : 100-col fix #

Patch Set 21 : Ibid #

Patch Set 22 : More fixes per Rob #

Total comments: 12

Patch Set 23 : Fixes per Rob's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+239 lines, -3 lines) Patch
A gm/imagemakewithfilter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +103 lines, -0 lines 0 comments Download
M include/core/SkImage.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +21 lines, -0 lines 0 comments Download
M include/core/SkImageFilter.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -3 lines 0 comments Download
M src/image/SkImage.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +41 lines, -0 lines 0 comments Download
M tests/ImageFilterTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +70 lines, -0 lines 0 comments Download

Messages

Total messages: 72 (28 generated)
Stephen White
Mike, Rob: PTAL. Thanks! (Test to come.)
4 years, 7 months ago (2016-05-16 13:37:20 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1964043002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1964043002/60001
4 years, 7 months ago (2016-05-16 13:54:26 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release-Trybot/builds/3620)
4 years, 7 months ago (2016-05-16 13:55:38 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1964043002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1964043002/80001
4 years, 7 months ago (2016-05-16 13:57:06 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-16 14:19:00 UTC) #13
robertphillips
Can we have a test and/or a GM? https://codereview.chromium.org/1964043002/diff/80001/src/core/SkImageFilter.cpp File src/core/SkImageFilter.cpp (right): https://codereview.chromium.org/1964043002/diff/80001/src/core/SkImageFilter.cpp#newcode237 src/core/SkImageFilter.cpp:237: } ...
4 years, 7 months ago (2016-05-16 16:22:53 UTC) #14
reed1
I think it is a better API fit to make the public version sit on ...
4 years, 7 months ago (2016-05-16 16:40:30 UTC) #15
Stephen White
On 2016/05/16 16:40:30, reed1 wrote: > I think it is a better API fit to ...
4 years, 7 months ago (2016-05-16 19:03:55 UTC) #16
Stephen White
On 2016/05/16 19:03:55, Stephen White wrote: > On 2016/05/16 16:40:30, reed1 wrote: > > I ...
4 years, 7 months ago (2016-05-16 19:11:02 UTC) #17
reed1
Do we actually need CTM, given the current use-case? I only see translate in gl_renderer.cc
4 years, 7 months ago (2016-05-16 20:59:16 UTC) #18
Stephen White
On 2016/05/16 20:59:16, reed1 wrote: > Do we actually need CTM, given the current use-case? ...
4 years, 7 months ago (2016-05-16 21:21:44 UTC) #19
Stephen White
BTW, I've updated this patch and the cc patch to use an SkIRect instead of ...
4 years, 7 months ago (2016-05-16 21:52:40 UTC) #20
reed1
I think, given the requests for gms, that you should move the API to SkImage ...
4 years, 7 months ago (2016-05-17 13:53:02 UTC) #21
Stephen White
On 2016/05/17 13:53:02, reed1 wrote: > I think, given the requests for gms, that you ...
4 years, 7 months ago (2016-05-17 14:32:43 UTC) #22
reed1
*If* a caller always wanted the "complete" result, what clipbounds should they pass in?
4 years, 7 months ago (2016-05-17 14:43:11 UTC) #23
Stephen White
On 2016/05/17 14:43:11, reed1 wrote: > *If* a caller always wanted the "complete" result, what ...
4 years, 7 months ago (2016-05-17 14:45:27 UTC) #24
Stephen White
PTAL. API moved to SkImage. Unit tests + GM added.
4 years, 7 months ago (2016-05-17 17:14:13 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1964043002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1964043002/240001
4 years, 7 months ago (2016-05-17 17:21:31 UTC) #28
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-17 17:21:34 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1964043002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1964043002/260001
4 years, 7 months ago (2016-05-17 17:24:40 UTC) #32
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-17 17:24:43 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1964043002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1964043002/260001
4 years, 7 months ago (2016-05-17 17:26:01 UTC) #37
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/8668)
4 years, 7 months ago (2016-05-17 17:36:57 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1964043002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1964043002/280001
4 years, 7 months ago (2016-05-17 18:01:12 UTC) #42
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot/builds/8568)
4 years, 7 months ago (2016-05-17 18:06:42 UTC) #45
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1964043002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1964043002/300001
4 years, 7 months ago (2016-05-17 18:17:12 UTC) #47
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-17 18:49:41 UTC) #49
Stephen White
Friendly ping. ;)
4 years, 7 months ago (2016-05-18 14:04:54 UTC) #50
reed1
rob and I are at a google i/o extended event today, but I should be ...
4 years, 7 months ago (2016-05-18 15:20:52 UTC) #51
Stephen White
New patch up: intersect the returned subset with the clipBounds, and incorporate Mike's GM changes.
4 years, 7 months ago (2016-05-18 22:55:52 UTC) #52
reed1
https://codereview.chromium.org/1964043002/diff/300001/include/core/SkImage.h File include/core/SkImage.h (right): https://codereview.chromium.org/1964043002/diff/300001/include/core/SkImage.h#newcode340 include/core/SkImage.h:340: SkIPoint* offset); method should be const https://codereview.chromium.org/1964043002/diff/320001/tests/ImageFilterTest.cpp File tests/ImageFilterTest.cpp ...
4 years, 7 months ago (2016-05-19 16:33:34 UTC) #53
robertphillips
https://codereview.chromium.org/1964043002/diff/320001/gm/imagemakewithfilter.cpp File gm/imagemakewithfilter.cpp (right): https://codereview.chromium.org/1964043002/diff/320001/gm/imagemakewithfilter.cpp#newcode30 gm/imagemakewithfilter.cpp:30: // In this GM we're going to feed the ...
4 years, 7 months ago (2016-05-19 16:35:19 UTC) #54
Stephen White
https://codereview.chromium.org/1964043002/diff/300001/include/core/SkImage.h File include/core/SkImage.h (right): https://codereview.chromium.org/1964043002/diff/300001/include/core/SkImage.h#newcode340 include/core/SkImage.h:340: SkIPoint* offset); On 2016/05/19 16:33:34, reed1 wrote: > method ...
4 years, 7 months ago (2016-05-19 17:20:06 UTC) #55
Stephen White
https://codereview.chromium.org/1964043002/diff/320001/include/core/SkImage.h File include/core/SkImage.h (right): https://codereview.chromium.org/1964043002/diff/320001/include/core/SkImage.h#newcode329 include/core/SkImage.h:329: * On 2016/05/19 16:35:19, robertphillips wrote: > Doesn't clipBounds ...
4 years, 7 months ago (2016-05-19 17:31:27 UTC) #56
Stephen White
Thanks for your reviews. New patch up.
4 years, 7 months ago (2016-05-19 17:31:44 UTC) #57
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1964043002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1964043002/400001
4 years, 7 months ago (2016-05-19 17:33:19 UTC) #59
Stephen White
(Missed some of Rob's comments the first time.. new patch up.) https://codereview.chromium.org/1964043002/diff/320001/gm/imagemakewithfilter.cpp File gm/imagemakewithfilter.cpp (right): ...
4 years, 7 months ago (2016-05-19 17:44:03 UTC) #60
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1964043002/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1964043002/420001
4 years, 7 months ago (2016-05-19 17:44:39 UTC) #62
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-19 18:02:42 UTC) #64
reed1
lgtm https://codereview.chromium.org/1964043002/diff/420001/tests/ImageFilterTest.cpp File tests/ImageFilterTest.cpp (right): https://codereview.chromium.org/1964043002/diff/420001/tests/ImageFilterTest.cpp#newcode1720 tests/ImageFilterTest.cpp:1720: SkIRect dest_rect = SkIRect::MakeXYWH(offset.x(), offset.y(), nit: can just ...
4 years, 7 months ago (2016-05-19 20:12:11 UTC) #65
robertphillips
lgtm https://codereview.chromium.org/1964043002/diff/420001/include/core/SkImage.h File include/core/SkImage.h (right): https://codereview.chromium.org/1964043002/diff/420001/include/core/SkImage.h#newcode326 include/core/SkImage.h:326: * The subset represents the active portion of ...
4 years, 7 months ago (2016-05-19 21:14:44 UTC) #66
Stephen White
https://codereview.chromium.org/1964043002/diff/420001/include/core/SkImage.h File include/core/SkImage.h (right): https://codereview.chromium.org/1964043002/diff/420001/include/core/SkImage.h#newcode326 include/core/SkImage.h:326: * The subset represents the active portion of this ...
4 years, 7 months ago (2016-05-19 21:27:44 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1964043002/440001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1964043002/440001
4 years, 7 months ago (2016-05-19 21:29:42 UTC) #70
commit-bot: I haz the power
4 years, 7 months ago (2016-05-19 21:50:34 UTC) #72
Message was sent while issue was closed.
Committed patchset #23 (id:440001) as
https://skia.googlesource.com/skia/+/5878dbdf1b5d86201d299c6e07d53e35048713c7

Powered by Google App Engine
This is Rietveld 408576698