Index: cc/resources/ui_resource_bitmap.h |
diff --git a/cc/resources/ui_resource_bitmap.h b/cc/resources/ui_resource_bitmap.h |
index 23492182b35d359082445f798990b9f607780848..6f2c780fcb9081dfef259ec974b7cfaed6ea33cc 100644 |
--- a/cc/resources/ui_resource_bitmap.h |
+++ b/cc/resources/ui_resource_bitmap.h |
@@ -51,6 +51,11 @@ class CC_EXPORT UIResourceBitmap { |
UIResourceBitmap(const UIResourceBitmap& other); |
~UIResourceBitmap(); |
+ // Returns the memory usage of the bitmap. |
+ size_t GetAllocatedSizeInBytes() const { |
+ return pixel_ref_ ? pixel_ref_->rowBytes() * size_.height() : 0; |
ericrk
2016/10/14 00:07:38
I think this is fine - in some other places we use
David Trainor- moved to gerrit
2016/10/14 01:35:31
Ah yeah sorry I didn't realize the other method wa
ssid
2016/10/14 01:38:22
Okay keeping it as is. I will ping Skia owners to
|
+ } |
+ |
private: |
friend class AutoLockUIResourceBitmap; |