Chromium Code Reviews| Index: content/browser/renderer_host/render_message_filter.cc |
| diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc |
| index f552a8fef351a0d5a16628db927a1a25d8ba4d98..4c926ede023a202d57c2d4d84f9bbe2b75fd549b 100644 |
| --- a/content/browser/renderer_host/render_message_filter.cc |
| +++ b/content/browser/renderer_host/render_message_filter.cc |
| @@ -217,9 +217,6 @@ bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message) { |
| OnGetAudioHardwareConfig) |
| #if defined(OS_MACOSX) |
| IPC_MESSAGE_HANDLER_DELAY_REPLY(RenderProcessHostMsg_LoadFont, OnLoadFont) |
| -#elif defined(OS_WIN) |
| - IPC_MESSAGE_HANDLER(RenderProcessHostMsg_PreCacheFontCharacters, |
| - OnPreCacheFontCharacters) |
| #endif |
| IPC_MESSAGE_HANDLER(ViewHostMsg_MediaLogEvents, OnMediaLogEvents) |
| IPC_MESSAGE_UNHANDLED(handled = false) |
| @@ -345,42 +342,7 @@ void RenderMessageFilter::SendLoadFontReply(IPC::Message* reply, |
| Send(reply); |
| } |
| -#elif defined(OS_WIN) |
| - |
| -void RenderMessageFilter::OnPreCacheFontCharacters( |
| - const LOGFONT& font, |
| - const base::string16& str) { |
| - // TODO(scottmg): pdf/ppapi still require the renderer to be able to precache |
| - // GDI fonts (http://crbug.com/383227), even when using DirectWrite. |
| - // Eventually this shouldn't be added and should be moved to |
| - // FontCacheDispatcher too. http://crbug.com/356346. |
|
Charlie Reis
2016/06/30 18:38:41
Can http://crbug.com/356346 be marked fixed after
Lei Zhang
2016/06/30 22:29:34
scottmg: ^
scottmg
2016/06/30 22:31:53
Who filed that useless bug? Yeah, I'd say so.
|
| - |
| - // First, comments from FontCacheDispatcher::OnPreCacheFont do apply here too. |
| - // Except that for True Type fonts, |
| - // GetTextMetrics will not load the font in memory. |
| - // The only way windows seem to load properly, it is to create a similar |
| - // device (like the one in which we print), then do an ExtTextOut, |
| - // as we do in the printing thread, which is sandboxed. |
| - HDC hdc = CreateEnhMetaFile(NULL, NULL, NULL, NULL); |
| - HFONT font_handle = CreateFontIndirect(&font); |
| - DCHECK(NULL != font_handle); |
| - |
| - HGDIOBJ old_font = SelectObject(hdc, font_handle); |
| - DCHECK(NULL != old_font); |
| - |
| - ExtTextOut(hdc, 0, 0, ETO_GLYPH_INDEX, 0, str.c_str(), str.length(), NULL); |
| - |
| - SelectObject(hdc, old_font); |
| - DeleteObject(font_handle); |
| - |
| - HENHMETAFILE metafile = CloseEnhMetaFile(hdc); |
| - |
| - if (metafile) |
| - DeleteEnhMetaFile(metafile); |
| -} |
| - |
| - |
| -#endif // OS_* |
| +#endif // defined(OS_MACOSX) |
| void RenderMessageFilter::AllocateSharedMemoryOnFileThread( |
| uint32_t buffer_size, |