Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1921)

Unified Diff: cc/resources/resource.h

Issue 27973002: cc: Adding ETC1 support to UIResourceBitmap and ResourceProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: latest comments Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/raster_worker_pool.cc ('k') | cc/resources/resource_format.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « cc/resources/raster_worker_pool.cc ('k') | cc/resources/resource_format.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698