Index: cc/resources/resource.h |
diff --git a/cc/resources/resource.h b/cc/resources/resource.h |
index f9138fbb876ef405c8afada390cf4031f92f4b92..d0c60599dea44dc766804fcda8552882be46f59f 100644 |
--- a/cc/resources/resource.h |
+++ b/cc/resources/resource.h |
@@ -51,8 +51,9 @@ class CC_EXPORT Resource { |
inline static size_t UncheckedMemorySizeBytes(const gfx::Size& size, |
ResourceFormat format) { |
DCHECK(VerifySizeInBytes(size, format)); |
- return static_cast<size_t>(BitsPerPixel(format)) * size.width() * |
- size.height() / 8; |
reveman
2015/06/24 18:02:26
hm, looks like this was broken for height < 8 befo
vmpstr
2015/06/24 18:46:14
I think the order of multiplicative operations is
|
+ return (static_cast<size_t>(BitsPerPixel(format)) * size.width() * |
+ size.height()) / |
+ 8; |
reveman
2015/06/24 18:02:26
Can you add a temporary bytes_per_row variable her
|
} |
protected: |