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

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: Addressed comments, added test, dcheck for compressed texture availability 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
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:

Powered by Google App Engine
This is Rietveld 408576698