Have pixel_foo methods take pointer receivers

This commit is contained in:
Nigel Tao committed 2020-01-05 13:33:52 +11:00
1 parent 0fa32bd09f
commit fabfff05d1
4 files changed
+96 -92

No files matched your search

+2 -2
View File
@@ -443,12 +443,12 @@ const char* copy_to_io_buffer_from_pixel_buffer(wuffs_base__io_buffer* dst,
wuffs_base__pixel_format pixfmt =
wuffs_base__pixel_config__pixel_format(&src->pixcfg);
if (wuffs_base__pixel_format__is_planar(pixfmt)) {
if (wuffs_base__pixel_format__is_planar(&pixfmt)) {
// If we want to support planar pixel buffers, in the future, be concious
// of pixel subsampling.
return "copy_to_io_buffer_from_pixel_buffer: cannot copy from planar src";
}
uint32_t bits_per_pixel = wuffs_base__pixel_format__bits_per_pixel(pixfmt);
uint32_t bits_per_pixel = wuffs_base__pixel_format__bits_per_pixel(&pixfmt);
if (bits_per_pixel == 0) {
return "copy_to_io_buffer_from_pixel_buffer: invalid bits_per_pixel";
} else if ((bits_per_pixel % 8) != 0) {