| Index: cc/resources/resource.h
|
| diff --git a/cc/resources/resource.h b/cc/resources/resource.h
|
| index 2650a0c8b6f365e9a318ac3d4fc2e663a52f906a..e9dd393a6a4e0b340ee27c84c3d6aa69e416c849 100644
|
| --- a/cc/resources/resource.h
|
| +++ b/cc/resources/resource.h
|
| @@ -26,7 +26,8 @@ class CC_EXPORT Resource {
|
| size_t bytes() const;
|
|
|
| inline static size_t MemorySizeBytes(gfx::Size size, ResourceFormat format) {
|
| - return BytesPerPixel(format) * size.width() * size.height();
|
| + DCHECK_EQ(0u, (BitsPerPixel(format) * size.width() * size.height()) % 8);
|
| + return (BitsPerPixel(format) * size.width() * size.height()) / 8;
|
| }
|
|
|
| protected:
|
|
|