skia2/include
cdalton 6fd158ea47 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. 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
2015-05-27 15:08:33 -07:00
..
animator Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
c add stroke params to c api 2015-01-10 17:59:31 -08:00
codec remove dead code behind BOOL_ONGETINFO 2015-05-05 11:36:02 -07:00
config [SkPDFDevice] Enable pathops-based inverse fills 2015-04-22 15:02:04 -07:00
core change internals over to SkPixmap and stop using accessBitmap 2015-05-26 11:31:54 -07:00
device/xps C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} 2015-03-25 18:17:32 -07:00
effects remove redundant/deprecated TwoPointRadial gradiet -- use TwoPointConical 2015-05-04 08:32:51 -07:00
gpu Implement Porter Duff XP with a blend table 2015-05-27 15:08:33 -07:00
images Make SkStream *not* ref counted. 2015-01-21 12:09:53 -08:00
pathops Revert of Remove now-redundant SkPathOps enum. (patchset #1 id:1 of https://codereview.chromium.org/1051113005/) 2015-04-07 06:53:21 -07:00
pipe "NULL !=" = NULL 2014-09-05 13:34:00 -07:00
ports Font variations. 2015-05-20 09:21:04 -07:00
svg Add SkSVGCanvas 2015-02-06 12:51:10 -08:00
utils Sketch splitting SkPicture into an interface and SkBigPicture. 2015-05-19 11:11:26 -07:00
views CL to add setFullscreen and setVsync to SkWindow 2015-05-27 09:19:03 -07:00
xml C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} 2015-03-25 18:17:32 -07:00