8#ifndef SkRuntimeEffectPriv_DEFINED
9#define SkRuntimeEffectPriv_DEFINED
66 const SkMatrix* localMatrix =
nullptr);
83 return effect.fStableKey;
87 return *effect.fBaseProgram;
97 options->allowPrivateAccess =
true;
101 options->fStableKey = stableKey;
124 bool alwaysCopyIntoAlloc,
138 return effect->usesColorTransform();
171 SkDEBUGFAILF(
"Found SkSL snippet that can be minified: \n %s\n", sksl);
179 return result.effect.release();
191 : fStage{
s.fPipeline,
199 , fSampleUsages(u) {}
#define SK_ABORT(message,...)
#define SkDEBUGFAILF(fmt,...)
SkRuntimeEffect * SkMakeRuntimeEffect(SkRuntimeEffect::Result(*make)(SkString, const SkRuntimeEffect::Options &), const char *sksl, SkRuntimeEffect::Options options=SkRuntimeEffect::Options{})
sk_sp< SkRuntimeEffect > SkMakeCachedRuntimeEffect(SkRuntimeEffect::Result(*make)(SkString sksl, const SkRuntimeEffect::Options &), SkString sksl)
static bool SkStrContains(const char string[], const char substring[])
void toLinearSrgb(const void *color) override
bool appendColorFilter(int index) override
bool appendBlender(int index) override
void fromLinearSrgb(const void *color) override
RuntimeEffectRPCallbacks(const SkStageRec &s, const SkShaders::MatrixRec &m, SkSpan< const SkRuntimeEffect::ChildPtr > c, SkSpan< const SkSL::SampleUsage > u)
bool appendShader(int index) override
static bool ReadChildEffects(SkReadBuffer &buffer, const SkRuntimeEffect *effect, skia_private::TArray< SkRuntimeEffect::ChildPtr > *children)
static sk_sp< SkShader > MakeDeferredShader(const SkRuntimeEffect *effect, UniformsCallback uniformsCallback, SkSpan< const SkRuntimeEffect::ChildPtr > children, const SkMatrix *localMatrix=nullptr)
static const char * ChildTypeToStr(SkRuntimeEffect::ChildType type)
static uint32_t StableKey(const SkRuntimeEffect &effect)
std::function< sk_sp< const SkData >(const UniformsCallbackContext &)> UniformsCallback
static SkSpan< const float > UniformsAsSpan(SkSpan< const SkRuntimeEffect::Uniform > uniforms, sk_sp< const SkData > originalData, bool alwaysCopyIntoAlloc, const SkColorSpace *destColorSpace, SkArenaAlloc *alloc)
static uint32_t Hash(const SkRuntimeEffect &effect)
static void AllowPrivateAccess(SkRuntimeEffect::Options *options)
static SkRuntimeEffect::Uniform VarAsUniform(const SkSL::Variable &, const SkSL::Context &, size_t *offset)
static sk_sp< const SkData > TransformUniforms(SkSpan< const SkRuntimeEffect::Uniform > uniforms, sk_sp< const SkData > originalData, const SkColorSpaceXformSteps &)
static bool SupportsConstantOutputForConstantInput(const SkRuntimeEffect *effect)
static void SetStableKey(SkRuntimeEffect::Options *options, uint32_t stableKey)
static const SkSL::Program & Program(const SkRuntimeEffect &effect)
static bool CanDraw(const SkCapabilities *, const SkSL::Program *)
static void WriteChildEffects(SkWriteBuffer &buffer, SkSpan< const SkRuntimeEffect::ChildPtr > children)
static bool UsesColorTransform(const SkRuntimeEffect *effect)
static SkRuntimeEffect::Child VarAsChild(const SkSL::Variable &var, int index)
static SkRuntimeEffect::Options ES3Options()
SkSpan< const Child > children() const
bool allowColorFilter() const
constexpr SkColor4f kTransparent
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
static void make(SkBitmap *bitmap, SkColorType colorType, SkAlphaType alphaType, sk_sp< SkColorSpace > colorSpace)
const SkColorSpace * fDstColorSpace