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

Unified Diff: ui/android/resources/crushed_sprite_resource.h

Issue 2406103002: [tracing] Add memory usage of Android UI resources to memory-infra (Closed)
Patch Set: nit. 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
Index: ui/android/resources/crushed_sprite_resource.h
diff --git a/ui/android/resources/crushed_sprite_resource.h b/ui/android/resources/crushed_sprite_resource.h
index 9ffa25a7966656503bf1088c98d4432bf073bae8..43eb6b5ca05f9dd2896fbd3859d22f27153c2843 100644
--- a/ui/android/resources/crushed_sprite_resource.h
+++ b/ui/android/resources/crushed_sprite_resource.h
@@ -71,6 +71,9 @@ class UI_ANDROID_EXPORT CrushedSpriteResource {
// Returns the total number of frames in the sprite animation.
int GetFrameCount();
+ // Returns the memory usage of the bitmap.
+ size_t BytesUsed() const;
+
private:
SkBitmap bitmap_;
std::unique_ptr<cc::ScopedUIResource> last_frame_resource_;

Powered by Google App Engine
This is Rietveld 408576698