Chromium Code Reviews| Index: cc/resources/resource.cc |
| diff --git a/cc/resources/resource.cc b/cc/resources/resource.cc |
| index 9bbcd4f498b96628507ce6da25eed352b932f009..43ab60661ca2f09a2704760b8364631c068afe0b 100644 |
| --- a/cc/resources/resource.cc |
| +++ b/cc/resources/resource.cc |
| @@ -13,5 +13,11 @@ size_t Resource::bytes() const { |
| return MemorySizeBytes(size_, format_); |
| } |
| +size_t Resource::ETC1SizeInBytes(gfx::Size size) { |
| + size_t block_size = 64; |
|
kaanb
2013/10/18 16:54:49
const size_t kBlockSize = 64;
as this is a compil
powei
2013/10/23 05:36:15
Done.
|
| + size_t compressed_width = size.width() / 4 + (size.width() % 4 ? 1 : 0); |
|
aelias_OOO_until_Jul13
2013/10/18 01:59:24
Could we just DCHECK that the resource size is div
powei
2013/10/23 05:36:15
Done.
|
| + size_t compressed_height = size.height() / 4 + (size.height() % 4 ? 1 : 0); |
| + return block_size * compressed_width * compressed_height; |
| +} |
| } // namespace cc |