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

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: 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
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..9bfb57bb63adccb9501077cd0af9198cf3b28bfa 100644
--- a/ui/android/resources/crushed_sprite_resource.h
+++ b/ui/android/resources/crushed_sprite_resource.h
@@ -16,7 +16,6 @@
namespace cc {
class LayerTreeHost;
-class ScopedUIResource;
typedef int UIResourceId;
}
@@ -71,9 +70,11 @@ 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 GetAllocatedSizeInBytes() const;
+
private:
SkBitmap bitmap_;
- std::unique_ptr<cc::ScopedUIResource> last_frame_resource_;
SrcDstRects src_dst_rects_;
gfx::Size unscaled_sprite_size_;
gfx::Size scaled_sprite_size_;

Powered by Google App Engine
This is Rietveld 408576698