Flutter Engine
The Flutter Engine
|
#include <PrecompileShader.h>
Public Member Functions | |
sk_sp< PrecompileShader > | makeWithLocalMatrix () |
sk_sp< PrecompileShader > | makeWithColorFilter (sk_sp< PrecompileColorFilter >) |
sk_sp< PrecompileShader > | makeWithWorkingColorSpace (sk_sp< SkColorSpace >) |
PrecompileShaderPriv | priv () |
const PrecompileShaderPriv | priv () const |
Public Member Functions inherited from skgpu::graphite::PrecompileBase | |
Type | type () const |
PrecompileBasePriv | priv () |
const PrecompileBasePriv | priv () const |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Protected Member Functions | |
PrecompileShader () | |
~PrecompileShader () override | |
virtual bool | isConstant (int) const |
virtual bool | isALocalMatrixShader () const |
Protected Member Functions inherited from skgpu::graphite::PrecompileBase | |
PrecompileBase (Type type) | |
virtual int | numIntrinsicCombinations () const |
virtual int | numChildCombinations () const |
int | numCombinations () const |
virtual void | addToKey (const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, int desiredCombination) const =0 |
Friends | |
class | PrecompileShaderPriv |
Additional Inherited Members | |
Public Types inherited from skgpu::graphite::PrecompileBase | |
enum class | Type { kBlender , kColorFilter , kImageFilter , kMaskFilter , kShader } |
Static Protected Member Functions inherited from skgpu::graphite::PrecompileBase | |
template<typename T > | |
static std::pair< sk_sp< T >, int > | SelectOption (SkSpan< const sk_sp< T > > options, int desiredOption) |
template<typename T > | |
static void | AddToKey (const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, SkSpan< const sk_sp< T > > options, int desiredOption) |
This class corresponds to the SkShader class in the main API.
Definition at line 26 of file PrecompileShader.h.
|
inlineprotected |
Definition at line 81 of file PrecompileShader.h.
|
overrideprotecteddefault |
|
inlineprotectedvirtual |
Definition at line 86 of file PrecompileShader.h.
|
inlineprotectedvirtual |
Reimplemented in skgpu::graphite::PrecompileLocalMatrixShader, and skgpu::graphite::PrecompileCTMShader.
Definition at line 84 of file PrecompileShader.h.
sk_sp< PrecompileShader > skgpu::graphite::PrecompileShader::makeWithColorFilter | ( | sk_sp< PrecompileColorFilter > | cf | ) |
This is the Precompile correlate to SkShader::makeWithColorFilter. The PrecompileShaders::ColorFilter factory can be used to generate a set of shaders that would've been generated via multiple makeWithColorFilter calls. That is, rather than performing: sk_sp<PrecompileShader> option1 = source->makeWithColorFilter(colorFilter1); sk_sp<PrecompileShader> option2 = source->makeWithColorFilter(colorFilter2); one could call: sk_sp<PrecompileShader> combinedOptions = ColorFilter({ source }, { colorFilter1, colorFilter2 }); With an alternative use case one could also use the ColorFilter factory thusly: sk_sp<PrecompileShader> combinedOptions = ColorFilter({ source1, source2 }, { colorFilter });
Definition at line 44 of file PrecompileShader.cpp.
sk_sp< PrecompileShader > skgpu::graphite::PrecompileShader::makeWithLocalMatrix | ( | ) |
This is the Precompile correlate to SkShader::makeWithLocalMatrix. The actual matrix involved is abstracted away since it doesn't impact the generated shader. The PrecompileShaders::LocalMatrix factory can be used to generate a set of shaders that would've been generated via multiple makeWithLocalMatrix calls. That is, rather than performing: sk_sp<PrecompileShader> option1 = source1->makeWithLocalMatrix(); sk_sp<PrecompileShader> option2 = source2->makeWithLocalMatrix(); one could call: sk_sp<PrecompileShader> combinedOptions = LocalMatrix({ source1, source2 });
Definition at line 34 of file PrecompileShader.cpp.
sk_sp< PrecompileShader > skgpu::graphite::PrecompileShader::makeWithWorkingColorSpace | ( | sk_sp< SkColorSpace > | cs | ) |
This is the Precompile correlate to SkShader::makeWithWorkingColorSpace. The PrecompileShaders::WorkingColorSpace factory can be used to generate a set of shaders that would've been generated via multiple makeWithWorkingColorSpace calls. That is, rather than performing: sk_sp<PrecompileShader> option1 = source->makeWithWorkingColorSpace(colorSpace1); sk_sp<PrecompileShader> option2 = source->makeWithWorkingColorSpace(colorSpace2); one could call: sk_sp<PrecompileShader> combinedOptions = WorkingColorSpace({ source }, { colorSpace1, colorSpace2 }); With an alternative use case one could also use the WorkingColorSpace factory thusly: sk_sp<PrecompileShader> combinedOptions = WorkingColorSpace({ source1, source2 }, { colorSpace });
Definition at line 52 of file PrecompileShader.cpp.
|
inline |
Definition at line 55 of file PrecompileShaderPriv.h.
|
inline |
Definition at line 58 of file PrecompileShaderPriv.h.
|
friend |
Definition at line 79 of file PrecompileShader.h.