aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/offsetimagefilter.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>
* 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
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* Switch SkSpecialImage & SkSpecialSurface classes over to smart pointersGravatar robertphillips2016-03-17
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1812023002 Review URL: https://codereview.chromium.org/1812023002
* 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
* 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
* Minor code cleanup (left over from prior CL)Gravatar robertphillips2015-09-03
| | | | | | This was requested in https://codereview.chromium.org/1309543012/ (Add new GM to directly exercise perspective bitmap drawing) Review URL: https://codereview.chromium.org/1320673011
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* rename portable_typeface_always to portable_typefaceGravatar caryclark2015-07-24
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1257773002
* increase gm offsetimagefilter stroke widthGravatar caryclark2015-07-16
| | | | | | | | | | With a hairline width, offsetimagefilter fails to draw the rectangle on some platforms. Make the width 2 so that it shows up everywhere. TBR=reed@google.com Review URL: https://codereview.chromium.org/1236133003
* make *imagefilter morphology iamge bitmapsource gm portableGravatar caryclark2015-07-15
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1236403002
* add more testsGravatar reed2015-06-23
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1201333002
* Fix memory leak in simple-offsetimagefilterGravatar robertphillips2015-06-23
| | | | Review URL: https://codereview.chromium.org/1203613004
* more tests for offsetimagefilterGravatar reed2015-06-23
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1199933011
* add simple test for offsetimagefilterGravatar reed2015-06-23
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1204723002
* clean offsetimagefilter gmGravatar reed2015-06-22
| | | | | | | BUG=skia: TBR=robertphilips Review URL: https://codereview.chromium.org/1203473002
* Change some more GMs to clear to opaque black, not transparent black.Gravatar senorblanco2015-04-09
| | | | | | | | N.B.: this will change results on the bots for all the tests modified. BUG=skia:3319 Review URL: https://codereview.chromium.org/1077763002
* s/sk_tools::DrawCheckerboard/sk_tool_utils::draw_checkerboard/Gravatar halcanary2015-01-26
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/873333004
* Factor out checkerboard function in gm and sampleapp into tools.Gravatar halcanary2015-01-26
| | | | Review URL: https://codereview.chromium.org/834303005
* It is dangerous to ignore SkRect::intersect's return valueGravatar robertphillips2015-01-07
| | | | | | Committed: https://skia.googlesource.com/skia/+/152f524fd325b7776b01f84afbfe2fa071648a05 Review URL: https://codereview.chromium.org/833943002
* Revert of It is dangerous to ignore SkRect::intersect's return value ↵Gravatar robertphillips2015-01-07
| | | | | | | | | | | | | | | | | | (patchset #6 id:100001 of https://codereview.chromium.org/833943002/) Reason for revert: Still more Chromium clean up to do Original issue's description: > It is dangerous to ignore SkRect::intersect's return value > > Committed: https://skia.googlesource.com/skia/+/152f524fd325b7776b01f84afbfe2fa071648a05 TBR=reed@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/825983005
* It is dangerous to ignore SkRect::intersect's return valueGravatar robertphillips2015-01-07
| | | | Review URL: https://codereview.chromium.org/833943002
* 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
* Cleanup: Get rid of make_isize() function from gm.h.Gravatar tfarina2014-06-09
| | | | | | | | | | | | | | | This helper function is not necessary. The same thing can be achieved by using SkISize::Make() provided by SkTSize API. BUG=skia:2645 TEST=make dm && out/Debug/dm R=robertphillips@google.com, reed@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/326523002
* 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
* Apply the CTM to the offset in the slow SkOffsetImageFilter path.Gravatar senorblanco@chromium.org2014-03-04
| | | | | | | | | | | | | | | | | | This was being done in the fast path, but not the slow path. Since I had to rebaseline the offsetimagefilter GM anyway (to accomodate the new test case), I added a red border around the intersection of the (transformed) crop rect and clip rect in each sample, beyond which no pixels should be drawn. Chrome bug: https://code.google.com/p/chromium/issues/detail?id=346362 BUG=skia: R=sugoi@google.com Review URL: https://codereview.chromium.org/186643003 git-svn-id: http://skia.googlecode.com/svn/trunk@13656 2bbb7eff-a529-9590-31e7-b0007b416f81
* add peekPixels to SkCanvas and SkSurfaceGravatar commit-bot@chromium.org2014-02-13
| | | | | | | | | | | | | | fix reference to SkBaseDevice, which was only a problem in no-gpu build This reverts commit 4fa44a6bf73891b21917fb90d02beef9143bffa3. R=reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/163603003 git-svn-id: http://skia.googlecode.com/svn/trunk@13432 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of add peekPixels to SkCanvas and SkSurface ↵Gravatar commit-bot@chromium.org2014-02-13
| | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/161733002/) Reason for revert: compile issues with gm/xfermodes3 Original issue's description: > add peekPixels to SkCanvas and SkSurface > > clone of https://codereview.chromium.org/159723006/ > > Committed: https://code.google.com/p/skia/source/detail?r=13427 R=jvanverth@google.com NOTREECHECKS=true NOTRY=true Author: reed@chromium.org Review URL: https://codereview.chromium.org/163823002 git-svn-id: http://skia.googlecode.com/svn/trunk@13428 2bbb7eff-a529-9590-31e7-b0007b416f81
* add peekPixels to SkCanvas and SkSurfaceGravatar mike@reedtribe.org2014-02-13
| | | | | | | | clone of https://codereview.chromium.org/159723006/ Review URL: https://codereview.chromium.org/161733002 git-svn-id: http://skia.googlecode.com/svn/trunk@13427 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix more 64bit warningsGravatar reed@google.com2014-01-27
| | | | | | | | BUG=skia: Review URL: https://codereview.chromium.org/147683003 git-svn-id: http://skia.googlecode.com/svn/trunk@13190 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
* Make SkImageFilter crop rects relative to the primitive origin, instead of ↵Gravatar senorblanco@chromium.org2014-01-03
| | | | | | | | | | | | | | | | | | relative to their parent's crop rect. This is required by SVG semantics, and is more sane anyway. To do this, this patch changes the "offset/loc" parameter in filterImage() / onFilterImage() from an inout-param to an out-param only, so that the calling filter can know how much the input filter wants its result offset (and doesn't include the original primitive position). This offset can then be applied to the current filter's crop rect. (I've renamed the parameter "offset" in all cases to make this clear.) This makes the call sites in SkCanvas/SkGpuDevice responsible for applying the resulting offset to the primitive's position, which is actually a fairly small change. This change also fixes SkTileImageFilter and SkOffsetImageFilter to correctly handle an input offset, which they weren't before. This required modifying the GM's, since they assumed the broken behaviour. NOTE: this will require rebaselining the imagefiltersgraph test, since it has a new test case. NOTE: this will "break" the Blink layout tests css3/filters/effect-reference-subregion-chained-hw.html and css3/filters/effect-reference-subregion-hw.html, but it actually makes them give correct results. It should be suppressed on the skia roll, and I'll rebaseline it. R=reed@google.com Review URL: https://codereview.chromium.org/112803004 git-svn-id: http://skia.googlecode.com/svn/trunk@12895 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
* Moving 4 SkImageFilter derived classes from blink to skiaGravatar commit-bot@chromium.org2013-09-26
There were 4 classes in blink that derived from SkImageFilter : - TileImageFilter -> SkTileImageFilter - OffsetImageFilter -> SkOffsetImageFilter (already existed) - FloodImageFilter -> SkFloodImageFilter - CompositeImageFilter -> SkCompositeImageFilter All functions were copied as is, without modification (except for warnings fixes), except for the offset filter, which was merged into the existing SkOffsetImageFilter class, as a special case when a crop rect is provided. Since the names won't clash with the names in blink, it should be easy to integrate them in blink later and fix issues, if needed. BUG= R=senorblanco@google.com, senorblanco@chromium.org, bsalomon@google.com, reed@google.com, mtklein@google.com Author: sugoi@chromium.org Review URL: https://chromiumcodereview.appspot.com/24157005 git-svn-id: http://skia.googlecode.com/svn/trunk@11475 2bbb7eff-a529-9590-31e7-b0007b416f81