aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/imagefilterscropexpand.cpp
Commit message (Collapse)AuthorAge
* GM: some header cleanupGravatar Mike Klein2017-03-22
| | | | | | | | | | | | | | gm.h includes sk_tool_utils.h but does not use it. The bulk of this CL makes each gm that uses sk_tool_utils include it. sk_tool_utils.h also provided SkRandom and SkTDArray, so a couple GMs add those headers too. Change-Id: Ieb2a7c542f0ca89c3223f744fc11b0ff37af36c1 Reviewed-on: https://skia-review.googlesource.com/10014 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* Switch a bunch of tests to use DEF_SIMPLE_GM.Gravatar Stephen White2017-01-13
| | | | | | | | | | | Should be no user- or test-visible changes. BUG=skia: Change-Id: I6499dc978a41fee344b847c118f84227271561c5 Reviewed-on: https://skia-review.googlesource.com/6906 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephan White <senorblanco@chromium.org>
* Image filters: fix filtering of transparent black in CFIF.Gravatar senorblanco2016-05-18
| | | | | | | | | | | | | | | | | SkColorFilterImageFilter has a codepath to filter transparent black regions outside of the input image. However, it was treating the exterior as opaque black, rather than trasparent black. Note: the results of imagefiltercropexpand GM will change, as it was tweaked a bit to show this bug. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978363002 NOTREECHECKS=true NOTRY=true NOPRESUBMIT=true Review-Url: https://codereview.chromium.org/1978363002
* Update DisplacementMapEffect to sk_spGravatar robertphillips2016-04-15
| | | | | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1877783003 Committed: https://skia.googlesource.com/skia/+/a53011ef44705a091a8e24f7ea289a3f9ad759f2 Review URL: https://codereview.chromium.org/1877783003
* Revert of Update DisplacementMapEffect to sk_sp (patchset #3 id:40001 of ↵Gravatar robertphillips2016-04-15
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1877783003/ ) Reason for revert: unexpected image diffs in imagefilterscropexpand GM Original issue's description: > Update DisplacementMapEffect to sk_sp > > TBR=reed@google.com > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1877783003 > > Committed: https://skia.googlesource.com/skia/+/a53011ef44705a091a8e24f7ea289a3f9ad759f2 TBR=fmalita@chromium.org,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1884253004
* Update DisplacementMapEffect to sk_spGravatar robertphillips2016-04-15
| | | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1877783003 Review URL: https://codereview.chromium.org/1877783003
* Update LightingImageFilter to sk_spGravatar robertphillips2016-04-08
| | | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1869763002 Review URL: https://codereview.chromium.org/1869763002
* Update DropShadowImageFilter to sk_spGravatar robertphillips2016-04-06
| | | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1861843002 Review URL: https://codereview.chromium.org/1861843002
* Update SkColorFilterImageFilter to sk_spGravatar robertphillips2016-04-05
| | | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1858813002 Review URL: https://codereview.chromium.org/1858813002
* Update SkMorphology ImageFilters to sk_spGravatar robertphillips2016-04-05
| | | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1860573002 Review URL: https://codereview.chromium.org/1860573002
* Update SkBlurImageFilter to sk_spGravatar robertphillips2016-04-04
| | | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1852743002 Review URL: https://codereview.chromium.org/1852743002
* Update SkImageSource to sk_spGravatar robertphillips2016-04-01
| | | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842243002 Review URL: https://codereview.chromium.org/1842243002
* Update SkOffsetImageFilter to sk_spGravatar robertphillips2016-03-31
| | | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842193002 Review URL: https://codereview.chromium.org/1842193002
* switch surface to sk_spGravatar reed2016-03-23
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1817383002 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review URL: https://codereview.chromium.org/1817383002
* Reland of [2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of ↵Gravatar reed2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.o… (patchset #1 id:1 of https://codereview.chromium.org/1821103004/ ) Reason for revert: guard has now landed in chrome Original issue's description: > Revert of Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (patchset #3 id:40001 of https://codereview.chromium.org/1825073002/ ) > > Reason for revert: > CreateModeFilter not compiling > > Original issue's description: > > Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )" > > > > Fixed legacy withColorFilter to call new(er) make method > > > > This reverts commit 1eb81db650d31f50be67b12d60c4f9e7dd08432f. > > > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825073002 > > > > TBR= > > > > Committed: https://skia.googlesource.com/skia/+/4c9776b046dd5e9e46e2d1ce35154855c8fcb381 > > TBR= > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/d6889293dd0942f27f9593f679722c956831f2c4 TBR= # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=skia: Review URL: https://codereview.chromium.org/1827433002
* Revert of Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 ↵Gravatar reed2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.o… (patchset #3 id:40001 of https://codereview.chromium.org/1825073002/ ) Reason for revert: CreateModeFilter not compiling Original issue's description: > Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )" > > Fixed legacy withColorFilter to call new(er) make method > > This reverts commit 1eb81db650d31f50be67b12d60c4f9e7dd08432f. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825073002 > > TBR= > > Committed: https://skia.googlesource.com/skia/+/4c9776b046dd5e9e46e2d1ce35154855c8fcb381 TBR= # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1821103004
* Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of ↵Gravatar reed2016-03-22
| | | | | | | | | | | | | | | https://codereview.chromium.org/1822623002/ )" Fixed legacy withColorFilter to call new(er) make method This reverts commit 1eb81db650d31f50be67b12d60c4f9e7dd08432f. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825073002 TBR= Review URL: https://codereview.chromium.org/1825073002
* Revert of switch colorfilters to sk_sp (patchset #11 id:200001 of ↵Gravatar reed2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1822623002/ ) Reason for revert: need to fix unguarded makeWithFilter Original issue's description: > switch colorfilters to sk_sp > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822623002 > > Committed: https://skia.googlesource.com/skia/+/f809d7687a4fb7b88b651b046da2bc0035d6aa09 TBR=fmalita@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1820303002
* switch colorfilters to sk_spGravatar reed2016-03-22
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822623002 Review URL: https://codereview.chromium.org/1822623002
* update callsites for Make image factoriesGravatar reed2016-03-17
| | | | | | | | | | | not forced yet, as we still have the build-guard. waiting on chrome CL BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810813003 TBR= Review URL: https://codereview.chromium.org/1810813003
* Reland of "more shader-->sp conversions (patchset #5 id:80001 of ↵Gravatar reed2016-03-13
| | | | | | | | | | | https://codereview.chromium.org/1789633002/ )" This reverts commit 9283d20afc27571f7a871d1bd1100dd5df584941. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1793303002 Review URL: https://codereview.chromium.org/1793303002
* Revert of more shader-->sp conversions (patchset #5 id:80001 of ↵Gravatar reed2016-03-13
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1789633002/ ) Reason for revert: seems to have changed pictureshadertile Original issue's description: > more shader-->sp conversions > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789633002 > > Committed: https://skia.googlesource.com/skia/+/ce563cdd48ec7ce4e0420dd88760df9be9dba50c TBR=fmalita@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1790353002
* more shader-->sp conversionsGravatar reed2016-03-13
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789633002 Review URL: https://codereview.chromium.org/1789633002
* Remove 6-param applyCropRect() from lighting filters (raster path).Gravatar senorblanco2016-02-16
| | | | | | | BUG=skia:4502 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1701133002 Review URL: https://codereview.chromium.org/1701133002
* Fix gaussian blur for small sigma.Gravatar senorblanco2015-12-17
| | | | | | | | | | | | | | | | | | | | I broke this in https://skia.googlesource.com/skia/+/c57e0ded7d535523cfc6bf07c78e5f3479bb8c42. That change added support for cropping during blur, but did not do the correct thing for the small-sigma 2D matrix convolution optimization when blurring from small-to-large textures. The fix is pass the correct dstRect and srcOffset to convolve_gaussian_2d. I also changed convolve_gaussian_1d() and convolve_gaussian_2d() to take the original (non-negated) srcOffset, and to negate them when constructing the local matrix. Test: added a new (blur 0.3 0.3) column to imagefilterscropexpand, so that GM will have to be rebaselined. BUG=skia:4719,569883 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1529313003 Review URL: https://codereview.chromium.org/1529313003
* Use DEF_GM everywhereGravatar scroggo2015-12-10
| | | | | | BUG=skia:1902 Review URL: https://codereview.chromium.org/1518893002
* Convert unit tests, GMs from SkBitmapSource to SkImagesourceGravatar fmalita2015-09-15
| | | | | | | | | | | This removes SkBitmapSource clients within Skia. http://crrev.com/1334173004 does the same for Blink, so we should be able to remove SkBitmapSource in a follow-up. R=reed@google.com,robertphillips@google.com,mtklein@google.com Review URL: https://codereview.chromium.org/1343123002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* make tests portable by using 565 compatible colorsGravatar caryclark2015-07-29
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1262703002
* Remove uniqueID from all filter serialization.Gravatar senorblanco2015-03-18
| | | | | | | | | | | | (This is essentially a revert of https://codereview.chromium.org/503833002/.) This was necessary back when SkPaint was flattened even for in-process use. Now that we only flatten SkPaint for cross-process use, there's no need to serialize UniqueIDs. Note: SkDropShadowImageFilter is being constructed with a croprect and UniqueID (of 0) in Blink. I've made the uniqueID param default to 0 temporarily, until this rolls in and Blink can be changed. (Blink can't be changed first, since unlike the other filters, there's no constructor that takes a cropRect but not a uniqueID.) BUG=skia: Review URL: https://codereview.chromium.org/1019493002
* Adding an option to render only the shadow in SkDropShadowImageFilterGravatar sugoi2014-10-23
| | | | | | | | This is basically how blink uses the filter. Currently, I can't use it for "ShadowOnly" mode with the filter at all, but instead of copying the code and risking to have the codepaths diverge, I'm simply going to add the option here. BUG=skia: Review URL: https://codereview.chromium.org/646213004
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-03-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@13820 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement support for expanding crop rects in image filtersGravatar senorblanco@chromium.org2014-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: this patch set is based on https://codereview.chromium.org/189913021/, and needs that patch to land first. Until now, crop rects in Skia have only been able to reduce the size of the destination bounds, but not expand them. SVG semantics require the latter as well. The heart of the change is in applyCropRect(), which now assigns each edge, instead of doing an intersection with the crop rect. In order to support this (and still work well with tiled drawing) we need to clip the resulting crop rect to the clipping region of the filters. This uses the Context struct previously landed from https://codereview.chromium.org/189913021/. Many of the pixel loops are not yet ready to handle a destination rect larger than the source rect. So we provide a convenience version of applyCropRect() which creates an offscreen and pads it out with transparent black. Once the pixel loops and shaders have been fixed to support larger destination bounds, they should be switched back to the non-drawing version of applyCropRect(). BUG=skia: R=bsalomon@google.com, reed@google.com Committed: https://code.google.com/p/skia/source/detail?r=13805 Review URL: https://codereview.chromium.org/198003008 git-svn-id: http://skia.googlecode.com/svn/trunk@13809 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Implement support for expanding crop rects in image filters"Gravatar senorblanco@chromium.org2014-03-14
| | | | | | | | | | | Breaking ImageFilterTests unit test. TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/196353021 git-svn-id: http://skia.googlecode.com/svn/trunk@13806 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement support for expanding crop rects in image filtersGravatar senorblanco@chromium.org2014-03-14
NOTE: this patch set is based on https://codereview.chromium.org/189913021/, and needs that patch to land first. Until now, crop rects in Skia have only been able to reduce the size of the destination bounds, but not expand them. SVG semantics require the latter as well. The heart of the change is in applyCropRect(), which now assigns each edge, instead of doing an intersection with the crop rect. In order to support this (and still work well with tiled drawing) we need to clip the resulting crop rect to the clipping region of the filters. This uses the Context struct previously landed from https://codereview.chromium.org/189913021/. Many of the pixel loops are not yet ready to handle a destination rect larger than the source rect. So we provide a convenience version of applyCropRect() which creates an offscreen and pads it out with transparent black. Once the pixel loops and shaders have been fixed to support larger destination bounds, they should be switched back to the non-drawing version of applyCropRect(). BUG=skia: R=bsalomon@google.com, reed@google.com Review URL: https://codereview.chromium.org/198003008 git-svn-id: http://skia.googlecode.com/svn/trunk@13805 2bbb7eff-a529-9590-31e7-b0007b416f81