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

Side by Side Diff: content/browser/renderer_host/render_message_filter.cc

Issue 209163002: Support DirectWrite with sandbox on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use SHGetFolderPath instead of SHGetKnownFolderPath for xp Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/base_paths_win.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_message_filter.h" 5 #include "content/browser/renderer_host/render_message_filter.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 #else 77 #else
78 #include "gpu/GLES2/gl2extchromium.h" 78 #include "gpu/GLES2/gl2extchromium.h"
79 #include "third_party/khronos/GLES2/gl2.h" 79 #include "third_party/khronos/GLES2/gl2.h"
80 #include "third_party/khronos/GLES2/gl2ext.h" 80 #include "third_party/khronos/GLES2/gl2ext.h"
81 #endif 81 #endif
82 #if defined(OS_POSIX) 82 #if defined(OS_POSIX)
83 #include "base/file_descriptor_posix.h" 83 #include "base/file_descriptor_posix.h"
84 #endif 84 #endif
85 #if defined(OS_WIN) 85 #if defined(OS_WIN)
86 #include "content/common/font_cache_dispatcher_win.h" 86 #include "content/common/font_cache_dispatcher_win.h"
87 #include "content/common/sandbox_win.h"
87 #endif 88 #endif
88 #if defined(OS_ANDROID) 89 #if defined(OS_ANDROID)
89 #include "media/base/android/webaudio_media_codec_bridge.h" 90 #include "media/base/android/webaudio_media_codec_bridge.h"
90 #endif 91 #endif
91 92
92 using net::CookieStore; 93 using net::CookieStore;
93 94
94 namespace content { 95 namespace content {
95 namespace { 96 namespace {
96 97
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 return; 1195 return;
1195 } 1196 }
1196 1197
1197 GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs( 1198 GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs(
1198 top_origin_url, guilt); 1199 top_origin_url, guilt);
1199 } 1200 }
1200 1201
1201 #if defined(OS_WIN) 1202 #if defined(OS_WIN)
1202 void RenderMessageFilter::OnPreCacheFontCharacters(const LOGFONT& font, 1203 void RenderMessageFilter::OnPreCacheFontCharacters(const LOGFONT& font,
1203 const base::string16& str) { 1204 const base::string16& str) {
1205 if (!ShouldUseDirectWrite())
cpu_(ooo_6.6-7.5) 2014/03/25 20:47:31 add todo here to unify this in the filter.
1206 return;
1204 // First, comments from FontCacheDispatcher::OnPreCacheFont do apply here too. 1207 // First, comments from FontCacheDispatcher::OnPreCacheFont do apply here too.
1205 // Except that for True Type fonts, 1208 // Except that for True Type fonts,
1206 // GetTextMetrics will not load the font in memory. 1209 // GetTextMetrics will not load the font in memory.
1207 // The only way windows seem to load properly, it is to create a similar 1210 // The only way windows seem to load properly, it is to create a similar
1208 // device (like the one in which we print), then do an ExtTextOut, 1211 // device (like the one in which we print), then do an ExtTextOut,
1209 // as we do in the printing thread, which is sandboxed. 1212 // as we do in the printing thread, which is sandboxed.
1210 HDC hdc = CreateEnhMetaFile(NULL, NULL, NULL, NULL); 1213 HDC hdc = CreateEnhMetaFile(NULL, NULL, NULL, NULL);
1211 HFONT font_handle = CreateFontIndirect(&font); 1214 HFONT font_handle = CreateFontIndirect(&font);
1212 DCHECK(NULL != font_handle); 1215 DCHECK(NULL != font_handle);
1213 1216
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 } 1315 }
1313 1316
1314 // Fallback to fake GpuMemoryBuffer that is backed by shared memory and 1317 // Fallback to fake GpuMemoryBuffer that is backed by shared memory and
1315 // requires an upload before it can be used as a texture. 1318 // requires an upload before it can be used as a texture.
1316 handle->type = gfx::SHARED_MEMORY_BUFFER; 1319 handle->type = gfx::SHARED_MEMORY_BUFFER;
1317 ChildProcessHostImpl::AllocateSharedMemory( 1320 ChildProcessHostImpl::AllocateSharedMemory(
1318 static_cast<size_t>(buffer_size), PeerHandle(), &handle->handle); 1321 static_cast<size_t>(buffer_size), PeerHandle(), &handle->handle);
1319 } 1322 }
1320 1323
1321 } // namespace content 1324 } // namespace content
OLDNEW
« no previous file with comments | « base/base_paths_win.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698