summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/render_process_host_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/renderer_host/render_process_host_impl.cc')
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc36
1 files changed, 3 insertions, 33 deletions
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index f117ebb..69d34d5 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -175,17 +175,11 @@
#endif
#if defined(OS_WIN)
-#include "base/memory/shared_memory.h"
-#include "base/strings/string16.h"
-#include "base/strings/string_number_conversions.h"
#include "base/win/scoped_com_initializer.h"
-#include "base/win/scoped_handle.h"
#include "base/win/windows_version.h"
#include "content/common/font_cache_dispatcher_win.h"
#include "content/common/sandbox_win.h"
-#include "content/public/common/dwrite_font_platform_win.h"
#include "sandbox/win/src/sandbox_policy.h"
-#include "ui/gfx/win/direct_write.h"
#include "ui/gfx/win/dpi.h"
#endif
@@ -1204,6 +1198,9 @@ void RenderProcessHostImpl::AppendRendererCommandLine(
#if defined(OS_WIN)
command_line->AppendSwitchASCII(switches::kDeviceScaleFactor,
base::DoubleToString(gfx::GetDPIScale()));
+ command_line->AppendSwitchASCII(
+ switches::kFontCacheSharedMemSuffix,
+ base::UintToString(base::GetCurrentProcId()));
#endif
AppendCompositorCommandLineFlags(command_line);
@@ -2342,9 +2339,6 @@ void RenderProcessHostImpl::OnProcessLaunched() {
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"465841 "
"RenderProcessHostImpl::OnProcessLaunched::SendQueuedMessages"));
-
- PlatformProcessLaunched();
-
while (!queued_messages_.empty()) {
Send(queued_messages_.front());
queued_messages_.pop();
@@ -2502,28 +2496,4 @@ void RenderProcessHostImpl::GetAudioOutputControllers(
audio_renderer_host()->GetOutputControllers(callback);
}
-#if !defined(OS_WIN)
-void RenderProcessHostImpl::PlatformProcessLaunched() {}
-#else
-void RenderProcessHostImpl::PlatformProcessLaunched() {
- // If DirectWrite is enabled for font rendering then this function sends the
- // font cache section handle to the renderer process. If the handle is not
- // available (which could happen if we are launched as part of content, or
- // because the cache is not available yet), then we send a NULL section handle
- // to the renderer which ensures that the DirectWrite factory is initialized
- // correctly.
- if (!run_renderer_in_process() && gfx::win::ShouldUseDirectWrite()) {
- std::string name(content::kFontCacheSharedSectionName);
- name.append(base::UintToString(base::GetCurrentProcId()));
- base::SharedMemory font_cache_section;
- base::SharedMemoryHandle mapped_handle = NULL;
- if (font_cache_section.Open(name, true)) {
- font_cache_section.ShareReadOnlyToProcess(GetHandle(), &mapped_handle);
- DCHECK(mapped_handle);
- }
- Send(new ViewMsg_DirectWriteFontCacheSectionHandle(mapped_handle));
- }
-}
-#endif
-
} // namespace content