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

Unified Diff: third_party/WebKit/Source/platform/fonts/GlyphMetricsMap.h

Issue 2123193002: Add GlyphMetricsMap memory consumption to memory-infra tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: third_party/WebKit/Source/platform/fonts/GlyphMetricsMap.h
diff --git a/third_party/WebKit/Source/platform/fonts/GlyphMetricsMap.h b/third_party/WebKit/Source/platform/fonts/GlyphMetricsMap.h
index f4225f09eb345b9b8d9ee8fac903cd5a86975d99..526005333172372f76db7370df4435efe267d7f1 100644
--- a/third_party/WebKit/Source/platform/fonts/GlyphMetricsMap.h
+++ b/third_party/WebKit/Source/platform/fonts/GlyphMetricsMap.h
@@ -57,6 +57,15 @@ public:
locatePage(glyph / GlyphMetricsPage::size)->setMetricsForGlyph(glyph, metrics);
}
+ size_t memoryUsageInBytes()
+ {
+ size_t totalValue = sizeof(*this);
+ if (m_pages) {
+ totalValue += m_pages->size() * sizeof(GlyphMetricsPage);
+ }
+ return totalValue;
+ }
+
private:
class GlyphMetricsPage {
USING_FAST_MALLOC(GlyphMetricsPage);
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/FontDataCache.cpp ('k') | third_party/WebKit/Source/platform/fonts/SimpleFontData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698