Improve ImageData::StorageFormatDataSize
ImageData::StorageFormatDataSize returns 1, 2 and 4 for the data size for color format in uint8, uint16 and float 32 format, respectively. This not really true, since we need 4 channel to describe a color, the data size should really be 4, 8 and 16 bytes instead. In image_data.cc, we always call ImageData::StorageFormatDataSize and then multiply the result by 4 to get the real data size. In this cl, I update ImageData::StorageFormatDataSize to return 4, 8 and 16 and remove the multiplication to improve the readability of the code. Bug: 1122866 Change-Id: Ib78e31cff3c919728a3a84771acf2545d29a89a3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2391984Reviewed-by:Fernando Serboncini <fserb@chromium.org> Reviewed-by:
Juanmi Huertas <juanmihd@chromium.org> Reviewed-by:
Aaron Krajeski <aaronhk@chromium.org> Reviewed-by:
Jeremy Roman <jbroman@chromium.org> Reviewed-by:
ccameron <ccameron@chromium.org> Commit-Queue: Yi Xu <yiyix@chromium.org> Cr-Commit-Position: refs/heads/master@{#805976}
Showing
Please register or sign in to comment