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

Issue 106933002: Implement srcRect and dstRect functionality in SkBitmapSource. This is required for the "preserveAs… (Closed)

Created:
7 years ago by Stephen White
Modified:
7 years ago
Reviewers:
robertphillips, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Implement srcRect and dstRect functionality in SkBitmapSource. This is required for the "preserveAspectRatio" options of SVG's feImage. Covered by new GM "bitmapsource". This also includes some changes to the xfermodeimagefilter and tileimagefilter GMs to properly handle the CTM. This worked before only because SkBitmapSource was ignoring the CTM. Now that it respects it, we need to give the correct transform. This also means the GMs now work while zoomed. It also implements CTM support for SkTileImageFilter. NOTE: this will require rebaselining a number of imagefilter GMs on Nexus4, since they render in perspective (using the CTM). The changes to the results should all be improvements. R=reed@google.com, robertphillips@google.com Committed: https://code.google.com/p/skia/source/detail?r=12571

Patch Set 1 #

Total comments: 2

Patch Set 2 : Switch to 1-arg and 3-arg constructors #

Patch Set 3 : Win32 fixes, and correctness fixes for non-integer dest rects #

Total comments: 2

Patch Set 4 : Fix xfermodeimagefilter and tileimagefilter GMs #

Patch Set 5 : Fix SkTileImageFilter to respect CTM, and not to request an invalid subset #

Total comments: 33

Patch Set 6 : Fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -56 lines) Patch
A gm/bitmapsource.cpp View 1 2 3 4 5 1 chunk +91 lines, -0 lines 0 comments Download
M gm/tileimagefilter.cpp View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M gm/xfermodeimagefilter.cpp View 1 2 3 4 5 10 chunks +35 lines, -43 lines 0 comments Download
M gyp/gmslides.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M include/effects/SkBitmapSource.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/effects/SkBitmapSource.cpp View 1 2 3 4 5 1 chunk +53 lines, -3 lines 0 comments Download
M src/effects/SkTileImageFilter.cpp View 1 2 3 4 3 chunks +13 lines, -8 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Stephen White
PTAL. Thanks!
7 years ago (2013-12-05 18:27:31 UTC) #1
reed1
https://codereview.chromium.org/106933002/diff/1/include/effects/SkBitmapSource.h File include/effects/SkBitmapSource.h (right): https://codereview.chromium.org/106933002/diff/1/include/effects/SkBitmapSource.h#newcode16 include/effects/SkBitmapSource.h:16: explicit SkBitmapSource(const SkBitmap& bitmap, const SkRect* srcRect = NULL, ...
7 years ago (2013-12-05 18:48:24 UTC) #2
Stephen White
https://codereview.chromium.org/106933002/diff/1/include/effects/SkBitmapSource.h File include/effects/SkBitmapSource.h (right): https://codereview.chromium.org/106933002/diff/1/include/effects/SkBitmapSource.h#newcode16 include/effects/SkBitmapSource.h:16: explicit SkBitmapSource(const SkBitmap& bitmap, const SkRect* srcRect = NULL, ...
7 years ago (2013-12-05 18:59:54 UTC) #3
Stephen White
New patch uploaded with separate 1-arg and 3-arg constructors.
7 years ago (2013-12-05 19:05:02 UTC) #4
reed1
lgtm
7 years ago (2013-12-05 21:06:25 UTC) #5
Stephen White
While cleaning up some Win32 errors, I realized we weren't doing the right thing for ...
7 years ago (2013-12-05 21:46:06 UTC) #6
reed1
lgtm https://codereview.chromium.org/106933002/diff/40001/src/effects/SkBitmapSource.cpp File src/effects/SkBitmapSource.cpp (right): https://codereview.chromium.org/106933002/diff/40001/src/effects/SkBitmapSource.cpp#newcode54 src/effects/SkBitmapSource.cpp:54: dstRect.roundOut(&dstIRect); Just curious if this is more correctly ...
7 years ago (2013-12-05 21:58:31 UTC) #7
Stephen White
Thanks for your review. https://codereview.chromium.org/106933002/diff/40001/src/effects/SkBitmapSource.cpp File src/effects/SkBitmapSource.cpp (right): https://codereview.chromium.org/106933002/diff/40001/src/effects/SkBitmapSource.cpp#newcode54 src/effects/SkBitmapSource.cpp:54: dstRect.roundOut(&dstIRect); On 2013/12/05 21:58:31, reed1 ...
7 years ago (2013-12-05 22:06:31 UTC) #8
Stephen White
Committed patchset #3 manually as r12522 (presubmit successful).
7 years ago (2013-12-05 22:41:58 UTC) #9
Stephen White
Landing again with test fixes.
7 years ago (2013-12-06 15:25:16 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/senorblanco@chromium.org/106933002/60001
7 years ago (2013-12-06 15:25:29 UTC) #11
commit-bot: I haz the power
Change committed as 12528
7 years ago (2013-12-06 15:59:07 UTC) #12
robertphillips
This was reverted (along with r12533 - Fix Windows compiler warnings/errorshttps://codereview.chromium.org/108563002/) due to GM image ...
7 years ago (2013-12-06 17:47:47 UTC) #13
Stephen White
On 2013/12/06 17:47:47, robertphillips wrote: > This was reverted (along with r12533 - Fix Windows ...
7 years ago (2013-12-08 19:15:59 UTC) #14
Stephen White
New patch is up BTW; PTAL.
7 years ago (2013-12-09 12:50:57 UTC) #15
robertphillips
lgtm + nits & suggestions https://codereview.chromium.org/106933002/diff/80001/gm/bitmapsource.cpp File gm/bitmapsource.cpp (right): https://codereview.chromium.org/106933002/diff/80001/gm/bitmapsource.cpp#newcode11 gm/bitmapsource.cpp:11: // This GM ...? ...
7 years ago (2013-12-09 16:23:00 UTC) #16
Stephen White
https://codereview.chromium.org/106933002/diff/80001/gm/bitmapsource.cpp File gm/bitmapsource.cpp (right): https://codereview.chromium.org/106933002/diff/80001/gm/bitmapsource.cpp#newcode11 gm/bitmapsource.cpp:11: On 2013/12/09 16:23:01, robertphillips wrote: > // This GM ...
7 years ago (2013-12-09 17:04:25 UTC) #17
Stephen White
7 years ago (2013-12-09 18:31:50 UTC) #18
Message was sent while issue was closed.
Committed patchset #6 manually as r12571 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698