aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/imagealphathreshold.cpp
Commit message (Collapse)AuthorAge
* add helper to know when a colortype is always opaqueGravatar Mike Reed2018-02-10
| | | | | | | | | | | | Now that surface creation is more picky about its imageinfo, we need to allow clients to know when they should clean-up their alphatype (like our own gm) Bug: skia: Change-Id: Ic110c75769e0154a8343d7e2160d3351f02cf48f Reviewed-on: https://skia-review.googlesource.com/106320 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* use tool_utils to encapsulate checking for recording canvas and makeSurfaceGravatar Mike Reed2018-01-02
| | | | | | | | Bug: skia: Change-Id: Ia93ee09dd213b8d6ad5c18e887add5ff3448c824 Reviewed-on: https://skia-review.googlesource.com/90243 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove color space xform from alpha threshold FPGravatar Brian Osman2017-10-19
| | | | | | | | | | | | | | | | | | | | This does math on the sampled color. In order to do that math in the destination color space, I split the behavior up - the threshold FP now operates on the input color, and we construct a series with a simple texture effect (possibly wrapped in a color xform), then the threshold. I also added a GM that verifies this behavior. All other GMs using this effect were operating on a layer source, which is always created in the destination color space. The new GM explicitly makes a DAG with an image source, so the alpha threshold filter needs to handle any color space mismatch. Bug: skia: Change-Id: I1ed08c99f4eed17f68176bf751677a3ae1614fe3 Reviewed-on: https://skia-review.googlesource.com/61942 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Revert "IWYU""Gravatar Mike Reed2017-02-13
| | | | | | | | | | | This reverts commit 3c727d2386059c1d7cbdcdc9bef5fa18ed33667e. BUG=skia: Change-Id: I72e9b40fec96d044e0ac12906669a52529e77882 Reviewed-on: https://skia-review.googlesource.com/8356 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "IWYU"Gravatar Robert Phillips2017-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2aeae78a2ce3b036f0401fd0381d6fd6e2a7a1fc. Reason for revert: It looks like this is breaking the android roll out/target/product/angler/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_graphics_Canvas.o frameworks/base/core/jni/android_graphics_Canvas.cpp" frameworks/base/core/jni/android_graphics_Canvas.cpp:178:15: error: incomplete type 'SkRegion' named in nested name specifier Original change's description: > IWYU > > BUG=skia: > > Change-Id: Ib6b4d52841dbe3fa69a86ddb6b97d6a5d0f004ee > Reviewed-on: https://skia-review.googlesource.com/8231 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> > TBR=fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: If979c3dd9dc3fe08ac450ced113b3d1e9a86f02a Reviewed-on: https://skia-review.googlesource.com/8346 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* IWYUGravatar Mike Reed2017-02-10
| | | | | | | | | BUG=skia: Change-Id: Ib6b4d52841dbe3fa69a86ddb6b97d6a5d0f004ee Reviewed-on: https://skia-review.googlesource.com/8231 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* refFoo variant for getters that naturally have a sk_spGravatar Mike Reed2017-01-12
| | | | | | | | | | BUG=skia: Change-Id: I13afa1b81e8a72d93e45fb4d37228be196b0f388 Reviewed-on: https://skia-review.googlesource.com/6923 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Handle failed surface creation in AlphaThresholdImageFilter GMGravatar Robert Phillips2016-12-21
| | | | | | | Change-Id: Ibc27d26a9afc1f88d5ca7de2216e09afa10ce846 Reviewed-on: https://skia-review.googlesource.com/6354 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix mapping from src to dst image space in SkAlphaThresholdFilterGravatar Robert Phillips2016-12-20
| | | | | | | | | | | | | | | | | This CL does 3 things: It updates the imagealphathreshold GMs so they would've caught this bug It updates SkAlphaImageThresholdFilter to fix the bug It updates the imagealphathreshold_surface GM to match the imagealphathreshold_crop GM (which it was, presumably, originally written to do) The bug in question is that the prior mapping from src to dst space was correct as long as the imageOffset was (0, 0). BUG=675332 Change-Id: I3aa1f463a2234576fb2277797caa2fc4aba2650d Reviewed-on: https://skia-review.googlesource.com/6291 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Stephan White <senorblanco@chromium.org> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add color space xform to GrAlphaThresholdFragmentProcessorGravatar Brian Osman2016-10-03
| | | | | | | | | | | | | Fix imagealphathreshold_surface GM to test gamut conversion. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2867 Change-Id: Id9aaebe72d1dadc613ef1a8d17d066b51049300f Reviewed-on: https://skia-review.googlesource.com/2867 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Fix alpha threshold GM to test with and without crop rectGravatar Brian Osman2016-10-03
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2864 Change-Id: I09f24303b2a693a384fb7399c2287ab476f16319 Reviewed-on: https://skia-review.googlesource.com/2864 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Switch AlphaThresholdFilter over to new onFilterImage interfaceGravatar robertphillips2016-04-12
| | | | | | | | | | | | This CL also alters the raster path in two ways: it now respects the sRGB/linear distinction of its input it now respects the clip TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1879643003 Review URL: https://codereview.chromium.org/1879643003
* Update SkAlphaThresholdFilter 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=1847053004 Review URL: https://codereview.chromium.org/1847053004
* 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
* 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
* Fix SkAlphaThresholdFilter bounds handling.Gravatar senorblanco2016-01-19
| | | | | | | | | | | | | | | | SkAlphaThresholdFilter was always allocating a mask texture of the same size as the source texture. In addition to potentially wasting VRAM, this could cause the mask to be offset from the source texture, if the resulting bounds were a different size than the source texture. The fix is to allocate a mask texture only as large as the bounds, and to offset it to the bounds origin on draw. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1609573002 Review URL: https://codereview.chromium.org/1609573002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* 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
* 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
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* 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
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-01-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12950 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make imagealphathreshold GM skip replay modes until it is fixed.Gravatar bsalomon@google.com2014-01-07
| | | | | | | | TBR=zork@chromium.org Review URL: https://codereview.chromium.org/94043005 git-svn-id: http://skia.googlecode.com/svn/trunk@12942 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix build warnings in SkAlphaThresholdFilterGravatar commit-bot@chromium.org2014-01-07
| | | | | | | | | | | BUG=None R=bsalomon@google.com Author: zork@chromium.org Review URL: https://codereview.chromium.org/101763010 git-svn-id: http://skia.googlecode.com/svn/trunk@12937 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add AlphaThreshold filter.Gravatar commit-bot@chromium.org2014-01-06
This is based on the Bitmap Alpha Threshold filter, and will be used by Chromium to implement the window shape API. R=bsalomon@chromium.org, wez@chromium.org, bsalomon@google.com, reed@google.com Author: zork@chromium.org Review URL: https://codereview.chromium.org/115633002 git-svn-id: http://skia.googlecode.com/svn/trunk@12935 2bbb7eff-a529-9590-31e7-b0007b416f81