Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
skgpu::graphite::PrecompileShader Class Reference

#include <Precompile.h>

Inheritance diagram for skgpu::graphite::PrecompileShader:
skgpu::graphite::PrecompileBase SkRefCnt SkRefCntBase skgpu::graphite::PrecompileBlendShader skgpu::graphite::PrecompileBlurShader skgpu::graphite::PrecompileCTMShader skgpu::graphite::PrecompileColorFilterShader skgpu::graphite::PrecompileColorShader skgpu::graphite::PrecompileCoordClampShader skgpu::graphite::PrecompileEmptyShader skgpu::graphite::PrecompileGradientShader skgpu::graphite::PrecompileImageShader skgpu::graphite::PrecompileLocalMatrixShader skgpu::graphite::PrecompilePerlinNoiseShader skgpu::graphite::PrecompileWorkingColorSpaceShader skgpu::graphite::PrecompileYUVImageShader

Public Member Functions

 PrecompileShader ()
 
virtual bool isConstant (int desiredCombination) const
 
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
 

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 125 of file Precompile.h.

Constructor & Destructor Documentation

◆ PrecompileShader()

skgpu::graphite::PrecompileShader::PrecompileShader ( )
inline

Member Function Documentation

◆ isConstant()

virtual bool skgpu::graphite::PrecompileShader::isConstant ( int  desiredCombination) const
inlinevirtual

◆ makeWithColorFilter()

sk_sp< PrecompileShader > skgpu::graphite::PrecompileShader::makeWithColorFilter ( sk_sp< PrecompileColorFilter cf)

Definition at line 36 of file Precompile.cpp.

36 {
37 if (!cf) {
38 return sk_ref_sp(this);
39 }
40
41 return PrecompileShaders::ColorFilter({ sk_ref_sp(this) }, { std::move(cf) });
42}
sk_sp< T > sk_ref_sp(T *obj)
Definition SkRefCnt.h:381
SK_API sk_sp< PrecompileShader > ColorFilter(SkSpan< const sk_sp< PrecompileShader > > shaders, SkSpan< const sk_sp< PrecompileColorFilter > > colorFilters)

◆ makeWithCTM()

sk_sp< PrecompileShader > skgpu::graphite::PrecompileShader::makeWithCTM ( )

Definition at line 52 of file Precompile.cpp.

52 {
53 return PrecompileShadersPriv::CTM({ sk_ref_sp(this) });
54}
sk_sp< PrecompileShader > CTM(SkSpan< const sk_sp< PrecompileShader > > wrapped)

◆ makeWithLocalMatrix()

sk_sp< PrecompileShader > skgpu::graphite::PrecompileShader::makeWithLocalMatrix ( )

Definition at line 26 of file Precompile.cpp.

26 {
27 if (this->priv().isALocalMatrixShader()) {
28 // SkShader::makeWithLocalMatrix collapses chains of localMatrix shaders so we need to
29 // follow suit here
30 return sk_ref_sp(this);
31 }
32
34}
virtual bool isALocalMatrixShader() const
Definition Precompile.h:86
SK_API sk_sp< PrecompileShader > LocalMatrix(SkSpan< const sk_sp< PrecompileShader > > wrapped)

◆ makeWithWorkingColorSpace()

sk_sp< PrecompileShader > skgpu::graphite::PrecompileShader::makeWithWorkingColorSpace ( sk_sp< SkColorSpace cs)

Definition at line 44 of file Precompile.cpp.

44 {
45 if (!cs) {
46 return sk_ref_sp(this);
47 }
48
49 return PrecompileShaders::WorkingColorSpace({ sk_ref_sp(this) }, { std::move(cs) });
50}
SK_API sk_sp< PrecompileShader > WorkingColorSpace(SkSpan< const sk_sp< PrecompileShader > > shaders, SkSpan< const sk_sp< SkColorSpace > > colorSpaces)

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