aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/colorfilterimagefilter.cpp
Commit message (Collapse)AuthorAge
* GM: replace boilerplate with macrosGravatar halcanary2015-09-09
| | | | | | | | | | | I have verified locally that nothing draws differently. Motivation: * SK_SIMPLE_GM makes it easier to write a GM. * Reducing 1100 lines of code makes maintenance easier. * Simple GMs are easy to convert to Fiddles. Review URL: https://codereview.chromium.org/1333553002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Reland of Implement canComputeFastBounds() for image filters. (patchset #1 ↵Gravatar senorblanco2015-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:1 of https://codereview.chromium.org/1300403003/ ) Reason for revert: The Mac compile issue was fixed here: https://chromium.googlesource.com/chromium/src/+/fdd331a42ae0b9a6909a121020735161ab61c6e5 Original issue's description: > Revert of Implement canComputeFastBounds() for image filters. (patchset #8 id:130001 of https://codereview.chromium.org/1296943002/ ) > > Reason for revert: > This causes a syntax error. > > http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/87819/steps/compile%20%28with%20patch%29/logs/stdio > > Original issue's description: > > Implement canComputeFastBounds() for image filters. > > > > Image filters have never implemented this check, which means that > > filters which affect transparent black falsely claim they can compute > > their bounds. > > > > Implemented an affectsTransparentBlack() virtual for image > > filters, and a similar helper function for color filters. > > > > This will affect the following GMs: imagefiltersscaled > > (lighting, perlin noise now filter to clip), > > colorfilterimagefilter (new test case), imagefiltersclipped > > (perlin noise now filters to clip). > > > > Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding > > a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show > > no impact from this change, but will watch the perf bots carefully. > > > > BUG=4212 > > > > Committed: https://skia.googlesource.com/skia/+/915881fe743f9a789037695f543bc6ea189cd0cb > > TBR=reed@google.com,senorblanco@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=4212 > > Committed: https://skia.googlesource.com/skia/+/12d8472d31ea5edb636d7d5214db253570115c40 TBR=reed@google.com,herb@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=4212 Review URL: https://codereview.chromium.org/1301823005
* Revert of Implement canComputeFastBounds() for image filters. (patchset #8 ↵Gravatar herb2015-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:130001 of https://codereview.chromium.org/1296943002/ ) Reason for revert: This causes a syntax error. http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/87819/steps/compile%20%28with%20patch%29/logs/stdio Original issue's description: > Implement canComputeFastBounds() for image filters. > > Image filters have never implemented this check, which means that > filters which affect transparent black falsely claim they can compute > their bounds. > > Implemented an affectsTransparentBlack() virtual for image > filters, and a similar helper function for color filters. > > This will affect the following GMs: imagefiltersscaled > (lighting, perlin noise now filter to clip), > colorfilterimagefilter (new test case), imagefiltersclipped > (perlin noise now filters to clip). > > Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding > a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show > no impact from this change, but will watch the perf bots carefully. > > BUG=4212 > > Committed: https://skia.googlesource.com/skia/+/915881fe743f9a789037695f543bc6ea189cd0cb TBR=reed@google.com,senorblanco@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=4212 Review URL: https://codereview.chromium.org/1300403003
* Implement canComputeFastBounds() for image filters.Gravatar senorblanco2015-08-20
| | | | | | | | | | | | | | | | | | | | | | Image filters have never implemented this check, which means that filters which affect transparent black falsely claim they can compute their bounds. Implemented an affectsTransparentBlack() virtual for image filters, and a similar helper function for color filters. This will affect the following GMs: imagefiltersscaled (lighting, perlin noise now filter to clip), colorfilterimagefilter (new test case), imagefiltersclipped (perlin noise now filters to clip). Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show no impact from this change, but will watch the perf bots carefully. BUG=4212 Review URL: https://codereview.chromium.org/1296943002
* 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
* Factory methods for heap-allocated SkColorFilter objects.Gravatar commit-bot@chromium.org2014-02-21
| | | | | | | | | | | | | | | | | | 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 SkColorFilter 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@google.com, reed@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/175293002 git-svn-id: http://skia.googlecode.com/svn/trunk@13539 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkFloatToScalar macroGravatar commit-bot@chromium.org2013-11-25
| | | | | | | | | | | BUG= R=reed@google.com, djsollen@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/85463005 git-svn-id: http://skia.googlecode.com/svn/trunk@12385 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a factory Create function for SkColorFilterImageFilter, and move the ↵Gravatar senorblanco@chromium.org2012-10-26
| | | | | | | | matrix optimization there. This will allow the Chrome compositor to extract the optimized matrix, and potentially apply the color matrix itself, saving a buffer allocation & draw. Review URL: https://codereview.appspot.com/6739057 git-svn-id: http://skia.googlecode.com/svn/trunk@6152 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-10-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5943 2bbb7eff-a529-9590-31e7-b0007b416f81
* When two or more color matrix image filters are connected together, and the ↵Gravatar senorblanco@chromium.org2012-10-12
non-leaf matrices do not require clamping, we can concatenate their matrices and apply them together. Review URL: https://codereview.appspot.com/6489054 git-svn-id: http://skia.googlecode.com/svn/trunk@5931 2bbb7eff-a529-9590-31e7-b0007b416f81