skia2/gn
Michael Ludwig 10f7a1e075 Base Gradient FP Refactor
--

Redefines how gradients will be written in the GPU back-end:

They are split into three fragment processor components: master, layout, and colorizer.
The layout FP is responsible for converting the fragment position into an interpolant value, t.
Each high-level gradient--such as linear, radial, etc.--are implemented solely in a layout FP.
The colorizer FP is responsible for converting t into a color.
The master FP invokes the layout, clamps t into the proper domain, and then invokes the colorizer.
GrGradientShader provides factory functions to create FP graphs from SkGradientShader instances.
This pattern is documented in gpu/gradients/README.md.

Goals for current CL
====================

Outline the FP components by providing .fp implementations for the simplest gradients.
Defines a two-color single interval colorizer and a linear gradient layout, and the master effect.
A MakeLinear() factory function is provided that can convert SkGradientShaders that fit these constraints.
SkLinearGradient first attempts to use the new system, falling back to the original GrGradientEffect.

Future CLs
==========

To keep the CL reviews manageable, additional dependent CLs will be added that gradually replace past functionality.
A CL for each layout will be defined.
CLs for the different analytic colorizer cases and the textured gradient case will be defined.
Once the new system supports all current layouts and colorizer capabilities, all old GPU gradient code will be removed.
After this clean-up, analytic colorization can hopefully be expanded to reduce the usage of textured gradients.

Bug: skia:
Change-Id: Iafe7b8b4071491a71c473babcd7bedda659150c1
Reviewed-on: https://skia-review.googlesource.com/148120
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-09-11 14:52:55 +00:00
..
toolchain link with --start-group/--end-group 2018-08-07 16:18:01 +00:00
__init__.py Make gn directory importable in python 2017-03-20 17:40:30 +00:00
ar.py GN: quiet alink spam on Mac 2016-11-07 14:19:32 +00:00
bench.gni ccpr: Rename GrCCPathParser to GrCCFiller 2018-08-20 20:25:24 +00:00
BUILD.gn drop warnings and -Werror from is_official_builds 2018-09-04 15:46:42 +00:00
BUILDCONFIG.gn drop warnings and -Werror from is_official_builds 2018-09-04 15:46:42 +00:00
call.py Add gn plumbing for mdbviz tool 2017-09-05 13:57:44 +00:00
checkdir.py Bundle resources and skps directories into iOS app. 2017-11-29 17:06:25 +00:00
codesign_ios.py Allow different identities for iOS code signing 2017-12-07 20:42:00 +00:00
compile_processors.py switched to infra version of clang-format for skslc 2017-07-27 20:28:50 +00:00
core.gni Remove SkImageCacherator entirely 2018-09-11 14:24:32 +00:00
cp.py GN: get Angle compiling on Windows. 2016-10-17 16:16:16 +00:00
create_sksl_enums.py Create sksl_enums.inc with UNIX line endings (even on Windows) 2018-02-09 15:13:11 +00:00
effects_imagefilters.gni move blurimagefilter.cpp back into effects 2018-06-26 15:01:52 +00:00
effects.gni add new patheffects 2018-07-18 18:56:07 +00:00
find_headers.py Add 'public' headers support to find_headers.py 2018-05-30 18:00:09 +00:00
find_ios_sysroot.py Add iOS simulator support in GN. 2017-03-13 17:21:43 +00:00
flutter_defines.gni Revert "Revert "add flag to soften the blow of removing a legacy api for flutter"" 2018-09-07 20:58:54 +00:00
gen_plist_ios.py Add create_bundle support for GN 2017-11-28 15:29:07 +00:00
gm.gni Preseve tangents when converting cubics->quads in GrAAHairlinePathRenderer 2018-09-07 20:21:24 +00:00
gn_meta_sln.py Decorate project names with their relative path in the meta SLN 2018-06-01 19:22:08 +00:00
gn_to_bp_utils.py Disable module deps in Android Framework builds 2018-06-11 15:00:31 +00:00
gn_to_bp.py add src/opts headers to .gni files 2018-09-05 20:31:09 +00:00
gn_to_cmake.py Improve CMakeLists.txt auto regeneration. 2018-06-26 20:33:29 +00:00
gpu.gni Base Gradient FP Refactor 2018-09-11 14:52:55 +00:00
highest_version_dir.py Filter Windows SDK and Compiler directories 2017-12-11 20:26:08 +00:00
is_clang.py GN: match shell behavior for cc and cxx in is_clang.py 2016-09-27 09:29:24 -07:00
opts.gni add src/opts headers to .gni files 2018-09-05 20:31:09 +00:00
pdf.gni SkPDF/Clusterator: expose to the light of a unit test 2018-03-29 20:32:15 +00:00
push_to_android.py skia_android_serial = "auto" 2017-01-12 16:30:17 +00:00
run_sksllex.py Re-land "converted OverdrawColorFilter to SkSL" 2017-10-26 14:58:27 +00:00
samples.gni add circles to stroked cubics with cusps 2018-08-31 19:55:44 +00:00
shared_sources.gni move imagefilters into separate dir and flag for build.gn 2018-06-19 20:16:38 +00:00
sksl.gni Base Gradient FP Refactor 2018-09-11 14:52:55 +00:00
tests.gni Reland "Switch SkCodec to use skcms plus fixes"" 2018-08-27 16:16:14 +00:00
utils.gni textonpath util 2018-08-27 18:01:21 +00:00
xps.gni SkXPS: new document API. 2017-02-06 19:00:28 +00:00