Chromium Code Reviews| Index: cc/resources/resource.h |
| diff --git a/cc/resources/resource.h b/cc/resources/resource.h |
| index 2650a0c8b6f365e9a318ac3d4fc2e663a52f906a..9e7979ce6b4777879053981d9a0b8705102356a5 100644 |
| --- a/cc/resources/resource.h |
| +++ b/cc/resources/resource.h |
| @@ -26,7 +26,7 @@ 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(); |
| + return (BitsPerPixel(format) * size.width() * size.height()) / 8; |
|
no sievers
2013/10/23 20:33:15
nit: maybe dcheck that bpp*w*h is a multiple of 8
powei
2013/10/23 22:20:07
Done.
|
| } |
| protected: |