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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp

Issue 2533503002: Report decoded webfont blob size to memory-infra (Closed)
Patch Set: 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
Index: third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp b/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
index 80ab7182fa17877e15a4ff44ae72423604c8a43c..dfd6c4b14f9beca73d0b9d848b1864153802fbd6 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
@@ -44,8 +44,9 @@
namespace blink {
-FontCustomPlatformData::FontCustomPlatformData(sk_sp<SkTypeface> typeface)
- : m_typeface(typeface) {}
+FontCustomPlatformData::FontCustomPlatformData(sk_sp<SkTypeface> typeface,
+ size_t dataSize)
+ : m_typeface(typeface), m_dataSize(dataSize) {}
FontCustomPlatformData::~FontCustomPlatformData() {}
@@ -69,7 +70,8 @@ std::unique_ptr<FontCustomPlatformData> FontCustomPlatformData::create(
otsParseMessage = decoder.getErrorString();
return nullptr;
}
- return wrapUnique(new FontCustomPlatformData(std::move(typeface)));
+ return wrapUnique(
+ new FontCustomPlatformData(std::move(typeface), decoder.decodedSize()));
}
bool FontCustomPlatformData::supportsFormat(const String& format) {

Powered by Google App Engine
This is Rietveld 408576698