Skia
2D Graphics Library
SkRuntimeEffect Class Reference

#include <SkRuntimeEffect.h>

Inheritance diagram for SkRuntimeEffect:

Classes

struct  Child
 
class  ChildPtr
 
class  Options
 
struct  Result
 
struct  TracedShader
 Creates a new Runtime Effect patterned after an already-existing one. More...
 
struct  Uniform
 

Public Types

enum class  ChildType { kShader , kColorFilter , kBlender }
 

Public Member Functions

sk_sp< SkShadermakeShader (sk_sp< const SkData > uniforms, sk_sp< SkShader > children[], size_t childCount, const SkMatrix *localMatrix=nullptr) const
 
sk_sp< SkShadermakeShader (sk_sp< const SkData > uniforms, SkSpan< const ChildPtr > children, const SkMatrix *localMatrix=nullptr) const
 
sk_sp< SkColorFiltermakeColorFilter (sk_sp< const SkData > uniforms) const
 
sk_sp< SkColorFiltermakeColorFilter (sk_sp< const SkData > uniforms, sk_sp< SkColorFilter > children[], size_t childCount) const
 
sk_sp< SkColorFiltermakeColorFilter (sk_sp< const SkData > uniforms, SkSpan< const ChildPtr > children) const
 
sk_sp< SkBlendermakeBlender (sk_sp< const SkData > uniforms, SkSpan< const ChildPtr > children={}) const
 
const std::string & source () const
 
size_t uniformSize () const
 
SkSpan< const Uniformuniforms () const
 
SkSpan< const Childchildren () const
 
const UniformfindUniform (std::string_view name) const
 
const ChildfindChild (std::string_view name) const
 
bool allowShader () const
 
bool allowColorFilter () const
 
bool allowBlender () const
 
 ~SkRuntimeEffect () override
 
bool unique () const
 May return true if the caller is the only owner. More...
 
void ref () const
 Increment the reference count. More...
 
void unref () const
 Decrement the reference count. More...
 

Static Public Member Functions

static Result MakeForColorFilter (SkString sksl, const Options &)
 
static Result MakeForColorFilter (SkString sksl)
 
static Result MakeForShader (SkString sksl, const Options &)
 
static Result MakeForShader (SkString sksl)
 
static Result MakeForBlender (SkString sksl, const Options &)
 
static Result MakeForBlender (SkString sksl)
 
static TracedShader MakeTraced (sk_sp< SkShader > shader, const SkIPoint &traceCoord)
 
static void RegisterFlattenables ()
 

Friends

class SkRuntimeShader
 
class SkRuntimeBlender
 
class SkRuntimeColorFilter
 
class SkRuntimeEffectPriv
 

Member Enumeration Documentation

◆ ChildType

Enumerator
kShader 
kColorFilter 
kBlender 

Constructor & Destructor Documentation

◆ ~SkRuntimeEffect()

SkRuntimeEffect::~SkRuntimeEffect ( )
override

Member Function Documentation

◆ allowBlender()

bool SkRuntimeEffect::allowBlender ( ) const
inline

◆ allowColorFilter()

bool SkRuntimeEffect::allowColorFilter ( ) const
inline

◆ allowShader()

bool SkRuntimeEffect::allowShader ( ) const
inline

◆ children()

SkSpan<const Child> SkRuntimeEffect::children ( ) const
inline

◆ findChild()

const Child* SkRuntimeEffect::findChild ( std::string_view  name) const

◆ findUniform()

const Uniform* SkRuntimeEffect::findUniform ( std::string_view  name) const

◆ makeBlender()

sk_sp<SkBlender> SkRuntimeEffect::makeBlender ( sk_sp< const SkData uniforms,
SkSpan< const ChildPtr children = {} 
) const

◆ makeColorFilter() [1/3]

sk_sp<SkColorFilter> SkRuntimeEffect::makeColorFilter ( sk_sp< const SkData uniforms) const

◆ makeColorFilter() [2/3]

sk_sp<SkColorFilter> SkRuntimeEffect::makeColorFilter ( sk_sp< const SkData uniforms,
sk_sp< SkColorFilter children[],
size_t  childCount 
) const

◆ makeColorFilter() [3/3]

sk_sp<SkColorFilter> SkRuntimeEffect::makeColorFilter ( sk_sp< const SkData uniforms,
SkSpan< const ChildPtr children 
) const

◆ MakeForBlender() [1/2]

static Result SkRuntimeEffect::MakeForBlender ( SkString  sksl)
inlinestatic

◆ MakeForBlender() [2/2]

static Result SkRuntimeEffect::MakeForBlender ( SkString  sksl,
const Options  
)
static

◆ MakeForColorFilter() [1/2]

static Result SkRuntimeEffect::MakeForColorFilter ( SkString  sksl)
inlinestatic

◆ MakeForColorFilter() [2/2]

static Result SkRuntimeEffect::MakeForColorFilter ( SkString  sksl,
const Options  
)
static

◆ MakeForShader() [1/2]

static Result SkRuntimeEffect::MakeForShader ( SkString  sksl)
inlinestatic

◆ MakeForShader() [2/2]

static Result SkRuntimeEffect::MakeForShader ( SkString  sksl,
const Options  
)
static

◆ makeShader() [1/2]

sk_sp<SkShader> SkRuntimeEffect::makeShader ( sk_sp< const SkData uniforms,
sk_sp< SkShader children[],
size_t  childCount,
const SkMatrix localMatrix = nullptr 
) const

◆ makeShader() [2/2]

sk_sp<SkShader> SkRuntimeEffect::makeShader ( sk_sp< const SkData uniforms,
SkSpan< const ChildPtr children,
const SkMatrix localMatrix = nullptr 
) const

◆ MakeTraced()

static TracedShader SkRuntimeEffect::MakeTraced ( sk_sp< SkShader shader,
const SkIPoint &  traceCoord 
)
static

◆ ref()

void SkRefCntBase::ref ( ) const
inlineinherited

Increment the reference count.

Must be balanced by a call to unref().

◆ RegisterFlattenables()

static void SkRuntimeEffect::RegisterFlattenables ( )
static

◆ source()

const std::string& SkRuntimeEffect::source ( ) const

◆ uniforms()

SkSpan<const Uniform> SkRuntimeEffect::uniforms ( ) const
inline

◆ uniformSize()

size_t SkRuntimeEffect::uniformSize ( ) const

◆ unique()

bool SkRefCntBase::unique ( ) const
inlineinherited

May return true if the caller is the only owner.

Ensures that all previous owner's actions are complete.

◆ unref()

void SkRefCntBase::unref ( ) const
inlineinherited

Decrement the reference count.

If the reference count is 1 before the decrement, then delete the object. Note that if this is the case, then the object needs to have been allocated via new, and not on the stack.

Friends And Related Function Documentation

◆ SkRuntimeBlender

friend class SkRuntimeBlender
friend

◆ SkRuntimeColorFilter

friend class SkRuntimeColorFilter
friend

◆ SkRuntimeEffectPriv

friend class SkRuntimeEffectPriv
friend

◆ SkRuntimeShader

friend class SkRuntimeShader
friend

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