Go to file
cdalton 9a70920db2 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:

Review URL: https://codereview.chromium.org/1124373002
2015-05-22 11:36:57 -07:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Move font loading in gm tests and benches out of constructors 2015-05-21 06:15:28 -07:00
bin Make the c and ac scripts work with sh and without bin in PATH 2015-05-15 05:35:50 -07:00
debugger Get debugger compiling again 2015-05-04 10:42:05 -07:00
dm implement --quiet for DM 2015-05-19 14:13:31 -07:00
example C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} 2015-03-25 18:17:32 -07:00
experimental Revert of Revert of stop calling SkScalarDiv (patchset #1 id:1 of https://codereview.chromium.org/1138263002/) 2015-05-12 10:37:34 -07:00
forth Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
gm Implement Porter Duff XP with a blend table 2015-05-22 11:36:57 -07:00
gyp Implement Porter Duff XP with a blend table 2015-05-22 11:36:57 -07:00
include Implement Porter Duff XP with a blend table 2015-05-22 11:36:57 -07:00
platform_tools BUG=skia: 2015-05-22 10:55:33 -07:00
resources Font variations. 2015-05-20 09:21:04 -07:00
samplecode remove SK_LEGACY_STROKE_CURVES 2015-05-22 06:26:52 -07:00
site Add more detail on how DM checksums are done. 2015-05-22 10:42:13 -07:00
src Implement Porter Duff XP with a blend table 2015-05-22 11:36:57 -07:00
tests Implement Porter Duff XP with a blend table 2015-05-22 11:36:57 -07:00
third_party Enable both static and dynamically linked libpng 2015-04-03 12:35:27 -07:00
tools Temporarily disable nanobench to see what else is in the way of the bots going green. 2015-05-21 13:59:36 -07:00
.gitignore git: add skps to .gitignore 2015-02-13 18:57:33 -08:00
AUTHORS Return cropBitmap 2015-04-15 05:48:54 -07:00
codereview.settings Automatically add a docs preview link and NOTRY=true when there are only docs changes. 2015-02-26 10:16:13 -08:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS add new Skia team member to committers list 2015-02-03 11:10:57 -08:00
DEPS SkPDF: Add Sfntly to DEPS, gyp 2015-05-18 13:15:56 -07:00
Doxyfile Documentation: SkCanvas API 2015-05-19 10:21:29 -07:00
gyp_skia Support SKIA_OUT on Mac and ChromeOS 2015-05-04 08:04:28 -07:00
gyp_skia.py Roll gyp deps from 1765 to 1796. 2013-11-21 18:11:14 +00:00
HASHTAGS Fix cr SKPs naming 2015-03-31 08:03:02 -07:00
LICENSE Manually update copyright notices in files that defied the automated process 2011-07-28 14:24:55 +00:00
make.bat Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
make.py Run gyp on Win with --no-parallel -G config=$(BUILDTYPE), fix pylint 2015-03-03 13:15:38 -05:00
Makefile Run gyp with --no-parallel -G config=$(BUILDTYPE) 2015-03-03 06:05:56 -08:00
OWNERS add root files from chrome 2013-08-13 19:11:15 +00:00
PRESUBMIT.py Add presubmit to run {dm,nanobench}_flags.py test when changed. 2015-05-05 10:28:44 -07:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium add root files from chrome 2013-08-13 19:11:15 +00:00
skia.gyp Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
SKP_VERSION Update SKP version 2015-05-17 01:14:01 -07:00
whitespace.txt Whitespace change to trigger builds 2015-05-21 16:19:22 -04:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.