aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/imagefilterscropped.cpp
Commit message (Collapse)AuthorAge
* remove unused mode parameter from SkMergeImageFilterGravatar Mike Reed2017-06-19
| | | | | | | | Bug: skia: Change-Id: Iaa46aaef130a337987c3528685f59c56387d4a7d Reviewed-on: https://skia-review.googlesource.com/20210 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* add drawString helper to canvasGravatar Cary Clark2017-04-28
| | | | | | | | | | | | | | | | | | Many tests and examples use drawText with a guess of how long the text is in bytes, or a call to strlen(). Add a helper to SkCanvas to simplify these examples. Add another helper for SkString. R=reed@google.com Change-Id: I0204a31e938f065606f08ee7cd9a6b36db791ee2 Reviewed-on: https://skia-review.googlesource.com/13642 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@skia.org>
* 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>
* remove xfermode from public apiGravatar Mike Reed2016-10-28
| | | | | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4020 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I19cd056f2af778f10e8c6c2b7b2735593b43dbac Reviewed-on: https://skia-review.googlesource.com/4020 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* remove DownSample imagefilterGravatar reed2016-06-25
| | | | | | | | | | | was just created early on as a test filter BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2094083002 TBR= Review-Url: https://codereview.chromium.org/2094083002
* 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 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
* Update SkMergeImageFilter to sk_spGravatar robertphillips2016-03-30
| | | | | | | | TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1847583002 Review URL: https://codereview.chromium.org/1847583002
* 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
* Fix zero-sized blur with crop rect.Gravatar senorblanco2016-02-01
| | | | | | | | | | | | | Neither the GPU nor CPU paths were correctly handling the crop rect in this case. NOTE: this change adds a new test case to the imageblurcropped GM, so it will have to be rebaselined. BUG=skia:4876 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1657773002 Review URL: https://codereview.chromium.org/1657773002
* Reland of move drawSprite from canvas (patchset #1 id:1 of ↵Gravatar reed2015-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1529803004/ ) Reason for revert: guard has landed in chrome Original issue's description: > Revert of remove drawSprite from canvas (patchset #4 id:60001 of https://codereview.chromium.org/1534443003/ ) > > Reason for revert: > need to remove an override in chrome > > Original issue's description: > > remove drawSprite from canvas > > > > BUG=skia: > > > > Committed: https://skia.googlesource.com/skia/+/4657ce2324ea197507c4ba728d81138f56da13b1 > > TBR=fmalita@chromium.org,robertphillips@google.com,senorblanco@chromium.org,mtklein@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/32704674f64cb6a14356dfebe060cd3484c06cc7 TBR=fmalita@chromium.org,robertphillips@google.com,senorblanco@chromium.org,mtklein@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1530203002
* Revert of remove drawSprite from canvas (patchset #4 id:60001 of ↵Gravatar reed2015-12-16
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1534443003/ ) Reason for revert: need to remove an override in chrome Original issue's description: > remove drawSprite from canvas > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4657ce2324ea197507c4ba728d81138f56da13b1 TBR=fmalita@chromium.org,robertphillips@google.com,senorblanco@chromium.org,mtklein@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1529803004
* remove drawSprite from canvasGravatar reed2015-12-16
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1534443003
* Use DEF_GM everywhereGravatar scroggo2015-12-10
| | | | | | BUG=skia:1902 Review URL: https://codereview.chromium.org/1518893002
* Remove SkBitmapSourceGravatar fmalita2015-09-25
| | | | | | | | | To avoid breaking existing SKPs, add a deserialization stub which unflattens SkBitmapSource records to SkImageSources. R=reed@google.com,mtklein@google.com,robertphillips@google.com Review URL: https://codereview.chromium.org/1363913002
* 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
* rename portable_typeface_always to portable_typefaceGravatar caryclark2015-07-24
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1257773002
* next batch of portable typeface changesGravatar caryclark2015-06-12
| | | | | | TBR=djsollen@google.com Review URL: https://codereview.chromium.org/1177303005
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* Add missing SK_OVERRIDEGravatar rmistry2015-02-02
| | | | | | | | | | Tested by running on clang head + ubuntu 14.04: GYP_DEFINES=”skia_gpu=0 skia_warnings_as_errors=1" tools/xsan_build thread dm BUILDTYPE=Release out/Release/dm -v BUG=skia:3386 Review URL: https://codereview.chromium.org/894833002
* Fix Morphology effects sourcing outside of the crop rect.Gravatar cwallez2015-01-26
| | | | | | | | BUG=skia:1766 Committed: https://skia.googlesource.com/skia/+/f6be925b5615f07039ce95c3433039694a8d1679 Review URL: https://codereview.chromium.org/781153002
* Revert of Fix Morphology effects sourcing outside of the crop rect. ↵Gravatar mtklein2015-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #6 id:100001 of https://codereview.chromium.org/781153002/) Reason for revert: Looks like this is causing memory leaks: http://build.chromium.org/p/client.skia/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-ASAN/builds/1155/steps/dm/logs/stdio And causing crashes on Mac 10.6: http://build.chromium.org/p/client.skia/builders/Test-Mac10.6-MacMini4.1-GeForce320M-x86_64-Debug/builds/1417/steps/dm/logs/stdio Original issue's description: > Fix Morphology effects sourcing outside of the crop rect. > > BUG=skia:1766 > > Committed: https://skia.googlesource.com/skia/+/f6be925b5615f07039ce95c3433039694a8d1679 TBR=junov@google.com,junov@chromium.org,bsalomon@google.com,reed@google.com,cwallez@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:1766 Review URL: https://codereview.chromium.org/868973005
* Fix Morphology effects sourcing outside of the crop rect.Gravatar cwallez2015-01-23
| | | | | | BUG=skia:1766 Review URL: https://codereview.chromium.org/781153002
* remove unused GM flagsGravatar mtklein2015-01-23
| | | | | | | | | | Depends on https://codereview.chromium.org/873753002/ Thumbs up to CLion for refactoring this for me. BUG=skia: Review URL: https://codereview.chromium.org/867963004
* remove unnecessary save/clip/restoreGravatar reed2014-12-05
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/785493003
* Add standard fonts to all GMs.Gravatar Cary Clark2014-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow GM results to be compared across machines and platforms by standardizing the fonts used by all tests. This adds runtime flags to DM to use either the system font context (the default), the fonts in the resources directory ( --resourceFonts ) or a set of canonical paths generated from the fonts ( --portableFonts ). This CL should leave the current DM results unchanged by default. If the portable font data or resource font is missing when DM is run, it falls back to using the system font context. The create_test_font tool generates the paths and metrics read by DM with the --portableFonts flag set, and generates the font substitution tables read by DM with the --resourceFonts flag set. If DM is run in SkDebug mode with the --reportUsedChars flag set, it generates the corresponding data compiled into the create_test_font tool. All GM tests set their typeface information by calling either sk_tool_utils::set_portable_typeface or sk_tool_utils::portable_typeface . (The former takes the paint, the latter returns a SkTypeface.) These calls can be removed in the future when the Font Manager can be superceded. BUG=skia:2687 R=mtklein@google.com Review URL: https://codereview.chromium.org/407183003
* Turn on quilt mode in DM.Gravatar commit-bot@chromium.org2014-04-30
| | | | | | | | | | | | | | | | | | - Rename TileGrid -> Quilt to avoid the name overload. - Tag all failing GMs with kSkipTiled_Flag. You may be wondering, do any GMs pass? Yes, some do! And that trends towards all of them as we increase --quiltTile. Two GMs only fail in --quilt mode in 565. Otherwise all GMs which fail are skipped, and those which don't fail aren't. (The 8888 variants of those two GMs are skipped even though they pass.) BUG=skia:2477 R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/256373002 git-svn-id: http://skia.googlecode.com/svn/trunk@14457 2bbb7eff-a529-9590-31e7-b0007b416f81
* Factory methods for heap-allocated SkImageFilter objects.Gravatar commit-bot@chromium.org2014-03-10
| | | | | | | | | | | | | | | | | | This is part of an effort to ensure that all SkPaint effects can only be allocated on the heap. This patch makes the constructors of SkImageFilter and its subclasses non-public and instead provides factory methods for creating these objects on the heap. We temporarily keep constructor of publicly visible classes public behind a flag. BUG=skia:2187 R=scroggo@google.com, mtklein@chromium.org, reed@google.com, senorblanco@google.com, senorblanco@chromium.org, bsalomon@google.com, sugoi@chromium.org, zork@chromium.org Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/182983003 git-svn-id: http://skia.googlecode.com/svn/trunk@13718 2bbb7eff-a529-9590-31e7-b0007b416f81
* add legacy/helper allocN32Pixels, and convert gm to use itGravatar reed@google.com2014-01-25
| | | | | | | | | | | | This is an intermediate api, but might help us quickly get to a point where no one is creating bitmaps in a 2-step process (setConfig + alloc). BUG=skia: R=halcanary@google.com Review URL: https://codereview.chromium.org/140593005 git-svn-id: http://skia.googlecode.com/svn/trunk@13182 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove support for SK_CROP_RECT_IS_INT, now that it is no longer used in ↵Gravatar senorblanco@chromium.org2013-10-16
| | | | | | | | | | | Blink or Chrome. BUG= R=reed@google.com, reed Review URL: https://codereview.chromium.org/27521002 git-svn-id: http://skia.googlecode.com/svn/trunk@11812 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change SkImageFilter's cropRect from SkIRect to a CropRect struct, ↵Gravatar senorblanco@chromium.org2013-10-10
| | | | | | | | | | | | | | containing an SkRect and flags indicating which parameters are set. NOTE: this will require SK_CROP_RECT_IS_INT=1 to be set in Chrome until Blink has been updated to use SkImageFilter::CropRect. Include https://codereview.chromium.org/26528002/ with the Skia roll. Note also that SK_CROP_RECT_IS_INT is a temporary measure until all call sites in Blink have been updated to use SkRect. R=reed@google.com Review URL: https://codereview.chromium.org/26371002 git-svn-id: http://skia.googlecode.com/svn/trunk@11692 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement crop rect support for the merge image filter.Gravatar senorblanco@chromium.org2013-09-19
| | | | | | | | | | Note: this will require rebaselining of the imagefilterscropped and testimagefilters GMs. R=reed@google.com Review URL: https://codereview.chromium.org/23600047 git-svn-id: http://skia.googlecode.com/svn/trunk@11387 2bbb7eff-a529-9590-31e7-b0007b416f81
* Transpose the samples in imagefilterscropped, and add a 1x1 blur. The latterGravatar senorblanco@chromium.org2013-07-25
| | | | | | | | | | | | exercises a different path in the GPU backend, and the former is because my tiny brain gets confused between the results of this test and imagefiltersbase. R=reed@google.com BUG= Review URL: https://codereview.chromium.org/20315002 git-svn-id: http://skia.googlecode.com/svn/trunk@10366 2bbb7eff-a529-9590-31e7-b0007b416f81
* This patch implements a crop rect for SkImageFilter. It has been implemented ↵Gravatar senorblanco@chromium.org2013-07-24
| | | | | | | | | | | | | | | | | | for SkColorFilterImageFilter and SkBlurImageFilter as examples. In order to preserve the immutability of SkImageFilters, the crop rect is passed as a constructor parameter. If NULL (the default), the bounds of the input image are used, as before. This also tightens up the boundary handling for SkImageBlurFilter on the GPU backend. Where we were previously using clamping semantics, we now respect decal semantics (so we don't oversaturate the edges). This brings the GPU and raster backends into closer alignment, but will require some new baselines for the GPU tests. At a minimum, the following tests will need new baselines: imageblur, imagefiltersbase, imagefilterscropped, spritebitmap. R=reed@google.com Committed: https://code.google.com/p/skia/source/detail?r=10251 Review URL: https://codereview.chromium.org/19775006 git-svn-id: http://skia.googlecode.com/svn/trunk@10338 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r10251 (Implement crop rect for SkImageFilter) due to ↵Gravatar robertphillips@google.com2013-07-24
| | | | | | Chromium-side unit test failures git-svn-id: http://skia.googlecode.com/svn/trunk@10304 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10254 2bbb7eff-a529-9590-31e7-b0007b416f81
* This patch implements a crop rect for SkImageFilter. It has been implemented ↵Gravatar senorblanco@chromium.org2013-07-22
for SkColorFilterImageFilter and SkBlurImageFilter as examples. In order to preserve the immutability of SkImageFilters, the crop rect is passed as a constructor parameter. If NULL (the default), the bounds of the input image are used, as before. This also tightens up the boundary handling for SkImageBlurFilter on the GPU backend. Where we were previously using clamping semantics, we now respect decal semantics (so we don't oversaturate the edges). This brings the GPU and raster backends into closer alignment, but will require some new baselines for the GPU tests. At a minimum, the following tests will need new baselines: imageblur, imagefiltersbase, imagefilterscropped, spritebitmap. R=reed@google.com Review URL: https://codereview.chromium.org/19775006 git-svn-id: http://skia.googlecode.com/svn/trunk@10251 2bbb7eff-a529-9590-31e7-b0007b416f81