1. With introduction of compressed formats, e.g. ETC1, the number of
bits per pixel is becoming less than 8. Computing bytes per pixel by
BitsPerPixel(format) / 8, might give different values. So compute the
bits per row first and divide it by 8 to get the bytes per row.
2. Move resource size computation functions to separate file,
i.e. resource_util.cc.
3. Move resource format related functions to resource_format.h. As
there is dependecy on third_party/khronos/GLES2/gl2.h &
third_party/khronos/GLES2/gl2ext.h, the inlined functions have been
written as non-inlined functions and header files have been included
in resource_format.cc.
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Committed:
https://crrev.com/8e4942838460a8d66a31c46baf265a5a8b61a16a
Cr-Commit-Position: refs/heads/master@{#341492}