Index: cc/resources/scoped_ui_resource.h |
diff --git a/cc/resources/scoped_ui_resource.h b/cc/resources/scoped_ui_resource.h |
index 14db076b1e718dc705f426ad891139d3fab76cb1..7f3ea4b385c432c8ed90414abe08e2bec17ae0e7 100644 |
--- a/cc/resources/scoped_ui_resource.h |
+++ b/cc/resources/scoped_ui_resource.h |
@@ -32,6 +32,11 @@ class CC_EXPORT ScopedUIResource : public UIResourceClient { |
UIResourceBitmap GetBitmap(UIResourceId uid, bool resource_lost) override; |
UIResourceId id() { return id_; } |
+ // Returns the memory usage of the bitmap. |
+ size_t GetAllocatedSizeInBytes() const { |
+ return bitmap_.GetAllocatedSizeInBytes(); |
+ } |
+ |
protected: |
ScopedUIResource(UIResourceManager* ui_resource_manager, |
const UIResourceBitmap& bitmap); |