Go to file
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
animations
bench Revert "SkStream: remove some WStream functions from public api" 2018-09-06 12:22:41 +00:00
bin Add script to pull svgs to svgs/ and add to .gitignore 2018-08-31 20:02:24 +00:00
dm Revert "makeSurface defaults to raster" 2018-09-05 18:41:45 +00:00
docker Use a larger machine for our cloud build. 2018-07-31 20:40:33 +00:00
docs reland fix picture subclass destructor doc 2018-09-07 19:09:26 +00:00
example Compile with GCC 7.2.0. 2018-03-13 22:18:18 +00:00
experimental [PathKit] Move from experimental to modules 2018-08-31 14:18:16 +00:00
fuzz Rip out variable offsetting 2018-09-05 19:54:31 +00:00
gm Preseve tangents when converting cubics->quads in GrAAHairlinePathRenderer 2018-09-07 20:21:24 +00:00
gn Base Gradient FP Refactor 2018-09-11 14:52:55 +00:00
include Simplify plots to always be 512x512 and simplify GrDrawOpAtlasConfig 2018-09-10 21:57:16 +00:00
infra Update SKP version 2018-09-09 12:11:52 +00:00
modules [skottie] Add support for explicit image asset sizing 2018-09-10 15:44:42 +00:00
platform_tools [skottie] Plumb external SkFontMgr 2018-08-23 13:13:30 +00:00
resources Reland "Switch SkCodec to use skcms plus fixes"" 2018-08-27 16:16:14 +00:00
samplecode Revert "makeSurface defaults to raster" 2018-09-05 18:41:45 +00:00
site reland fix picture subclass destructor doc 2018-09-07 19:09:26 +00:00
src Base Gradient FP Refactor 2018-09-11 14:52:55 +00:00
tests Simplify plots to always be 512x512 and simplify GrDrawOpAtlasConfig 2018-09-10 21:57:16 +00:00
third_party Roll skia/third_party/skcms 54b6cee88c40..52df767ea52b (1 commits) 2018-09-07 15:47:36 +00:00
tools Simplify plots to always be 512x512 and simplify GrDrawOpAtlasConfig 2018-09-10 21:57:16 +00:00
.clang-format Update .clang-format to handle Objective-C files 2018-07-27 21:33:30 +00:00
.gitignore Add script to pull svgs to svgs/ and add to .gitignore 2018-08-31 20:02:24 +00:00
.gn
AUTHORS Fixed SkVertices crashing on Windows DLL builds 2018-04-22 14:42:01 +00:00
BUILD.gn [skottie] Enable skotte_tool on Mac builds 2018-09-02 16:54:52 +00:00
codereview.settings
CONTRIBUTING
CQ_COMMITTERS
DEPS Roll third_party/externals/swiftshader 6dafcf32ec41..17b75890e71a (12 commits) 2018-09-11 13:10:19 +00:00
Doxyfile
LICENSE
OWNERS add OWNERS file 2017-12-01 19:50:19 +00:00
PRESUBMIT.py Add new autoroll service accounts to AUTHORS check bypass 2018-09-07 18:49:23 +00:00
public.bzl Reland "remove legacy google3 flag" 2018-09-10 19:00:15 +00:00
README
README.chromium
whitespace.txt Whitespace change to trigger flutter roller 2018-06-22 01:18:46 +00:00

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

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