Lines Matching refs:bytes

33 static DEFINE_string2(bytes, b, "", "A path to a file or a directory. If a file, the "
79 static void fuzz_api(sk_sp<SkData> bytes, SkString name);
144 sk_sp<SkData> bytes(SkData::MakeFromFileName(path.c_str())); in fuzz_file() local
145 if (!bytes) { in fuzz_file()
161 fuzz_android_codec(bytes); in fuzz_file()
165 fuzz_animated_img(bytes); in fuzz_file()
169 fuzz_api(bytes, name); in fuzz_file()
173 fuzz_color_deserialize(bytes); in fuzz_file()
177 fuzz_filter_fuzz(bytes); in fuzz_file()
181 fuzz_image_decode(bytes); in fuzz_file()
185 fuzz_image_decode_incremental(bytes); in fuzz_file()
189 uint8_t option = calculate_option(bytes.get()); in fuzz_file()
190 fuzz_img(bytes, option, 0); in fuzz_file()
194 uint8_t option = calculate_option(bytes.get()); in fuzz_file()
195 fuzz_img(bytes, 0, option); in fuzz_file()
199 fuzz_json(bytes); in fuzz_file()
203 fuzz_path_deserialize(bytes); in fuzz_file()
207 fuzz_region_deserialize(bytes); in fuzz_file()
211 fuzz_region_set_path(bytes); in fuzz_file()
219 fuzz_skdescriptor_deserialize(bytes); in fuzz_file()
224 fuzz_skottie_json(bytes); in fuzz_file()
229 fuzz_skp(bytes); in fuzz_file()
233 fuzz_skruntimeeffect(bytes); in fuzz_file()
237 fuzz_sksl2glsl(bytes); in fuzz_file()
241 fuzz_sksl2metal(bytes); in fuzz_file()
245 fuzz_sksl2spirv(bytes); in fuzz_file()
249 fuzz_sksl2pipeline(bytes); in fuzz_file()
253 fuzz_svg_dom(bytes); in fuzz_file()
257 fuzz_textblob_deserialize(bytes); in fuzz_file()
342 void FuzzJSON(sk_sp<SkData> bytes);
344 static void fuzz_json(sk_sp<SkData> bytes){ in fuzz_json() argument
345 FuzzJSON(bytes); in fuzz_json()
350 void FuzzSkottieJSON(sk_sp<SkData> bytes);
352 static void fuzz_skottie_json(sk_sp<SkData> bytes){ in fuzz_skottie_json() argument
353 FuzzSkottieJSON(bytes); in fuzz_skottie_json()
358 void FuzzSVG(sk_sp<SkData> bytes);
359 static void fuzz_svg_dom(sk_sp<SkData> bytes){ in fuzz_svg_dom() argument
360 FuzzSVG(bytes); in fuzz_svg_dom()
369 static uint8_t calculate_option(SkData* bytes) { in calculate_option() argument
371 const uint8_t* data = bytes->bytes(); in calculate_option()
372 for (size_t i = 0; i < 1024 && i < bytes->size(); i++) { in calculate_option()
385 static void fuzz_api(sk_sp<SkData> bytes, SkString name) { in fuzz_api() argument
389 Fuzz fuzz(std::move(bytes)); in fuzz_api()
406 bool FuzzAnimatedImage(sk_sp<SkData> bytes);
408 static void fuzz_animated_img(sk_sp<SkData> bytes) { in fuzz_animated_img() argument
409 if (FuzzAnimatedImage(bytes)) { in fuzz_animated_img()
416 bool FuzzImageDecode(sk_sp<SkData> bytes);
418 static void fuzz_image_decode(sk_sp<SkData> bytes) { in fuzz_image_decode() argument
419 if (FuzzImageDecode(bytes)) { in fuzz_image_decode()
426 bool FuzzIncrementalImageDecode(sk_sp<SkData> bytes);
428 static void fuzz_image_decode_incremental(sk_sp<SkData> bytes) { in fuzz_image_decode_incremental() argument
429 if (FuzzIncrementalImageDecode(bytes)) { in fuzz_image_decode_incremental()
436 bool FuzzAndroidCodec(sk_sp<SkData> bytes, uint8_t sampleSize);
438 static void fuzz_android_codec(sk_sp<SkData> bytes) { in fuzz_android_codec() argument
439 Fuzz fuzz(bytes); in fuzz_android_codec()
442 bytes = SkData::MakeSubset(bytes.get(), 1, bytes->size() - 1); in fuzz_android_codec()
443 if (FuzzAndroidCodec(bytes, sampleSize)) { in fuzz_android_codec()
453 static void fuzz_img(sk_sp<SkData> bytes, uint8_t scale, uint8_t mode) { in fuzz_img() argument
465 std::unique_ptr<SkCodec> codec(SkCodec::MakeFromData(bytes)); in fuzz_img()
698 void FuzzSKP(sk_sp<SkData> bytes);
699 static void fuzz_skp(sk_sp<SkData> bytes) { in fuzz_skp() argument
700 FuzzSKP(bytes); in fuzz_skp()
704 static void fuzz_color_deserialize(sk_sp<SkData> bytes) { in fuzz_color_deserialize() argument
705 sk_sp<SkColorSpace> space(SkColorSpace::Deserialize(bytes->data(), bytes->size())); in fuzz_color_deserialize()
715 static void fuzz_path_deserialize(sk_sp<SkData> bytes) { in fuzz_path_deserialize() argument
716 SkReadBuffer buf(bytes->data(), bytes->size()); in fuzz_path_deserialize()
721 bool FuzzRegionDeserialize(sk_sp<SkData> bytes);
723 static void fuzz_region_deserialize(sk_sp<SkData> bytes) { in fuzz_region_deserialize() argument
724 if (!FuzzRegionDeserialize(bytes)) { in fuzz_region_deserialize()
733 static void fuzz_textblob_deserialize(sk_sp<SkData> bytes) { in fuzz_textblob_deserialize() argument
734 SkReadBuffer buf(bytes->data(), bytes->size()); in fuzz_textblob_deserialize()
741 static void fuzz_region_set_path(sk_sp<SkData> bytes) { in fuzz_region_set_path() argument
742 Fuzz fuzz(bytes); in fuzz_region_set_path()
747 void FuzzImageFilterDeserialize(sk_sp<SkData> bytes);
749 static void fuzz_filter_fuzz(sk_sp<SkData> bytes) { in fuzz_filter_fuzz() argument
750 FuzzImageFilterDeserialize(bytes); in fuzz_filter_fuzz()
754 bool FuzzSkRuntimeEffect(sk_sp<SkData> bytes);
756 static void fuzz_skruntimeeffect(sk_sp<SkData> bytes) { in fuzz_skruntimeeffect() argument
757 if (FuzzSkRuntimeEffect(bytes)) { in fuzz_skruntimeeffect()
764 bool FuzzSKSL2GLSL(sk_sp<SkData> bytes);
766 static void fuzz_sksl2glsl(sk_sp<SkData> bytes) { in fuzz_sksl2glsl() argument
767 if (FuzzSKSL2GLSL(bytes)) { in fuzz_sksl2glsl()
774 bool FuzzSKSL2SPIRV(sk_sp<SkData> bytes);
776 static void fuzz_sksl2spirv(sk_sp<SkData> bytes) { in fuzz_sksl2spirv() argument
777 if (FuzzSKSL2SPIRV(bytes)) { in fuzz_sksl2spirv()
784 bool FuzzSKSL2Metal(sk_sp<SkData> bytes);
786 static void fuzz_sksl2metal(sk_sp<SkData> bytes) { in fuzz_sksl2metal() argument
787 if (FuzzSKSL2Metal(bytes)) { in fuzz_sksl2metal()
794 bool FuzzSKSL2Pipeline(sk_sp<SkData> bytes);
796 static void fuzz_sksl2pipeline(sk_sp<SkData> bytes) { in fuzz_sksl2pipeline() argument
797 if (FuzzSKSL2Pipeline(bytes)) { in fuzz_sksl2pipeline()
804 void FuzzSkDescriptorDeserialize(sk_sp<SkData> bytes);
806 static void fuzz_skdescriptor_deserialize(sk_sp<SkData> bytes) { in fuzz_skdescriptor_deserialize() argument
807 FuzzSkDescriptorDeserialize(bytes); in fuzz_skdescriptor_deserialize()