Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
skgpu::graphite::PrecompileCTMShader Class Referencefinal
Inheritance diagram for skgpu::graphite::PrecompileCTMShader:
skgpu::graphite::PrecompileShader skgpu::graphite::PrecompileBase SkRefCnt SkRefCntBase

Public Member Functions

 PrecompileCTMShader (SkSpan< const sk_sp< PrecompileShader > > wrapped)
 
bool isConstant (int desiredCombination) const override
 
- Public Member Functions inherited from skgpu::graphite::PrecompileShader
sk_sp< PrecompileShadermakeWithLocalMatrix ()
 
sk_sp< PrecompileShadermakeWithColorFilter (sk_sp< PrecompileColorFilter >)
 
sk_sp< PrecompileShadermakeWithWorkingColorSpace (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
 

Additional Inherited Members

- Public Types inherited from skgpu::graphite::PrecompileBase
enum class  Type {
  kBlender , kColorFilter , kImageFilter , kMaskFilter ,
  kShader
}
 
- Protected Member Functions inherited from skgpu::graphite::PrecompileShader
 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
 
- 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 787 of file PrecompileShader.cpp.

Constructor & Destructor Documentation

◆ PrecompileCTMShader()

skgpu::graphite::PrecompileCTMShader::PrecompileCTMShader ( SkSpan< const sk_sp< PrecompileShader > >  wrapped)
inline

Definition at line 789 of file PrecompileShader.cpp.

790 : fWrapped(wrapped.begin(), wrapped.end()) {
791 fNumWrappedCombos = 0;
792 for (const auto& s : fWrapped) {
793 fNumWrappedCombos += s->priv().numCombinations();
794 }
795 }
static sk_sp< GrTextureProxy > wrapped(skiatest::Reporter *reporter, GrRecordingContext *rContext, GrProxyProvider *proxyProvider, SkBackingFit fit)
struct MyStruct s

Member Function Documentation

◆ isConstant()

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

Reimplemented from skgpu::graphite::PrecompileShader.

Definition at line 797 of file PrecompileShader.cpp.

797 {
798 SkASSERT(desiredCombination < fNumWrappedCombos);
799
800 std::pair<sk_sp<PrecompileShader>, int> wrapped =
801 PrecompileBase::SelectOption(SkSpan(fWrapped), desiredCombination);
802 if (wrapped.first) {
803 return wrapped.first->priv().isConstant(wrapped.second);
804 }
805
806 return false;
807 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
SkSpan(Container &&) -> SkSpan< std::remove_pointer_t< decltype(std::data(std::declval< Container >()))> >
GrSurfaceProxyPriv priv()
static std::pair< sk_sp< T >, int > SelectOption(SkSpan< const sk_sp< T > > options, int desiredOption)

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