aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/aaxfermodes.cpp
Commit message (Collapse)AuthorAge
* Revert "Revert "move GrColor.h to private, IWYU""Gravatar Mike Reed2018-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 63cc29304a65039feaf27842d587ed16de010b0d. Reason for revert: pdfium updated Original change's description: > Revert "move GrColor.h to private, IWYU" > > This reverts commit e602f395813aab8242afad356008b8e79911adbb. > > Reason for revert: Breaks PDFIUM > > Original change's description: > > move GrColor.h to private, IWYU > > > > Bug: skia: > > Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e > > Reviewed-on: https://skia-review.googlesource.com/104160 > > Commit-Queue: Mike Reed <reed@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,reed@google.com > > Change-Id: Ifaa50f8771fa1ca8bc152270efdb1fe27f7210f2 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/104440 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,reed@google.com Change-Id: I22fa5c0e0628b5c1f3b5f13879c7d1a4528cc93a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/104561 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "move GrColor.h to private, IWYU"Gravatar Brian Salomon2018-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e602f395813aab8242afad356008b8e79911adbb. Reason for revert: Breaks PDFIUM Original change's description: > move GrColor.h to private, IWYU > > Bug: skia: > Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e > Reviewed-on: https://skia-review.googlesource.com/104160 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,reed@google.com Change-Id: Ifaa50f8771fa1ca8bc152270efdb1fe27f7210f2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/104440 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* move GrColor.h to private, IWYUGravatar Mike Reed2018-02-06
| | | | | | | | Bug: skia: Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e Reviewed-on: https://skia-review.googlesource.com/104160 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Replace SkFAIL with SK_ABORT.Gravatar Ben Wagner2017-08-16
| | | | | | | | | | | | SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically changes uses of SkFAIL to SK_ABORT in preparation for its removal. The related sk_throw macro will be changed independently, due to needing to actually clean up its users. Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb Reviewed-on: https://skia-review.googlesource.com/35284 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Ben Wagner <bungeman@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>
* hide trivial helpers on canvasGravatar Mike Reed2017-02-22
| | | | | | | | | BUG=skia: Change-Id: I42d4ca92897bde5bd8e0575a0104b12b83134cef Reviewed-on: https://skia-review.googlesource.com/8852 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "make it illegal to include SkXfermode.h""Gravatar Mike Reed2016-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e9d1b299ccbf8017ba57040986ded638f954684a. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "make it illegal to include SkXfermode.h" > > This reverts commit 07764cefbb18041a77897df3453903b0a2016583. > > Reason for revert: breaking google3 > > Original change's description: > > make it illegal to include SkXfermode.h > > > > BUG=skia: > > > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5133 > > > > Change-Id: I6e8596dcb17cd7e8efa67859bb682bf9bfcac4db > > Reviewed-on: https://skia-review.googlesource.com/5133 > > Reviewed-by: Mike Reed <reed@google.com> > > Commit-Queue: Mike Reed <reed@google.com> > > > > TBR=reed@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I136f9e533eb60633c49dffa19b5747d50b6d98a8 > Reviewed-on: https://skia-review.googlesource.com/5196 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,reviews@skia.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I0b767ce778a4ade83c2f07d5ece486bb46d7712c Reviewed-on: https://skia-review.googlesource.com/5223 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert "make it illegal to include SkXfermode.h"Gravatar Greg Daniel2016-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 07764cefbb18041a77897df3453903b0a2016583. Reason for revert: breaking google3 Original change's description: > make it illegal to include SkXfermode.h > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5133 > > Change-Id: I6e8596dcb17cd7e8efa67859bb682bf9bfcac4db > Reviewed-on: https://skia-review.googlesource.com/5133 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I136f9e533eb60633c49dffa19b5747d50b6d98a8 Reviewed-on: https://skia-review.googlesource.com/5196 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* make it illegal to include SkXfermode.hGravatar Mike Reed2016-11-23
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5133 Change-Id: I6e8596dcb17cd7e8efa67859bb682bf9bfcac4db Reviewed-on: https://skia-review.googlesource.com/5133 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* make SkXfermode.h go awayGravatar Mike Reed2016-11-16
| | | | | | | | | | | | | | | | | | This is step one: - make SkXfermode useless to public clients - everything they should need is in SkBlendMode.h Step two: - remove SkXfermode.h entirely (since skia core will already be using SkXfermodePriv.h) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4534 Change-Id: If2cea9f71df92430ed6644edb98dd306c5572cbc Reviewed-on: https://skia-review.googlesource.com/4534 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar reed2016-10-05
| | | | | | | | | | | This reverts commit c245574ba3d0e2ade6c94b2812de3baa383bf4c4. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2396953002 TBR= Review-Url: https://codereview.chromium.org/2396953002
* Revert[7] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8. Reason for revert: new assert from 100K bot Original change's description: > Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints" > > - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter > This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992 > > Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8 > Reviewed-on: https://skia-review.googlesource.com/2992 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I848e5a69c5cd67f2c14889f4f0a346652578c4ff Reviewed-on: https://skia-review.googlesource.com/3023 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-05
| | | | | | | | | | | | | | - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992 Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8 Reviewed-on: https://skia-review.googlesource.com/2992 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[5] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit I0fa5c58af428f3da8565465d1219a34ef8417d9a. Reason for revert: failing to deserialize some of the 100K Original change's description: > Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints" > > This reverts commit 2cbcd12281ee807214df094964c584c78932e10b. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924 > > Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a > Reviewed-on: https://skia-review.googlesource.com/2924 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1805a57eef5ebcac203da5989c8539345ecf806f Reviewed-on: https://skia-review.googlesource.com/2962 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-04
| | | | | | | | | | | | | This reverts commit 2cbcd12281ee807214df094964c584c78932e10b. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924 Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a Reviewed-on: https://skia-review.googlesource.com/2924 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert "replace SkXfermode obj with SkBlendMode enum in ↵Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | paints""" This reverts commit I86875511a13497112827cbaed1dbd7639e9e3d10. legacy (100K) skp failure Original change's description: > Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints"" > > This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e. > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878 > > Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10 > Reviewed-on: https://skia-review.googlesource.com/2878 > Reviewed-by: Matt Sarett <msarett@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=msarett@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ife6f0cf3a22b3e8cf885a188f7f44e1ff62e06a5 Reviewed-on: https://skia-review.googlesource.com/2881 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878 Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10 Reviewed-on: https://skia-review.googlesource.com/2878 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "replace SkXfermode obj with SkBlendMode enum in paints"Gravatar Mike Reed2016-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit I4fb489ba6b3f77b458f7e4a99f79c7ad10859135. Reason for revert: <INSERT REASONING HERE> Original change's description: > replace SkXfermode obj with SkBlendMode enum in paints > > BUG=skia:5814 > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714 > > Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135 > Reviewed-on: https://skia-review.googlesource.com/2714 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bsalomon@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3e43f79ef5c1709929663fe63cc1f67cd78270b7 Reviewed-on: https://skia-review.googlesource.com/2871 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* replace SkXfermode obj with SkBlendMode enum in paintsGravatar Mike Reed2016-10-03
| | | | | | | | | | | | BUG=skia:5814 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714 Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135 Reviewed-on: https://skia-review.googlesource.com/2714 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "replace Arithmetic xfermode with imagefilter""Gravatar Mike Reed2016-09-27
| | | | | | | | | | | | | This reverts commit 10ff5bfa789b6b602464e8511fdf676c6f5b1bd4. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2680 TBR= Change-Id: Iac2f4d48d227ff426ccf02b7eae280f382ad3580 Reviewed-on: https://skia-review.googlesource.com/2680 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "replace Arithmetic xfermode with imagefilter"Gravatar Mike Reed2016-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit Ia3f3b721854c516f3b7f8c44f71f40a8a2eeb9b4. Reason for revert: need to guard the no-gpu codepath Original issue's description: > replace Arithmetic xfermode with imagefilter > > chrome pre-cl: https://codereview.chromium.org/2369023002/ > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2595 > > Change-Id: Ia3f3b721854c516f3b7f8c44f71f40a8a2eeb9b4 > Reviewed-on: https://skia-review.googlesource.com/2595 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=robertphillips@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I761799b594a0379c6bf356e6abc73552c3d19480 Reviewed-on: https://skia-review.googlesource.com/2661 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* replace Arithmetic xfermode with imagefilterGravatar Mike Reed2016-09-26
| | | | | | | | | | | | | | chrome pre-cl: https://codereview.chromium.org/2369023002/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2595 Change-Id: Ia3f3b721854c516f3b7f8c44f71f40a8a2eeb9b4 Reviewed-on: https://skia-review.googlesource.com/2595 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Replace a lot of 'static const' with 'constexpr' or 'const'.Gravatar mtklein2016-09-01
| | | | | | | | | | | | | | | | | | | | | | | 'static const' means, there must be at most one of these, and initialize it at compile time if possible or runtime if necessary. This leads to unexpected code execution, and TSAN* will complain about races on the guard variables. Generally 'constexpr' or 'const' are better choices. Neither can cause races: they're either intialized at compile time (constexpr) or intialized each time independently (const). This CL prefers constexpr where possible, and uses const where not. It even prefers constexpr over const where they don't make a difference... I want to have lots of examples of constexpr for people to see and mimic. The scoped-to-class static has nothing to do with any of this, and is not changed. * Not yet on the bots, which use an older TSAN. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300623005 Review-Url: https://codereview.chromium.org/2300623005
* 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
* Added concave paths to aaxfermodes GMGravatar ethannicholas2015-12-17
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534823004 Review URL: https://codereview.chromium.org/1534823004
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* IWYU: 'core' target, files starting A-C.Gravatar bungeman2015-08-05
| | | | | | | | | TBR=reed@google.com Verbal lgtm, does not change API. Committed: https://skia.googlesource.com/skia/+/7403d87db8e43d4c2b5b25ac22a0ebc22bd09d69 Review URL: https://codereview.chromium.org/1265033002
* Revert of IWYU: 'core' target, files starting A-C. (patchset #5 id:80001 of ↵Gravatar reed2015-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1265033002/ ) Reason for revert: revert to unblock DEPS roll ../../chrome/browser/chromeos/display/overscan_calibrator.cc:43:10: error: variable has incomplete type 'SkPath' SkPath base_path; Original issue's description: > IWYU: 'core' target, files starting A-C. > > TBR=reed@google.com > Verbal lgtm, does not change API. > > Committed: https://skia.googlesource.com/skia/+/7403d87db8e43d4c2b5b25ac22a0ebc22bd09d69 TBR=reed@google.com,mtklein@google.com,bungeman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1273613002
* IWYU: 'core' target, files starting A-C.Gravatar bungeman2015-08-04
| | | | | | | TBR=reed@google.com Verbal lgtm, does not change API. Review URL: https://codereview.chromium.org/1265033002
* rename portable_typeface_always to portable_typefaceGravatar caryclark2015-07-24
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1257773002
* turn on antialiased textGravatar caryclark2015-06-10
| | | | | | | | | Aliased text didn't work with msaa16, so make it all antialiased. TBR=reed@google.com Review URL: https://codereview.chromium.org/1169173006
* Today's gm include many differences caused by platform font implementations.Gravatar caryclark2015-06-10
| | | | | | | | | | | | | | | This experiment replaces the label used in the aaxfermodes gm with aliased text generated from paths common to all platforms. Since there is no way today to generate all dm output from trybots, this will be checked in to confirm that this strategy provides simpler output across devices. This does not introduce a new public interface; instead, dm uses a extern backdoor to install the SkTypeface::CreateFromName handler. Review URL: https://codereview.chromium.org/1163283002
* Implement Porter Duff XP with a blend tableGravatar cdalton2015-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes the runtime logic used by PorterDuffXferProcessor to decide blend coeffs and shader outputs, and instead uses a compile-time constant table of pre-selected blend formulas. Separates out the dst read fallback into its own XP. Introduces a new blend strategy for srcCoeff=0 that can apply coverage with a reverse subtract blend equation instead of dual source blending. Adds new macros in GrBlend.h to analyze blend formulas both runtime. Removes kSetCoverageDrawing_OptFlag and GrSimplifyBlend as they are no longer used. Adds a GM that verifies all xfermodes, including arithmetic, with the color/coverage invariants used by Porter Duff. Adds a unit test that verifies each Porter Duff formula with every color/coverage invariant. Major changes: * Uses a reverse subtract blend equation for coverage when srcCoeff=0 (clear, dst-out [Sa=1], dst-in, modulate). Platforms that don't support dual source blending no longer require a dst copy for dst-in and modulate. * Sets BlendInfo::fWriteColor to false when the blend does not modify the dst. GrGLGpu will now use glColorMask instead of blending for these modes (dst, dst-in [Sa=1], modulate ignored for [Sc=1]). * Converts all SA blend coeffs to One for opaque inputs, and ISA to Zero if there is also no coverage. (We keep ISA around when there is coverage because we use it to tweak alpha for coverage.) * Abandons solid white optimizations for the sake of simplicity (screen was the only mode that previous had solid white opts). Minor differences: * Inconsequential differences in opt flags (e.g. we now return kCanTweakAlphaForCoverage_OptFlag even when there is no coverage). * Src coeffs when the shader outputs 0. * IS2C vs IS2A when the secondary output is scalar. BUG=skia: Committed: https://skia.googlesource.com/skia/+/9a70920db22b6309c671f8e5d519bb95570e4414 Review URL: https://codereview.chromium.org/1124373002
* Revert of Implement Porter Duff XP with a blend table (patchset #12 ↵Gravatar bungeman2015-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:220001 of https://codereview.chromium.org/1124373002/) Reason for revert: Blocking DEPS roll into Chromium. Crashing virtual/gpu/fast/canvas/canvas-composite-*.html tests with the assert ../../third_party/skia/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp:281: failed assertion "k110_GrGLSLGeneration != gpu->glslGeneration() || fOutputs.empty()" Original issue's description: > Implement Porter Duff XP with a blend table > > Removes the runtime logic used by PorterDuffXferProcessor to decide > blend coeffs and shader outputs, and instead uses a compile-time > constant table of pre-selected blend formulas. > > Introduces a new blend strategy for srcCoeff=0 that can apply coverage > with a reverse subtract blend equation instead of dual source > blending. > > Adds new macros in GrBlend.h to analyze blend formulas both runtime. > > Removes kSetCoverageDrawing_OptFlag and GrSimplifyBlend as they are no > longer used. > > Adds a GM that verifies all xfermodes, including arithmetic, with the > color/coverage invariants used by Porter Duff. > > Adds a unit test that verifies each Porter Duff formula with every > color/coverage invariant. > > Major changes: > > * Uses a reverse subtract blend equation for coverage when srcCoeff=0 > (clear, dst-out [Sa=1], dst-in, modulate). Platforms that don't > support dual source blending no longer require a dst copy for > dst-in and modulate. > > * Sets BlendInfo::fWriteColor to false when the blend does not modify > the dst. GrGLGpu will now use glColorMask instead of blending for > these modes (dst, dst-in [Sa=1], modulate ignored for [Sc=1]). > > * Converts all SA blend coeffs to One for opaque inputs, and ISA to > Zero if there is also no coverage. (We keep ISA around when there > is coverage because we use it to tweak alpha for coverage.) > > * Abandons solid white optimizations for the sake of simplicity > (screen was the only mode that previous had solid white opts). > > Minor differences: > > * Inconsequential differences in opt flags (e.g. we now return > kCanTweakAlphaForCoverage_OptFlag even when there is no coverage). > > * Src coeffs when the shader outputs 0. > > * IS2C vs IS2A when the secondary output is scalar. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/9a70920db22b6309c671f8e5d519bb95570e4414 TBR=egdaniel@google.com,bsalomon@google.com,cdalton@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1153993002
* Implement Porter Duff XP with a blend tableGravatar cdalton2015-05-22
Removes the runtime logic used by PorterDuffXferProcessor to decide blend coeffs and shader outputs, and instead uses a compile-time constant table of pre-selected blend formulas. Introduces a new blend strategy for srcCoeff=0 that can apply coverage with a reverse subtract blend equation instead of dual source blending. Adds new macros in GrBlend.h to analyze blend formulas both runtime. Removes kSetCoverageDrawing_OptFlag and GrSimplifyBlend as they are no longer used. Adds a GM that verifies all xfermodes, including arithmetic, with the color/coverage invariants used by Porter Duff. Adds a unit test that verifies each Porter Duff formula with every color/coverage invariant. Major changes: * Uses a reverse subtract blend equation for coverage when srcCoeff=0 (clear, dst-out [Sa=1], dst-in, modulate). Platforms that don't support dual source blending no longer require a dst copy for dst-in and modulate. * Sets BlendInfo::fWriteColor to false when the blend does not modify the dst. GrGLGpu will now use glColorMask instead of blending for these modes (dst, dst-in [Sa=1], modulate ignored for [Sc=1]). * Converts all SA blend coeffs to One for opaque inputs, and ISA to Zero if there is also no coverage. (We keep ISA around when there is coverage because we use it to tweak alpha for coverage.) * Abandons solid white optimizations for the sake of simplicity (screen was the only mode that previous had solid white opts). Minor differences: * Inconsequential differences in opt flags (e.g. we now return kCanTweakAlphaForCoverage_OptFlag even when there is no coverage). * Src coeffs when the shader outputs 0. * IS2C vs IS2A when the secondary output is scalar. BUG=skia: Review URL: https://codereview.chromium.org/1124373002