Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
skgpu::graphite::PrecompileColorShader Class Reference
Inheritance diagram for skgpu::graphite::PrecompileColorShader:
skgpu::graphite::PrecompileShader skgpu::graphite::PrecompileBase SkRefCnt SkRefCntBase

Public Member Functions

 PrecompileColorShader ()
 
bool isConstant (int desiredCombination) const override
 
- Public Member Functions inherited from skgpu::graphite::PrecompileShader
 PrecompileShader ()
 
sk_sp< PrecompileShadermakeWithLocalMatrix ()
 
sk_sp< PrecompileShadermakeWithColorFilter (sk_sp< PrecompileColorFilter >)
 
sk_sp< PrecompileShadermakeWithWorkingColorSpace (sk_sp< SkColorSpace >)
 
sk_sp< PrecompileShadermakeWithCTM ()
 
- Public Member Functions inherited from skgpu::graphite::PrecompileBase
 PrecompileBase (Type type)
 
Type type () const
 
virtual int numIntrinsicCombinations () const
 
virtual int numChildCombinations () const
 
int numCombinations () 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
 

Private Member Functions

void addToKey (const KeyContext &keyContext, PaintParamsKeyBuilder *builder, PipelineDataGatherer *gatherer, int desiredCombination) const override
 

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 >, intSelectOption (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)
 

Detailed Description

Definition at line 149 of file FactoryFunctions.cpp.

Constructor & Destructor Documentation

◆ PrecompileColorShader()

skgpu::graphite::PrecompileColorShader::PrecompileColorShader ( )
inline

Definition at line 151 of file FactoryFunctions.cpp.

151{}

Member Function Documentation

◆ addToKey()

void skgpu::graphite::PrecompileColorShader::addToKey ( const KeyContext keyContext,
PaintParamsKeyBuilder builder,
PipelineDataGatherer gatherer,
int  desiredCombination 
) const
inlineoverrideprivatevirtual

Implements skgpu::graphite::PrecompileBase.

Definition at line 159 of file FactoryFunctions.cpp.

162 {
163
164 SkASSERT(desiredCombination == 0); // The color shader only ever has one combination
165
166 // The white PMColor is just a placeholder for the actual paint params color
167 SolidColorShaderBlock::AddBlock(keyContext, builder, gatherer, SK_PMColor4fWHITE);
168 }
#define SkASSERT(cond)
Definition SkAssert.h:116
constexpr SkPMColor4f SK_PMColor4fWHITE
static void AddBlock(const KeyContext &, PaintParamsKeyBuilder *, PipelineDataGatherer *, const SkPMColor4f &)

◆ isConstant()

bool skgpu::graphite::PrecompileColorShader::isConstant ( int  desiredCombination) const
inlineoverridevirtual

Reimplemented from skgpu::graphite::PrecompileShader.

Definition at line 153 of file FactoryFunctions.cpp.

153 {
154 SkASSERT(desiredCombination == 0); // The color shader only ever has one combination
155 return true;
156 }

The documentation for this class was generated from the following file: