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

Unified Diff: chrome/utility/chrome_content_utility_client.cc

Issue 7866019: New implementation of font precache on Windows. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Update per code review Created 9 years, 3 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: chrome/utility/chrome_content_utility_client.cc
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc
index 2f1b8958fa211ed54b50d0721c8c7d1730330658..e89a909d47ca7e5aa1bcfa357cf0b28507142f97 100644
--- a/chrome/utility/chrome_content_utility_client.cc
+++ b/chrome/utility/chrome_content_utility_client.cc
@@ -223,8 +223,12 @@ DWORD WINAPI UtilityProcess_GetFontDataPatch(
if (GetObject(font, sizeof(LOGFONT), &logfont)) {
std::vector<char> font_data;
if (UtilityThread::current()->Send(
- new ChromeUtilityHostMsg_PreCacheFont(logfont)))
+ new ChromeUtilityHostMsg_PreCacheFont(logfont,
+ GetCurrentProcessId()))) {
rv = GetFontData(hdc, table, offset, buffer, length);
+ UtilityThread::current()->Send(
+ new ChromeUtilityHostMsg_ReleaseCachedFonts(GetCurrentProcessId()));
+ }
}
}
return rv;

Powered by Google App Engine
This is Rietveld 408576698