24 struct KnownSkSLProgramInterface {
25 bool useLastFragColor;
26 bool useRTFlipUniform;
27 bool outputSecondaryColor;
35 const std::string shaders[],
45 writer.writeUInt(shaderType);
47 writer.writeByteArray(shaders[
i].c_str(), shaders[
i].
size());
48 writer.writePad32(&interfaces[
std::min(
i, numInterfaces - 1)],
63 writer.writeByteArray(attr.c_str(), attr.size());
72 return writer.snapshotAsData();
83 std::string shaders[],
89 const char* shaderBuf =
static_cast<const char*
>(reader->
skipByteArray(&shaderLen));
91 shaders[
i].assign(shaderBuf, shaderLen);
95 if (
i < numInterfaces) {
96 reader->
readPad32(&interfaces[
i],
sizeof(interfaces[
i]));
114 const char* attrName =
static_cast<const char*
>(reader->
skipByteArray(&attrLen));
116 attr.assign(attrName, attrLen);
static const int kGrShaderTypeCount
static constexpr bool SkToBool(const T &x)
void writeInt(int32_t value) override
const void * data() const
const void * skipByteArray(size_t *size)
bool validate(bool isValid)
const void * skip(size_t size)
bool readPad32(void *buffer, size_t bytes)
void resize(size_t count)
static float min(float r, float g, float b)
sk_sp< SkData > PackCachedShaders(SkFourByteTag shaderType, const std::string shaders[], const SkSL::Program::Interface interfaces[], int numInterfaces, const ShaderMetadata *meta)
bool UnpackCachedShaders(SkReadBuffer *reader, std::string shaders[], SkSL::Program::Interface interfaces[], int numInterfaces, ShaderMetadata *meta)
SkFourByteTag GetType(SkReadBuffer *reader)
static constexpr int kCurrentVersion
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
static const int kInvalidTag
ProgramInterface Interface