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

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

Issue 2130683002: [Experiment] purge-and-suspend Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated 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/FontPlatformData.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp b/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
index e6f42cb4a1f9505f00dca43dee4d939932aa7e01..c01ef7a68093d0a786e22ee2c4738eb5dce6aede 100644
--- a/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
@@ -346,4 +346,10 @@ PassRefPtr<SharedBuffer> FontPlatformData::openTypeTable(SkFontTableTag tag) con
return buffer.release();
}
+void FontPlatformData::purgeMemory()
+{
+ m_typeface = nullptr; // dangerous?
+ m_harfBuzzFace = nullptr;
esprehn 2016/08/05 23:00:58 Are we sure this is safe? drott@'s comments on the
tasak 2016/08/08 04:47:36 Acknowledged. I think, drott@ is reducing tons of
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698