aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkArithmeticMode.cpp
Commit message (Collapse)AuthorAge
* Arithmetic xfermode stage.Gravatar mtklein2016-07-25
| | | | | | | | | | 565 is identical, and as usual the old sRGB path was broken. :) It was unimplemented, so the default missing Sk4f implementation was mimicking Src. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2175133002 Review-Url: https://codereview.chromium.org/2175133002
* sk_sp for Ganesh.Gravatar bungeman2016-06-09
| | | | | | | | | | Convert use of GrFragmentProcessor, GrGeometryProcessor, and GrXPFactory to sk_sp. This clarifies ownership and should reduce reference count churn by moving ownership. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041113004 Review-Url: https://codereview.chromium.org/2041113004
* arithmetic mode with Sk4fGravatar mtklein2016-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After reading the SSE version, I figured I'd show off the new hotness a little. This'll get us SSE, NEON and portable implementations all in one easy to read package. Since we've been talking about it, it's worth noting the several ways this implementation is still not constant time: - short circuits on 0x00 and 0xff coverage; - floating point multiplication with untrusted k1-k4; if someone figures out a clever way to sometimes create denorm floats and sometimes not, there's a gigantic performance difference. I would hazard the pin is constant time now though. I've also fixed the lerp to lerp between dst and r instead of src and r. That can't have been right. curr/maxrss loops min median mean max stddev samples config bench 9/9 MB 1 25.5ms 25.5ms 25.5ms 25.5ms 0% ▃▁▁▃▂▇▅▆▇█ 8888 Xfermode_arithmetic_enforce_pm_aa 9/9 MB 1 24.1ms 24.2ms 24.2ms 24.3ms 0% ▄▃▁▄█▆▆█▃█ 8888 Xfermode_arithmetic_aa 9/9 MB 1 102ms 102ms 102ms 103ms 0% ▁▅▂▆▂█▂█▁▂ 8888 Xfermode_arithmetic_enforce_pm 9/9 MB 1 94.8ms 95.4ms 95.2ms 95.8ms 0% ▅▅▁▁▁▁▄▇█▇ 8888 Xfermode_arithmetic ~~~~> curr/maxrss loops min median mean max stddev samples config bench 9/9 MB 1 9.71ms 9.74ms 9.73ms 9.78ms 0% █▅▄▄▁▂▂▂▄▄ 8888 Xfermode_arithmetic_enforce_pm_aa 9/9 MB 1 9.5ms 9.57ms 9.58ms 9.7ms 1% ▂▁█▅▂▂▆▃▄▄ 8888 Xfermode_arithmetic_aa 9/9 MB 1 21.8ms 21.8ms 21.8ms 21.9ms 0% █▂▂▂▂▂▂▁▄▂ 8888 Xfermode_arithmetic_enforce_pm 9/9 MB 1 16.5ms 16.6ms 16.6ms 16.6ms 0% ▃█▁▁▄▄▁▁▆▅ 8888 Xfermode_arithmetic BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873963003 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1873963003
* change flattenable factory to return sk_spGravatar reed2016-04-03
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1855733002 Review URL: https://codereview.chromium.org/1855733002
* switch xfermodes over to sk_spGravatar reed2016-03-29
| | | | | | | | | waiting on https://codereview.chromium.org/1835163002/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1832223002 Review URL: https://codereview.chromium.org/1832223002
* 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
* clean-up dead codeGravatar reed2016-02-22
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1719773002 Review URL: https://codereview.chromium.org/1719773002
* Alter SkXfermode's asFragmentProcessor & asXPFactory contractsGravatar robertphillips2016-02-09
| | | | | | | | TBR=bsalomon@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1674673002 Review URL: https://codereview.chromium.org/1674673002
* kill SkValueGravatar mtklein2016-01-27
| | | | | | | | | | | This is clearly not what we're going to do. TBR=reed@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1643753002 Review URL: https://codereview.chromium.org/1643753002
* Add gpu implementation of OverdrawXfermodeGravatar robertphillips2016-01-27
| | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1607253002 Committed: https://skia.googlesource.com/skia/+/8bc3cf88bbf5e5d5724356f076931bb70a6117ba Review URL: https://codereview.chromium.org/1607253002
* Remove SkLerpXfermodeGravatar robertphillips2016-01-25
| | | | | | | | This relies on the Chromium CL https://codereview.chromium.org/1610573004/ (Replace use of SkLerpXfermode with SkArithmeticMode) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1611633002 Review URL: https://codereview.chromium.org/1611633002
* Revert of Add gpu implementation of OverdrawXfermode (patchset #6 id:100001 ↵Gravatar robertphillips2016-01-22
| | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/1607253002/ ) Reason for revert: Overdraw Xfer mode using new fangled glsl features Original issue's description: > Add gpu implementation of OverdrawXfermode > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1607253002 > > Committed: https://skia.googlesource.com/skia/+/8bc3cf88bbf5e5d5724356f076931bb70a6117ba TBR=egdaniel@google.com # Not skipping CQ checks because original CL landed more than 1 days ago. Review URL: https://codereview.chromium.org/1626443002
* SkValue: SkXfermodeGravatar halcanary2016-01-21
| | | | | | | | | | | | | Implement: template<> SkValue SkToValue<SkXfermode>(const SkXfermode*); template<> bool SkFromValue<SkXfermode*>(const SkValue&, SkXfermode**); GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1585813004 NOTRY=true Review URL: https://codereview.chromium.org/1585813004
* Add gpu implementation of OverdrawXfermodeGravatar robertphillips2016-01-20
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1607253002 Review URL: https://codereview.chromium.org/1607253002
* Revert of Make specialized SrcOver XPFactory (patchset #3 id:40001 of ↵Gravatar egdaniel2015-11-20
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1455273006/ ) Reason for revert: breaking some builds Original issue's description: > Make specialized SrcOver XPFactory > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/a7006d45217d128a94fa53cb4b827cca79bc7049 TBR=bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1464933003
* Make specialized SrcOver XPFactoryGravatar egdaniel2015-11-20
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1455273006
* Bye bye processor data manager.Gravatar bsalomon2015-10-06
| | | | Review URL: https://codereview.chromium.org/1388113002
* Create fragment processor for performing input color blend with child processorGravatar bsalomon2015-09-15
| | | | | | The new FP is used to implement SkXM::Mode color filters and SkXM::Mode image filters. Also, these now support all advanced SkXM::Mode xfermodes. Review URL: https://codereview.chromium.org/1334293003
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Style Change: SkNEW->new; SkDELETE->deleteGravatar halcanary2015-08-26
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
* rename GrShaderDataManager -> GrProcessorDataManagerGravatar joshualitt2015-07-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1228683002
* more threading of GrShaderDataManagerGravatar joshualitt2015-07-08
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1215643006
* 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 Arithmetic mode xp.Gravatar egdaniel2015-01-14
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/837633005
* Move Gpu ArithmeticMode xfer effect to _gpu files.Gravatar egdaniel2015-01-14
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/827163004
* 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
* Use threshold of 1 texture coord value per pixel w/ nearest neighbor.Gravatar bsalomon2014-12-09
| | | | Review URL: https://codereview.chromium.org/787873002
* Make addUniform take a precisionGravatar bsalomon2014-12-09
| | | | Review URL: https://codereview.chromium.org/788733003
* Remove backend factoriesGravatar joshualitt2014-12-04
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/778453002
* Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.Gravatar mtklein2014-12-01
| | | | | | | | | | | | This was needed for pictures before v33, and we're now requiring v35+. Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc BUG=skia: Committed: https://skia.googlesource.com/skia/+/52c293547b973f7fb5de3c83f5062b07d759ab88 Review URL: https://codereview.chromium.org/769953002
* Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (patchset #1 id:1 of ↵Gravatar mtklein2014-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/769953002/) Reason for revert: Breaks canary builds. Will reland after the Chromium change lands. Original issue's description: > Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. > > This was needed for pictures before v33, and we're now requiring v35+. > > Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/52c293547b973f7fb5de3c83f5062b07d759ab88 TBR=reed@google.com,mtklein@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/768183002
* Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.Gravatar mtklein2014-12-01
| | | | | | | | | | This was needed for pictures before v33, and we're now requiring v35+. Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc BUG=skia: Review URL: https://codereview.chromium.org/769953002
* remove proc keyGravatar joshualitt2014-11-25
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/755363002
* Move GrInvariantOutput out of GrProcessor and into its own class.Gravatar egdaniel2014-11-12
| | | | | | | | This will help with the ability to subclass, add to, etc. GrInvariantOutput. Also it was simply getting a little too big to be a "supporting" subclass BUG=skia: Review URL: https://codereview.chromium.org/699943003
* Auto-compare GrProcessors' texture accesses in isEqual().Gravatar bsalomon2014-10-16
| | | | | | R=joshualitt@google.com Review URL: https://codereview.chromium.org/654313002
* Move willUseInputColor check to computeInvariantOutputGravatar egdaniel2014-10-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/656503002
* Push isEqual/onIsEqual down from GrProcessor to subclasses.Gravatar bsalomon2014-10-15
| | | | | | R=joshualitt@google.com Review URL: https://codereview.chromium.org/654273002
* Create helper functions to use in computeInvariantOutput callsGravatar egdaniel2014-10-13
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/643743003
* FPs now use the correct builder types(just a rename)Gravatar joshualitt2014-10-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/648463003
* Add isSingleComponent bool to getConstantColorComponentGravatar egdaniel2014-10-03
| | | | | | | | | | Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components. BUG=skia: Committed: https://skia.googlesource.com/skia/+/3b8af078281a5a20f951b9fd84f38d92b8f6217b Review URL: https://codereview.chromium.org/608253002
* Revert of Add isSingleComponent bool to getConstantColorComponent (patchset ↵Gravatar robertphillips2014-10-02
| | | | | | | | | | | | | | | | | | | | | | | #6 id:100001 of https://codereview.chromium.org/608253002/) Reason for revert: Changing some GMs Original issue's description: > Add isSingleComponent bool to getConstantColorComponent > > Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/3b8af078281a5a20f951b9fd84f38d92b8f6217b TBR=joshualitt@chromium.org,bsalomon@google.com,reed@google.com,egdaniel@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/617853003
* Add isSingleComponent bool to getConstantColorComponentGravatar egdaniel2014-10-02
| | | | | | | | Initial step to allowing effects to use/output 1 or 4 color/coverage components. This cl doesn't change any current logic and all effects still assume they are working with 4 components. BUG=skia: Review URL: https://codereview.chromium.org/608253002
* Patch to create a distinct geometry processor. The vast majority of this patchGravatar joshualitt2014-09-23
| | | | | | | | | | | | | is just a rename. The meat is in GrGeometryProcessor, GrProcessor, GrGL*Processor, GrProcessorStage, Gr*BackendProcessorFactory, GrProcessUnitTestFactory, and the builders BUG=skia: R=bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/582963002
* Changes to remove program effects builderGravatar joshualitt2014-09-18
| | | | | | | | | BUG=skia: R=bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/551253004
* removing GrDrawEffectGravatar joshualitt2014-09-16
| | | | | | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/8ddbe8b9366c8c59c4fb55f01f253de8a0b37d6e R=bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/571163002
* Revert of removing GrDrawEffect (patchset #4 id:60001 of ↵Gravatar joshualitt2014-09-16
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/571163002/) Reason for revert: reverting to unblock another revert Original issue's description: > removing GrDrawEffect > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/8ddbe8b9366c8c59c4fb55f01f253de8a0b37d6e R=bsalomon@google.com TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/577593003
* removing GrDrawEffectGravatar joshualitt2014-09-16
| | | | | | | | | BUG=skia: R=bsalomon@google.com Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/571163002
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* Initial refactor of shaderbuilder to prepare for geometry shadersGravatar joshualitt2014-08-21
| | | | | | | | | | | gitignore for eclipse BUG=skia: R=bsalomon@google.com, bsalomon@chromium.org Author: joshualitt@chromium.org Review URL: https://codereview.chromium.org/491673002
* Simplify flattening to just write enough to call the ↵Gravatar reed2014-08-21
| | | | | | | | | | | | | | | | | | factory/public-constructor for the class. We want to *not* rely on private constructors, and not rely on calling through the inheritance hierarchy for either flattening or unflattening(CreateProc). Refactoring pattern: 1. guard the existing constructor(readbuffer) with the legacy build-flag 2. If you are a instancable subclass, implement CreateProc(readbuffer) to create a new instances from the buffer params (or return NULL). If you're a shader subclass 1. You must read/write the local matrix if your class accepts that in its factory/constructor, else ignore it. R=robertphillips@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org, sugoi@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/395603002