35#if defined(SK_BUILD_FOR_DEBUGGER)
48 : fEffect(
std::move(effect))
49 , fDebugTrace(
std::move(debugTrace))
50 , fUniformData(
std::move(uniforms))
51 , fChildren(children.
begin(), children.
end()) {}
57 : fEffect(
std::move(effect))
58 , fDebugTrace(
std::move(debugTrace))
59 , fUniformsCallback(
std::move(uniformsCallback))
60 , fChildren(children.
begin(), children.
end()) {}
64 auto debugTrace = sk_make_sp<SkSL::DebugTracePriv>();
65 debugTrace->setSource(effect->
source());
66 debugTrace->setTraceCoord(coord);
73 auto debugShader = sk_make_sp<SkRuntimeShader>(
86 std::optional<SkShaders::MatrixRec> newMRec = mRec.
apply(rec);
87 if (!newMRec.has_value()) {
92 this->uniformData(rec.
fDstCS),
93 fUniformData ==
nullptr,
97 bool success = program->appendStages(rec.
fPipeline, rec.
fAlloc, &callbacks, uniforms);
133 if (
flags & kHasLegacyLocalMatrix_Flag) {
155 SkDebugf(
"Serialized SkSL failed to compile. Replacing shader with child %d.\n",
162 SkDebugf(
"Serialized SkSL failed to compile. Ignoring/dropping SkSL shader.\n");
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
sk_sp< T > sk_ref_sp(T *obj)
sk_sp< SkRuntimeEffect > SkMakeCachedRuntimeEffect(SkRuntimeEffect::Result(*make)(SkString sksl, const SkRuntimeEffect::Options &), SkString sksl)
static sk_sp< SkSL::DebugTracePriv > make_debug_trace(SkRuntimeEffect *effect, const SkIPoint &coord)
constexpr bool kLenientSkSLDeserialization
SkRuntimeEffectPriv::UniformsCallback UniformsCallback
SkSpan(Container &&) -> SkSpan< std::remove_pointer_t< decltype(std::data(std::declval< Container >()))> >
static sk_sp< const SkCapabilities > RasterBackend()
static bool ReadChildEffects(SkReadBuffer &buffer, const SkRuntimeEffect *effect, skia_private::TArray< SkRuntimeEffect::ChildPtr > *children)
static SkSpan< const float > UniformsAsSpan(SkSpan< const SkRuntimeEffect::Uniform > uniforms, sk_sp< const SkData > originalData, bool alwaysCopyIntoAlloc, const SkColorSpace *destColorSpace, SkArenaAlloc *alloc)
static bool CanDraw(const SkCapabilities *, const SkSL::Program *)
static void WriteChildEffects(SkWriteBuffer &buffer, SkSpan< const SkRuntimeEffect::ChildPtr > children)
size_t uniformSize() const
sk_sp< SkShader > makeShader(sk_sp< const SkData > uniforms, sk_sp< SkShader > children[], size_t childCount, const SkMatrix *localMatrix=nullptr) const
SkSpan< const Uniform > uniforms() const
static Result MakeForShader(SkString sksl, const Options &)
const std::string & source() const
bool appendStages(const SkStageRec &rec, const SkShaders::MatrixRec &mRec) const override
SkRuntimeEffect::TracedShader makeTracedClone(const SkIPoint &coord)
SkSpan< const SkRuntimeEffect::ChildPtr > children() const
SkRuntimeShader(sk_sp< SkRuntimeEffect > effect, sk_sp< SkSL::DebugTracePriv > debugTrace, sk_sp< const SkData > uniforms, SkSpan< const SkRuntimeEffect::ChildPtr > children)
sk_sp< const SkData > uniformData(const SkColorSpace *dstCS) const
void flatten(SkWriteBuffer &buffer) const override
sk_sp< SkRuntimeEffect > effect() const
std::optional< MatrixRec > apply(const SkStageRec &rec, const SkMatrix &postInv={}) const
constexpr size_t size() const
T * init(Args &&... args)
const T * getMaybeNull() const
static const char * begin(const StringSlice &s)
FlutterSemanticsFlag flags
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
const myers::Point & get(const myers::Segment &)
SkRasterPipeline * fPipeline