10f7a1e075
-- 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>
54 lines
2.0 KiB
Plaintext
54 lines
2.0 KiB
Plaintext
# Copyright 2016 Google Inc.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
# Things are easiest for everyone if these source paths are absolute.
|
|
_src = get_path_info("../src", "abspath")
|
|
|
|
skia_sksl_sources = [
|
|
"$_src/sksl/SkSLCFGGenerator.cpp",
|
|
"$_src/sksl/SkSLCompiler.cpp",
|
|
"$_src/sksl/SkSLCPPCodeGenerator.cpp",
|
|
"$_src/sksl/SkSLCPPUniformCTypes.cpp",
|
|
"$_src/sksl/SkSLGLSLCodeGenerator.cpp",
|
|
"$_src/sksl/SkSLHCodeGenerator.cpp",
|
|
"$_src/sksl/SkSLInterpreter.cpp",
|
|
"$_src/sksl/SkSLIRGenerator.cpp",
|
|
"$_src/sksl/SkSLJIT.cpp",
|
|
"$_src/sksl/SkSLLexer.cpp",
|
|
"$_src/sksl/SkSLMetalCodeGenerator.cpp",
|
|
"$_src/sksl/SkSLParser.cpp",
|
|
"$_src/sksl/SkSLPipelineStageCodeGenerator.cpp",
|
|
"$_src/sksl/SkSLSPIRVCodeGenerator.cpp",
|
|
"$_src/sksl/SkSLString.cpp",
|
|
"$_src/sksl/SkSLUtil.cpp",
|
|
"$_src/sksl/ir/SkSLSymbolTable.cpp",
|
|
"$_src/sksl/ir/SkSLSetting.cpp",
|
|
"$_src/sksl/ir/SkSLType.cpp",
|
|
"$_src/sksl/ir/SkSLVariableReference.cpp",
|
|
]
|
|
|
|
skia_gpu_processor_sources = [
|
|
"$_src/gpu/effects/GrAARectEffect.fp",
|
|
"$_src/gpu/effects/GrAlphaThresholdFragmentProcessor.fp",
|
|
"$_src/gpu/effects/GrBlurredEdgeFragmentProcessor.fp",
|
|
"$_src/gpu/effects/GrCircleBlurFragmentProcessor.fp",
|
|
"$_src/gpu/effects/GrCircleEffect.fp",
|
|
"$_src/gpu/effects/GrConfigConversionEffect.fp",
|
|
"$_src/gpu/effects/GrConstColorProcessor.fp",
|
|
"$_src/gpu/effects/GrEllipseEffect.fp",
|
|
"$_src/gpu/effects/GrLumaColorFilterEffect.fp",
|
|
"$_src/gpu/effects/GrMagnifierEffect.fp",
|
|
"$_src/gpu/effects/GrPremulInputFragmentProcessor.fp",
|
|
"$_src/gpu/effects/GrRectBlurEffect.fp",
|
|
"$_src/gpu/effects/GrRRectBlurEffect.fp",
|
|
"$_src/gpu/effects/GrSimpleTextureEffect.fp",
|
|
"$_src/gpu/effects/GrUnpremulInputFragmentProcessor.fp",
|
|
"$_src/gpu/effects/GrYUVtoRGBEffect.fp",
|
|
"$_src/gpu/gradients/GrSingleIntervalGradientColorizer.fp",
|
|
"$_src/gpu/gradients/GrLinearGradientLayout.fp",
|
|
"$_src/gpu/gradients/GrClampedGradientEffect.fp",
|
|
"$_src/gpu/gradients/GrTiledGradientEffect.fp",
|
|
]
|