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

Issue 1570133003: Fix SkTileImageFilter when srcRect is a superset of bitmap bounds. (Closed)

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

Description

Fix SkTileImageFilter when srcRect is a superset of bitmap bounds. If the input bitmap passed to SkTileImageFilter does not fill the srcRect, we were tiling this incorrectly (see the first sample from tileimage filter -- it draws from a srcRect of 12,12 50x50 to a dstRect of 0,0 50x50. There should be no tiling at all in this case!) In order to fix this, we need to pad the bitmap out to srcRect, and tile with that. In order to tile correctly in the GPU case, we need to request a tileable texture. NOTE: this will change the results of the tileimagefilter GM (correctness, and added src / dest rects). BUG=skia:4774 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1570133003 Committed: https://skia.googlesource.com/skia/+/a9fbd1676cf8bd0078c5be1f1c4abd4c76ea60ad

Patch Set 1 #

Patch Set 2 : Win32 fix #

Total comments: 7

Patch Set 3 : Replace bool tile param w/enum; remove clear(); fix formatting #

Patch Set 4 : Update to ToT #

Total comments: 4

Patch Set 5 : Fix 100-col issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -14 lines) Patch
M gm/tileimagefilter.cpp View 3 chunks +10 lines, -0 lines 0 comments Download
M include/core/SkImageFilter.h View 1 2 3 4 2 chunks +9 lines, -2 lines 0 comments Download
M src/core/SkImageFilter.cpp View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M src/effects/SkTileImageFilter.cpp View 1 2 2 chunks +22 lines, -10 lines 0 comments Download

Messages

Total messages: 40 (18 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1570133003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1570133003/1
4 years, 11 months ago (2016-01-08 16:36:10 UTC) #5
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/5238)
4 years, 11 months ago (2016-01-08 16:38:50 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1570133003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1570133003/20001
4 years, 11 months ago (2016-01-08 16:43:29 UTC) #10
Stephen White
reed@: PTAL. Thanks!
4 years, 11 months ago (2016-01-08 16:48:55 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-08 17:03:09 UTC) #13
Stephen White
reed@: PTAL. Thanks!
4 years, 11 months ago (2016-01-09 01:25:43 UTC) #14
reed1
I think an enum is preferable to a bool. https://codereview.chromium.org/1570133003/diff/20001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/1570133003/diff/20001/include/core/SkImageFilter.h#newcode114 include/core/SkImageFilter.h:114: ...
4 years, 11 months ago (2016-01-10 02:25:03 UTC) #16
robertphillips
https://codereview.chromium.org/1570133003/diff/20001/src/effects/SkTileImageFilter.cpp File src/effects/SkTileImageFilter.cpp (right): https://codereview.chromium.org/1570133003/diff/20001/src/effects/SkTileImageFilter.cpp#newcode68 src/effects/SkTileImageFilter.cpp:68: } else { \n somewhere ? Maybe "static bool ...
4 years, 11 months ago (2016-01-11 13:31:54 UTC) #17
reed1
A named constant is nicer, but doesn't stop callers from just passing true/false/some_bool_expression
4 years, 11 months ago (2016-01-11 14:26:22 UTC) #18
Stephen White
Note that I've replaced the bool param with a copy of the TileUsage param from ...
4 years, 11 months ago (2016-01-11 16:20:30 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1570133003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1570133003/40001
4 years, 11 months ago (2016-01-11 16:20:45 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Mac10.9-Clang-Arm7-Debug-iOS-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Mac10.9-Clang-Arm7-Debug-iOS-Trybot/builds/628) Build-Ubuntu-Clang-x86_64-Debug-Trybot on ...
4 years, 11 months ago (2016-01-11 16:21:32 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1570133003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1570133003/60001
4 years, 11 months ago (2016-01-11 16:47:44 UTC) #25
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-11 17:08:09 UTC) #27
Stephen White
Ping: new patch up.
4 years, 11 months ago (2016-01-11 20:03:40 UTC) #28
reed1
api lgtm
4 years, 11 months ago (2016-01-11 20:19:07 UTC) #29
robertphillips
lgtm https://codereview.chromium.org/1570133003/diff/60001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/1570133003/diff/60001/include/core/SkImageFilter.h#newcode118 include/core/SkImageFilter.h:118: \n ? https://codereview.chromium.org/1570133003/diff/60001/include/core/SkImageFilter.h#newcode131 include/core/SkImageFilter.h:131: \n ?
4 years, 11 months ago (2016-01-11 20:47:12 UTC) #30
Stephen White
https://codereview.chromium.org/1570133003/diff/60001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/1570133003/diff/60001/include/core/SkImageFilter.h#newcode118 include/core/SkImageFilter.h:118: On 2016/01/11 20:47:12, robertphillips wrote: > \n ? Done. ...
4 years, 11 months ago (2016-01-11 21:12:30 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1570133003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1570133003/80001
4 years, 11 months ago (2016-01-11 21:14:11 UTC) #33
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-11 21:28:39 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1570133003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1570133003/80001
4 years, 11 months ago (2016-01-11 22:08:31 UTC) #38
commit-bot: I haz the power
4 years, 11 months ago (2016-01-11 22:09:11 UTC) #40
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://skia.googlesource.com/skia/+/a9fbd1676cf8bd0078c5be1f1c4abd4c76ea60ad

Powered by Google App Engine
This is Rietveld 408576698