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

Unified Diff: cc/resources/scoped_ui_resource.h

Issue 2406103002: [tracing] Add memory usage of Android UI resources to memory-infra (Closed)
Patch Set: Fixes. Created 4 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 | « no previous file | cc/resources/ui_resource_bitmap.h » ('j') | cc/resources/ui_resource_bitmap.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | cc/resources/ui_resource_bitmap.h » ('j') | cc/resources/ui_resource_bitmap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698