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

Unified Diff: ui/android/resources/resource_manager.cc

Issue 2440393002: [tracing] Implement composable memory usage estimators. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 | « ui/android/resources/resource_manager.h ('k') | ui/android/resources/resource_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/resources/resource_manager.cc
diff --git a/ui/android/resources/resource_manager.cc b/ui/android/resources/resource_manager.cc
index 2117572e9040f4ef56fbf92370128479dc5fa530..80112978ce0b3c15e6e4031bfb8a801c69192b48 100644
--- a/ui/android/resources/resource_manager.cc
+++ b/ui/android/resources/resource_manager.cc
@@ -4,6 +4,7 @@
#include "ui/android/resources/resource_manager.h"
+#include "base/trace_event/memory_usage_estimator.h"
#include "ui/gfx/geometry/insets_f.h"
namespace ui {
@@ -35,4 +36,8 @@ gfx::Rect ResourceManager::Resource::Border(const gfx::Size& bounds,
(size.height() - aperture.height()) * bottom_scale);
}
+size_t ResourceManager::Resource::EstimateMemoryUsage() const {
+ return base::trace_event::EstimateMemoryUsage(ui_resource);
+}
+
} // namespace ui
« no previous file with comments | « ui/android/resources/resource_manager.h ('k') | ui/android/resources/resource_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698