Promote pixcfg field out of private_impl

This commit is contained in:
Nigel Tao committed 2018-08-18 12:29:28 +10:00
1 parent 10ae70448f
commit 5e8801d866
6 files changed
+54 -290

No files matched your search

+2 -3
View File
@@ -72,8 +72,7 @@ const char* fuzz(wuffs_base__io_reader src_reader, uint32_t hash) {
goto exit;
}
size_t pixbuf_size = wuffs_base__pixel_config__pixbuf_size(
wuffs_base__image_config__pixel_config(&ic));
size_t pixbuf_size = wuffs_base__pixel_config__pixbuf_size(&ic.pixcfg);
// Don't try to allocate more than 64 MiB.
if (pixbuf_size > 64 * 1024 * 1024) {
ret = "image too large";
@@ -86,7 +85,7 @@ const char* fuzz(wuffs_base__io_reader src_reader, uint32_t hash) {
}
wuffs_base__pixel_buffer pb = ((wuffs_base__pixel_buffer){});
z = wuffs_base__pixel_buffer__set_from_slice(
&pb, wuffs_base__image_config__pixel_config(&ic),
&pb, &ic.pixcfg,
((wuffs_base__slice_u8){.ptr = pixbuf, .len = pixbuf_size}));
if (z) {
ret = z;