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

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

Issue 2178883002: Added purge method to SimpleFontData and PlatformFontData. (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/FontPlatformData.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp b/third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
index e6f42cb4a1f9505f00dca43dee4d939932aa7e01..b2014bda4d0931439517c70062440b3eba60489c 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;
drott 2016/07/25 12:28:07 I don't think this is safe at the moment.
+ m_harfBuzzFace = nullptr;
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/FontPlatformData.h ('k') | third_party/WebKit/Source/platform/fonts/SimpleFontData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698