/third_party/skia/third_party/externals/libpng/ |
D | pngget.c | 20 png_get_valid(png_const_structrp png_ptr, png_const_inforp info_ptr, in png_get_valid() argument 23 if (png_ptr != NULL && info_ptr != NULL) in png_get_valid() 24 return(info_ptr->valid & flag); in png_get_valid() 30 png_get_rowbytes(png_const_structrp png_ptr, png_const_inforp info_ptr) in png_get_rowbytes() argument 32 if (png_ptr != NULL && info_ptr != NULL) in png_get_rowbytes() 33 return(info_ptr->rowbytes); in png_get_rowbytes() 40 png_get_rows(png_const_structrp png_ptr, png_const_inforp info_ptr) in png_get_rows() argument 42 if (png_ptr != NULL && info_ptr != NULL) in png_get_rows() 43 return(info_ptr->row_pointers); in png_get_rows() 52 png_get_image_width(png_const_structrp png_ptr, png_const_inforp info_ptr) in png_get_image_width() argument [all …]
|
D | pngset.c | 25 png_set_bKGD(png_const_structrp png_ptr, png_inforp info_ptr, in png_set_bKGD() argument 30 if (png_ptr == NULL || info_ptr == NULL || background == NULL) in png_set_bKGD() 33 info_ptr->background = *background; in png_set_bKGD() 34 info_ptr->valid |= PNG_INFO_bKGD; in png_set_bKGD() 40 png_set_cHRM_fixed(png_const_structrp png_ptr, png_inforp info_ptr, in png_set_cHRM_fixed() argument 49 if (png_ptr == NULL || info_ptr == NULL) in png_set_cHRM_fixed() 61 if (png_colorspace_set_chromaticities(png_ptr, &info_ptr->colorspace, &xy, in png_set_cHRM_fixed() 63 info_ptr->colorspace.flags |= PNG_COLORSPACE_FROM_cHRM; in png_set_cHRM_fixed() 65 png_colorspace_sync_info(png_ptr, info_ptr); in png_set_cHRM_fixed() 69 png_set_cHRM_XYZ_fixed(png_const_structrp png_ptr, png_inforp info_ptr, in png_set_cHRM_XYZ_fixed() argument [all …]
|
D | pngwrite.c | 24 write_unknown_chunks(png_structrp png_ptr, png_const_inforp info_ptr, in write_unknown_chunks() argument 27 if (info_ptr->unknown_chunks_num != 0) in write_unknown_chunks() 33 for (up = info_ptr->unknown_chunks; in write_unknown_chunks() 34 up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; in write_unknown_chunks() 84 png_write_info_before_PLTE(png_structrp png_ptr, png_const_inforp info_ptr) in png_write_info_before_PLTE() argument 88 if (png_ptr == NULL || info_ptr == NULL) in png_write_info_before_PLTE() 107 png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height, in png_write_info_before_PLTE() 108 info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type, in png_write_info_before_PLTE() 109 info_ptr->filter_type, in png_write_info_before_PLTE() 111 info_ptr->interlace_type in png_write_info_before_PLTE() [all …]
|
D | example.c | 276 png_infop info_ptr; 289 png_infop info_ptr; 310 info_ptr = png_create_info_struct(png_ptr); 311 if (info_ptr == NULL) 325 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); 355 png_read_png(png_ptr, info_ptr, png_transforms, NULL); 363 png_read_info(png_ptr, info_ptr); 365 png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 410 if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) != 0) 421 if (png_get_bKGD(png_ptr, info_ptr, &image_background) != 0) [all …]
|
D | png.h | 1011 PNG_EXPORTA(19, void, png_info_init_3, (png_infopp info_ptr, 1016 (png_structrp png_ptr, png_const_inforp info_ptr)); 1018 (png_structrp png_ptr, png_const_inforp info_ptr)); 1023 (png_structrp png_ptr, png_inforp info_ptr)); 1368 png_inforp info_ptr)); 1404 png_inforp info_ptr)); 1408 PNG_EXPORT(62, void, png_read_end, (png_structrp png_ptr, png_inforp info_ptr)); 1688 png_inforp info_ptr, png_bytep buffer, size_t buffer_size)); 1731 png_inforp info_ptr, png_uint_32 free_me, int num)); 1741 png_inforp info_ptr, int freer, png_uint_32 mask)); [all …]
|
D | png.c | 356 png_inforp info_ptr; variable 368 info_ptr = png_voidcast(png_inforp, png_malloc_base(png_ptr, 369 (sizeof *info_ptr))); 371 if (info_ptr != NULL) 372 memset(info_ptr, 0, (sizeof *info_ptr)); 374 return info_ptr; 388 png_inforp info_ptr = NULL; in png_destroy_info_struct() local 396 info_ptr = *info_ptr_ptr; in png_destroy_info_struct() 398 if (info_ptr != NULL) in png_destroy_info_struct() 408 png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); in png_destroy_info_struct() [all …]
|
D | pngread.c | 92 png_read_info(png_structrp png_ptr, png_inforp info_ptr) in png_read_info() argument 100 if (png_ptr == NULL || info_ptr == NULL) in png_read_info() 104 png_read_sig(png_ptr, info_ptr); in png_read_info() 139 png_handle_IHDR(png_ptr, info_ptr, length); in png_read_info() 142 png_handle_IEND(png_ptr, info_ptr, length); in png_read_info() 147 png_handle_unknown(png_ptr, info_ptr, length, keep); in png_read_info() 160 png_handle_PLTE(png_ptr, info_ptr, length); in png_read_info() 170 png_handle_bKGD(png_ptr, info_ptr, length); in png_read_info() 175 png_handle_cHRM(png_ptr, info_ptr, length); in png_read_info() 180 png_handle_eXIf(png_ptr, info_ptr, length); in png_read_info() [all …]
|
D | pngpread.c | 36 png_process_data(png_structrp png_ptr, png_inforp info_ptr, in png_process_data() argument 39 if (png_ptr == NULL || info_ptr == NULL) in png_process_data() 46 png_process_some_data(png_ptr, info_ptr); in png_process_data() 94 png_process_some_data(png_structrp png_ptr, png_inforp info_ptr) in png_process_some_data() argument 103 png_push_read_sig(png_ptr, info_ptr); in png_process_some_data() 109 png_push_read_chunk(png_ptr, info_ptr); in png_process_some_data() 134 png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr) in png_push_read_sig() argument 144 png_push_fill_buffer(png_ptr, &(info_ptr->signature[num_checked]), in png_push_read_sig() 148 if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check)) in png_push_read_sig() 151 png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) in png_push_read_sig() [all …]
|
D | pngrutil.c | 121 png_read_sig(png_structrp png_ptr, png_inforp info_ptr) in png_read_sig() argument 137 png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check); in png_read_sig() 140 if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check) != 0) in png_read_sig() 143 png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4)) in png_read_sig() 839 png_handle_IHDR(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) in png_handle_IHDR() argument 907 png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, in png_handle_IHDR() 913 png_handle_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) in png_handle_PLTE() argument 1060 png_set_PLTE(png_ptr, info_ptr, palette, num); in png_handle_PLTE() 1073 (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS) != 0)) in png_handle_PLTE() 1081 if (info_ptr != NULL) in png_handle_PLTE() [all …]
|
D | pngpriv.h | 1084 png_inforp info_ptr),PNG_EMPTY); 1209 png_inforp info_ptr, png_const_textp text_ptr, int num_text),PNG_EMPTY); 1404 png_inforp info_ptr),PNG_EMPTY); 1443 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); 1445 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); 1447 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); 1451 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); 1456 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); 1461 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); 1466 png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); [all …]
|
/third_party/skia/third_party/externals/libpng/contrib/gregbook/ |
D | writepng.c | 87 png_infop info_ptr; in writepng_init() local 98 info_ptr = png_create_info_struct(png_ptr); in writepng_init() 99 if (!info_ptr) { in writepng_init() 112 png_destroy_write_struct(&png_ptr, &info_ptr); in writepng_init() 149 png_destroy_write_struct(&png_ptr, &info_ptr); in writepng_init() 156 png_set_IHDR(png_ptr, info_ptr, mainprog_ptr->width, mainprog_ptr->height, in writepng_init() 161 png_set_gAMA(png_ptr, info_ptr, mainprog_ptr->gamma); in writepng_init() 169 png_set_bKGD(png_ptr, info_ptr, &background); in writepng_init() 176 png_set_tIME(png_ptr, info_ptr, &modtime); in writepng_init() 219 png_set_text(png_ptr, info_ptr, text, num_text); in writepng_init() [all …]
|
D | readpng2.c | 73 static void readpng2_info_callback(png_structp png_ptr, png_infop info_ptr); 76 static void readpng2_end_callback(png_structp png_ptr, png_infop info_ptr); 108 png_infop info_ptr; in readpng2_init() local 118 info_ptr = png_create_info_struct(png_ptr); in readpng2_init() 119 if (!info_ptr) { in readpng2_init() 136 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); in readpng2_init() 177 mainprog_ptr->info_ptr = info_ptr; in readpng2_init() 193 png_infop info_ptr = (png_infop)mainprog_ptr->info_ptr; in readpng2_decode_data() local 200 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); in readpng2_decode_data() 202 mainprog_ptr->info_ptr = NULL; in readpng2_decode_data() [all …]
|
D | readpng.c | 70 static png_infop info_ptr = NULL; variable 108 info_ptr = png_create_info_struct(png_ptr); in readpng_init() 109 if (!info_ptr) { in readpng_init() 124 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); in readpng_init() 132 png_read_info(png_ptr, info_ptr); /* read all PNG info up to image data */ in readpng_init() 139 png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, in readpng_init() 165 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); in readpng_get_bgcolor() 170 if (!png_get_valid(png_ptr, info_ptr, PNG_INFO_bKGD)) in readpng_get_bgcolor() 177 png_get_bKGD(png_ptr, info_ptr, &pBackground); in readpng_get_bgcolor() 223 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); in readpng_get_image() [all …]
|
/third_party/skia/third_party/externals/libpng/contrib/oss-fuzz/ |
D | libpng_read_fuzzer.cc | 33 png_destroy_read_struct(&png_handler.png_ptr, &png_handler.info_ptr,\ 35 else if (png_handler.info_ptr) \ 36 png_destroy_read_struct(&png_handler.png_ptr, &png_handler.info_ptr,\ 42 png_handler.info_ptr = nullptr; \ 52 png_infop info_ptr = nullptr; member 62 png_destroy_read_struct(&png_ptr, &info_ptr, &end_info_ptr); in ~PngObjectHandler() 63 else if (info_ptr) in ~PngObjectHandler() 64 png_destroy_read_struct(&png_ptr, &info_ptr, nullptr); in ~PngObjectHandler() 100 png_handler.info_ptr = nullptr; in LLVMFuzzerTestOneInput() 109 png_handler.info_ptr = png_create_info_struct(png_handler.png_ptr); in LLVMFuzzerTestOneInput() [all …]
|
/third_party/libpng/ |
D | backport-libpng-1.6.37-enable-valid.patch | 96 @@ -2075,22 +2075,21 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 leng… 99 info_ptr->eXIf_buf[i] = buf[0]; 102 + && info_ptr->eXIf_buf[0] != buf[0]) 105 - (info_ptr->eXIf_buf[0] != buf[0])) 109 - png_free(png_ptr, info_ptr->eXIf_buf); 110 - info_ptr->eXIf_buf = NULL; 115 + png_free(png_ptr, info_ptr->eXIf_buf); 116 + info_ptr->eXIf_buf = NULL; 122 - png_set_eXIf_1(png_ptr, info_ptr, length, info_ptr->eXIf_buf); 126 + png_set_eXIf_1(png_ptr, info_ptr, length, info_ptr->eXIf_buf); [all …]
|
/third_party/skia/third_party/externals/libpng/contrib/libtests/ |
D | readpng.c | 38 png_infop info_ptr = NULL; in read_png() local 46 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); in read_png() 54 info_ptr = png_create_info_struct(png_ptr); in read_png() 55 if (info_ptr == NULL) in read_png() 60 png_read_info(png_ptr, info_ptr); in read_png() 63 size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr); in read_png() 73 png_uint_32 height = png_get_image_height(png_ptr, info_ptr); in read_png() 77 int passes = png_get_interlace_type(png_ptr, info_ptr) == in read_png() 103 png_read_end(png_ptr, info_ptr); in read_png() 104 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); in read_png()
|
D | makepng.c | 776 volatile png_infop info_ptr = NULL; in write_png() local 788 png_infop nv_info = info_ptr; in write_png() 791 info_ptr = NULL; in write_png() 810 info_ptr = png_create_info_struct(png_ptr); in write_png() 811 if (info_ptr == NULL) in write_png() 884 png_set_IHDR(png_ptr, info_ptr, size, ysize, bit_depth, color_type, in write_png() 895 png_set_PLTE(png_ptr, info_ptr, palette, npalette); in write_png() 898 png_set_tRNS(png_ptr, info_ptr, trans, npalette-1, in write_png() 913 png_set_tRNS(png_ptr, info_ptr, NULL/*trans*/, 1U, &col); in write_png() 917 png_set_sRGB(png_ptr, info_ptr, PNG_sRGB_INTENT_ABSOLUTE); in write_png() [all …]
|
D | timepng.c | 83 static void read_by_row(png_structp png_ptr, png_infop info_ptr, in read_by_row() argument 100 png_read_info(png_ptr, info_ptr); in read_by_row() 103 size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr); in read_by_row() 112 png_uint_32 height = png_get_image_height(png_ptr, info_ptr); in read_by_row() 133 png_read_end(png_ptr, info_ptr); in read_by_row() 151 png_infop info_ptr = NULL; in read_png() local 158 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); in read_png() 167 info_ptr = png_create_info_struct(png_ptr); in read_png() 169 if (info_ptr == NULL) in read_png() 173 read_by_row(png_ptr, info_ptr, write_file, fp); in read_png() [all …]
|
D | pngunknown.c | 398 png_infop info_ptr, end_ptr; member 417 d->info_ptr = d->end_ptr = NULL; in init_display() 427 png_destroy_read_struct(&d->png_ptr, &d->info_ptr, &d->end_ptr); in clean_display() 430 if (d->png_ptr != NULL || d->info_ptr != NULL || d->end_ptr != NULL) in clean_display() 480 get_valid(display *d, png_infop info_ptr) in get_valid() argument 482 png_uint_32 flags = png_get_valid(d->png_ptr, info_ptr, (png_uint_32)~0); in get_valid() 487 png_uint_32 ntext = png_get_text(d->png_ptr, info_ptr, &text, NULL); in get_valid() 586 get_unknown(display *d, png_infop info_ptr, int after_IDAT) in get_unknown() argument 595 int num_unknown = png_get_unknown_chunks(d->png_ptr, info_ptr, &unknown); in get_unknown() 639 get_unknown(display *d, png_infop info_ptr, int after_IDAT) in get_unknown() argument [all …]
|
/third_party/skia/third_party/externals/libpng/contrib/visupng/ |
D | PngFile.c | 30 static png_infop info_ptr = NULL; variable 147 info_ptr = png_create_info_struct(png_ptr); 148 if (!info_ptr) 170 png_read_info(png_ptr, info_ptr); 174 png_get_IHDR(png_ptr, info_ptr, piWidth, piHeight, &iBitDepth, 192 if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) 199 if (png_get_bKGD(png_ptr, info_ptr, &pBackground)) 212 if (png_get_gAMA(png_ptr, info_ptr, &dGamma)) 217 png_read_update_info(png_ptr, info_ptr); 221 png_get_IHDR(png_ptr, info_ptr, piWidth, piHeight, &iBitDepth, [all …]
|
/third_party/skia/third_party/externals/libpng/contrib/pngminus/ |
D | png2pnm.c | 167 png_info *info_ptr = NULL; in png2pnm() local 201 info_ptr = png_create_info_struct (png_ptr); in png2pnm() 202 if (!info_ptr) in png2pnm() 210 png_destroy_read_struct (&png_ptr, &info_ptr, NULL); in png2pnm() 219 png_read_info (png_ptr, info_ptr); in png2pnm() 222 png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, in png2pnm() 234 if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) in png2pnm() 246 if (png_get_gAMA (png_ptr, info_ptr, &file_gamma)) in png2pnm() 253 png_read_update_info (png_ptr, info_ptr); in png2pnm() 256 png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, in png2pnm() [all …]
|
/third_party/skia/third_party/externals/libpng/contrib/examples/ |
D | pngpixel.c | 73 print_pixel(png_structp png_ptr, png_infop info_ptr, png_const_bytep row, in print_pixel() argument 76 unsigned int bit_depth = png_get_bit_depth(png_ptr, info_ptr); in print_pixel() 78 switch (png_get_color_type(png_ptr, info_ptr)) in print_pixel() 94 if ((png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) & in print_pixel() 99 if ((png_get_tRNS(png_ptr, info_ptr, &trans_alpha, &num_trans, in print_pixel() 171 png_infop info_ptr = png_create_info_struct(png_ptr); in main() local 173 if (info_ptr != NULL) in main() 198 png_read_info(png_ptr, info_ptr); in main() 206 info_ptr)); in main() 217 if (png_get_IHDR(png_ptr, info_ptr, &width, &height, in main() [all …]
|
D | iccfrompng.c | 40 png_infop info_ptr = NULL; in extract() local 54 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); in extract() 60 info_ptr = png_create_info_struct(png_ptr); in extract() 61 if (info_ptr == NULL) in extract() 64 png_read_info(png_ptr, info_ptr); in extract() 71 if (png_get_iCCP(png_ptr, info_ptr, &name, &compression_type, &profile, in extract() 86 png_destroy_read_struct(&png_ptr, &info_ptr, NULL); in extract()
|
/third_party/vk-gl-cts/framework/common/ |
D | tcuImageIO.cpp | 94 png_infop info_ptr = png_create_info_struct(png_ptr); in loadPNG() local 95 TCU_CHECK(info_ptr); in loadPNG() 103 png_read_info(png_ptr, info_ptr); in loadPNG() 105 const deUint32 width = (deUint32)png_get_image_width(png_ptr, info_ptr); in loadPNG() 106 const deUint32 height = (deUint32)png_get_image_height(png_ptr, info_ptr); in loadPNG() 110 const png_byte colorType = png_get_color_type(png_ptr, info_ptr); in loadPNG() 111 const png_byte bitDepth = png_get_bit_depth(png_ptr, info_ptr); in loadPNG() 131 png_destroy_info_struct(png_ptr, &info_ptr); in loadPNG()
|
/third_party/skia/src/codec/ |
D | SkPngCodec.cpp | 96 void setInfoPtr(png_infop info_ptr) { in setInfoPtr() argument 98 fInfo_ptr = info_ptr; in setInfoPtr() 134 static inline bool process_data(png_structp png_ptr, png_infop info_ptr, in process_data() argument 139 png_process_data(png_ptr, info_ptr, (png_bytep) buffer, bytesRead); in process_data() 349 png_infop info_ptr) { in read_color_profile() argument 363 if (PNG_INFO_iCCP == png_get_iCCP(png_ptr, info_ptr, &name, &compression, &profile, in read_color_profile() 373 if (png_get_valid(png_ptr, info_ptr, PNG_INFO_sRGB)) { in read_color_profile() 387 if (png_get_cHRM_fixed(png_ptr, info_ptr, &chrm[0], &chrm[1], &chrm[2], &chrm[3], &chrm[4], in read_color_profile() 409 if (PNG_INFO_gAMA == png_get_gAMA_fixed(png_ptr, info_ptr, &gamma)) { in read_color_profile() 494 SkPngChunkReader* reader, png_structp png_ptr, png_infop info_ptr, int bitDepth) in SkPngNormalDecoder() argument [all …]
|