19 if (bytesToCopy > 0) {
36 auto fuzzByteToASCII = [&](uint8_t c,
SkString* str) ->
bool {
38 if ((c >= 32 && c <= 127) || c ==
'\r' || c ==
'\n' || c ==
'\t') {
46 auto fuzzByteToSkSL = [&](uint8_t c,
SkString* str) ->
bool {
49 return fuzzByteToASCII(c, str);
55 if (!attributes.
empty()) {
56 str->append(attributes[c % attributes.
size()].name);
63 if (!varyings.
empty()) {
64 str->append(varyings[c % varyings.
size()].name);
73 static constexpr std::string_view kSkSLData[] = {
150 str->append(kSkSLData[c]);
157 while (!
data.empty()) {
158 uint8_t control = extract<uint8_t>(
data) % 4;
170 while (uint8_t c = extract<char>(
data)) {
171 if (!fuzzByteToASCII(c, &
a.name)) {
181 while (uint8_t c = extract<char>(
data)) {
182 if (!fuzzByteToASCII(c, &v.
name)) {
190 while (uint8_t c = extract<char>(
data)) {
191 if (!fuzzByteToSkSL(c, &vs)) {
199 while (uint8_t c = extract<char>(
data)) {
200 if (!fuzzByteToSkSL(c, &fs)) {
210 if (
result.error.isEmpty()) {
216#if defined(SK_BUILD_FOR_LIBFUZZER)
T extract(SkSpan< const uint8_t > &data)
void FuzzSkMeshSpecification(const uint8_t *fuzzData, size_t fuzzSize)
SkMeshSpecification::Attribute Attribute
SkMeshSpecification::Varying Varying
static constexpr size_t kMaxVaryings
static constexpr size_t kMaxAttributes
static constexpr size_t kMaxStride
static Result Make(SkSpan< const Attribute > attributes, size_t vertexStride, SkSpan< const Varying > varyings, const SkString &vs, const SkString &fs)
void append(const char text[])
const char * c_str() const
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
static float min(float r, float g, float b)
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
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
std::shared_ptr< const fml::Mapping > data