diff options
author | prashant.n <prashant.n@samsung.com> | 2015-08-03 00:13:41 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-03 07:14:15 +0000 |
commit | 8e4942838460a8d66a31c46baf265a5a8b61a16a (patch) | |
tree | 4c6837eacb7220a9f6b0107e64df0959c889c514 /cc/resources/resource_pool_unittest.cc | |
parent | 06d8e4f230b536b67438d9af56c3a56bd804c05b (diff) | |
download | chromium_src-8e4942838460a8d66a31c46baf265a5a8b61a16a.zip chromium_src-8e4942838460a8d66a31c46baf265a5a8b61a16a.tar.gz chromium_src-8e4942838460a8d66a31c46baf265a5a8b61a16a.tar.bz2 |
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
Review URL: https://codereview.chromium.org/1202843008
Cr-Commit-Position: refs/heads/master@{#341492}
Diffstat (limited to 'cc/resources/resource_pool_unittest.cc')
-rw-r--r-- | cc/resources/resource_pool_unittest.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cc/resources/resource_pool_unittest.cc b/cc/resources/resource_pool_unittest.cc index 96e7591..035b19e 100644 --- a/cc/resources/resource_pool_unittest.cc +++ b/cc/resources/resource_pool_unittest.cc @@ -4,6 +4,7 @@ #include "cc/resources/resource_pool.h" +#include "cc/resources/resource_util.h" #include "cc/resources/scoped_resource.h" #include "cc/test/fake_output_surface.h" #include "cc/test/fake_output_surface_client.h" @@ -54,7 +55,8 @@ TEST_F(ResourcePoolTest, AccountingSingleResource) { gfx::Size size(100, 100); ResourceFormat format = RGBA_8888; - size_t resource_bytes = Resource::UncheckedMemorySizeBytes(size, format); + size_t resource_bytes = + ResourceUtil::UncheckedSizeInBytes<size_t>(size, format); scoped_ptr<ScopedResource> resource = resource_pool_->AcquireResource(size, format); |