#include <SkRuntimeEffect.h>
Definition at line 59 of file SkRuntimeEffect.h.
◆ ChildType
Enumerator |
---|
kShader | |
kColorFilter | |
kBlender | |
Definition at line 111 of file SkRuntimeEffect.h.
111 {
114 kBlender,
115 };
◆ ~SkRuntimeEffect()
SkRuntimeEffect::~SkRuntimeEffect |
( |
| ) |
|
|
overridedefault |
◆ 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 |
Definition at line 254 of file SkRuntimeEffect.h.
254{
return SkSpan(fChildren); }
SkSpan(Container &&) -> SkSpan< std::remove_pointer_t< decltype(std::data(std::declval< Container >()))> >
◆ findChild()
Definition at line 791 of file SkRuntimeEffect.cpp.
791 {
792 auto iter = std::find_if(fChildren.begin(), fChildren.end(), [
name](
const Child& c) {
793 return c.name == name;
794 });
795 return iter == fChildren.end() ? nullptr : &(*iter);
796}
DEF_SWITCHES_START aot vmservice shared library name
◆ findUniform()
Definition at line 784 of file SkRuntimeEffect.cpp.
784 {
785 auto iter = std::find_if(fUniforms.begin(), fUniforms.end(), [
name](
const Uniform& u) {
786 return u.name == name;
787 });
788 return iter == fUniforms.end() ? nullptr : &(*iter);
789}
◆ makeBlender()
Definition at line 885 of file SkRuntimeEffect.cpp.
886 {
888 return nullptr;
889 }
891 return nullptr;
892 }
895 }
896 if (
uniforms->size() != this->uniformSize()) {
897 return nullptr;
898 }
900}
sk_sp< T > sk_ref_sp(T *obj)
static bool verify_child_effects(const std::vector< SkRuntimeEffect::Child > &reflected, SkSpan< const SkRuntimeEffect::ChildPtr > effectPtrs)
static sk_sp< SkData > MakeEmpty()
SkSpan< const Child > children() const
bool allowBlender() const
SkSpan< const Uniform > uniforms() const
◆ makeColorFilter() [1/3]
Definition at line 881 of file SkRuntimeEffect.cpp.
881 {
883}
sk_sp< SkColorFilter > makeColorFilter(sk_sp< const SkData > uniforms) const
◆ makeColorFilter() [2/3]
◆ makeColorFilter() [3/3]
Definition at line 864 of file SkRuntimeEffect.cpp.
865 {
867 return nullptr;
868 }
870 return nullptr;
871 }
874 }
875 if (
uniforms->size() != this->uniformSize()) {
876 return nullptr;
877 }
879}
bool allowColorFilter() const
◆ MakeForBlender() [1/2]
Definition at line 180 of file SkRuntimeEffect.h.
180 {
182 }
static Result MakeForBlender(SkString sksl, const Options &)
◆ MakeForBlender() [2/2]
◆ MakeForColorFilter() [1/2]
Definition at line 166 of file SkRuntimeEffect.h.
166 {
168 }
static Result MakeForColorFilter(SkString sksl, const Options &)
◆ MakeForColorFilter() [2/2]
◆ MakeForShader() [1/2]
Definition at line 173 of file SkRuntimeEffect.h.
173 {
175 }
static Result MakeForShader(SkString sksl, const Options &)
◆ MakeForShader() [2/2]
◆ makeShader() [1/2]
Definition at line 821 of file SkRuntimeEffect.cpp.
824 {
826 for (
size_t i = 0;
i < childCount; ++
i) {
828 }
830}
sk_sp< SkShader > makeShader(sk_sp< const SkData > uniforms, sk_sp< SkShader > children[], size_t childCount, const SkMatrix *localMatrix=nullptr) const
◆ makeShader() [2/2]
Definition at line 832 of file SkRuntimeEffect.cpp.
834 {
836 return nullptr;
837 }
839 return nullptr;
840 }
843 }
844 if (
uniforms->size() != this->uniformSize()) {
845 return nullptr;
846 }
847 return SkLocalMatrixShader::MakeWrapped<SkRuntimeShader>(localMatrix,
849 nullptr,
852}
◆ MakeTraced()
Definition at line 904 of file SkRuntimeEffect.cpp.
905 {
907 if (!effect) {
908 return TracedShader{nullptr, nullptr};
909 }
910
913}
SkShaderBase * as_SB(SkShader *shader)
SkRuntimeEffect::TracedShader makeTracedClone(const SkIPoint &coord)
virtual SkRuntimeEffect * asRuntimeEffect() const
◆ RegisterFlattenables()
void SkRuntimeEffect::RegisterFlattenables |
( |
| ) |
|
|
static |
Definition at line 953 of file SkRuntimeEffect.cpp.
953 {
957
958
960}
#define SK_REGISTER_FLATTENABLE(type)
static void Register(const char name[], Factory)
◆ source()
const std::string & SkRuntimeEffect::source |
( |
| ) |
const |
◆ uniforms()
◆ uniformSize()
size_t SkRuntimeEffect::uniformSize |
( |
| ) |
const |
Definition at line 779 of file SkRuntimeEffect.cpp.
779 {
780 return fUniforms.empty() ? 0
781 :
SkAlign4(fUniforms.back().offset + fUniforms.back().sizeInBytes());
782}
static constexpr T SkAlign4(T x)
◆ GrSkSLFP
◆ SkRuntimeBlender
◆ SkRuntimeColorFilter
◆ SkRuntimeEffectPriv
◆ SkRuntimeShader
The documentation for this class was generated from the following files: