skia2/gyp
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
..
android_deps.gyp WIP: Added support for giflib, updated jpeg and png 2015-03-30 07:52:52 -07:00
android_framework_lib.gyp Make android framework depend on SkCodec. 2015-03-20 11:20:03 -07:00
android_output.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
android_system.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
angle.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
animator.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
apptype_console.gypi Remove all code related to NaCl 2015-04-02 12:16:36 -07:00
bench.gyp Experiment with find as a road to Gyp sanity. 2015-05-16 15:47:10 -07:00
bench.gypi Experiment with find as a road to Gyp sanity. 2015-05-16 15:47:10 -07:00
canvas_state_lib.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
codec.gyp SkJpegCodec 2015-04-15 07:32:20 -07:00
common_conditions.gypi Default iOS builds to our code signing identity. 2015-04-16 13:29:59 -07:00
common_variables.gypi Enable both static and dynamically linked libpng 2015-04-03 12:35:27 -07:00
common.gypi Remove all code related to NaCl 2015-04-02 12:16:36 -07:00
core.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
core.gypi SkPDF: with opaque draws, treat SRC mode as SRC_OVER 2015-05-27 08:53:36 -07:00
debugger.gyp Remove all code related to NaCl 2015-04-02 12:16:36 -07:00
dm.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
dm.gypi Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
effects.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
effects.gypi remove redundant/deprecated TwoPointRadial gradiet -- use TwoPointConical 2015-05-04 08:32:51 -07:00
etc1.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
everything.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
example.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
experimental.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
FileReaderApp.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
find.py Sort build files for consistent link order. 2015-05-20 09:26:47 -07:00
flags.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
freetype.gyp Font variations. 2015-05-20 09:21:04 -07:00
freetype.gypi Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
giflib.gyp Creating a new wrapper for gif decoder 2015-04-01 06:58:48 -07:00
gmslides.gypi Gyp: Sanity Part II (GM+Tests) 2015-05-17 06:47:49 -07:00
gpu.gyp Remove all code related to NaCl 2015-04-02 12:16:36 -07:00
gpu.gypi Implement Porter Duff XP with a blend table 2015-05-27 15:08:33 -07:00
gputest.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
icu.gyp SkPDF: Add Sfntly to DEPS, gyp 2015-05-18 13:15:56 -07:00
images.gyp Remove all code related to NaCl 2015-04-02 12:16:36 -07:00
iOSShell.gyp Experiment with find as a road to Gyp sanity. 2015-05-16 15:47:10 -07:00
jsoncpp.gyp Roll jsoncpp, drop dependency on Chromium overrides. 2014-08-19 07:21:00 -07:00
ktx.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
libjpeg.gyp Build Skia for a bare-bones embedded Linux system. 2014-02-24 20:22:34 +00:00
libpng.gyp Enable both static and dynamically linked libpng 2015-04-03 12:35:27 -07:00
libwebp.gyp Build in C++11 mode on Macs. 2015-02-03 13:24:36 -08:00
lua.gyp Build Skia for a bare-bones embedded Linux system. 2014-02-24 20:22:34 +00:00
most.gyp CL to add setFullscreen and setVsync to SkWindow 2015-05-27 09:19:03 -07:00
nanomsg.gyp Experiment with find as a road to Gyp sanity. 2015-05-16 15:47:10 -07:00
opts.gyp Revert of Allow NEON on iOS. (patchset #3 id:40001 of https://codereview.chromium.org/1091823002/) 2015-04-17 14:02:40 -07:00
opts.gypi Replace NEON assembly memset16 and memset32 with intrinsic versions. 2015-04-10 06:24:58 -07:00
pathops_skpclip.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
pathops_unittest.gyp cumulative pathops patch 2015-03-26 07:52:43 -07:00
pathops_unittest.gypi Now, path ops natively intersect conics, quads, and cubics in any combination. There are still a class of cubic tests that fail and a handful of undiagnosed failures from skps and fuzz tests, but things are much better overall. 2015-04-20 08:31:59 -07:00
pdf.gyp SkPDF: Add Sfntly to DEPS, gyp 2015-05-18 13:15:56 -07:00
pdf.gypi SkPDF: detect YUV-JPEG without relying on ImageGenerator 2015-05-07 11:46:59 -07:00
pdfviewer_lib.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
pdfviewer.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
ports.gyp Move resource fonts to common location. 2015-04-30 17:12:58 -04:00
SampleApp.gyp Revert of Revert of remove unused (by clients) SkPathUtils (patchset #1 id:1 of https://codereview.chromium.org/1060703003/) 2015-04-16 20:10:55 -07:00
sfnt.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
sfntly.gyp SkPDF: Add Sfntly to DEPS, gyp 2015-05-18 13:15:56 -07:00
SimpleCocoaApp.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
SimpleiOSApp.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
skflate.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
skia_for_android_framework_defines.gypi add assert that the lock-count on pixelref is balanced 2015-05-21 06:29:05 -07:00
skia_for_chromium_defines.gypi Remove SK_LEGACY_DRAWPICTURECALLBACK from skia_for_chromium_defines.gypi 2015-05-18 15:14:08 -04:00
skia_launcher.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
skia_lib.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
svg.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
tests.gypi Gyp: Sanity Part II (GM+Tests) 2015-05-17 06:47:49 -07:00
tools.gyp quickie tool to exercise chrome filter fuzz files 2015-05-12 08:36:48 -07:00
utils.gyp Remove all code related to NaCl 2015-04-02 12:16:36 -07:00
utils.gypi Sketch splitting SkPicture into an interface and SkBigPicture. 2015-05-19 11:11:26 -07:00
v8.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
views_animated.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
views.gyp Remove all code related to NaCl 2015-04-02 12:16:36 -07:00
visualbench.gyp CL to add setFullscreen and setVsync to SkWindow 2015-05-27 09:19:03 -07:00
xml.gyp Add copyright headers to remaining gyp files. 2015-03-25 10:22:41 -07:00
xps.gyp Remove sfnt dependency from xps gyp tartget. 2015-03-25 14:48:05 -07:00
zlib.gyp Revert of For consistency, use our homebrew zlib everywhere possible. (patchset #6 id:100001 of https://codereview.chromium.org/971673005/) 2015-03-07 07:47:51 -08:00