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

Side by Side Diff: content/common/font_config_ipc_linux.h

Issue 873213003: Revert of Fix for the font files being maped multiple times (Fontconfig). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | content/common/font_config_ipc_linux.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 #ifndef CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_ 5 #ifndef CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_
6 #define CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_ 6 #define CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/containers/hash_tables.h"
10 #include "base/synchronization/lock.h"
11 #include "third_party/skia/include/ports/SkFontConfigInterface.h" 9 #include "third_party/skia/include/ports/SkFontConfigInterface.h"
12 10
13 #include <string> 11 #include <string>
14 12
15 namespace content { 13 namespace content {
16 14
17 // FontConfig implementation for Skia that proxies out of process to get out 15 // FontConfig implementation for Skia that proxies out of process to get out
18 // of the sandbox. See http://code.google.com/p/chromium/wiki/LinuxSandboxIPC 16 // of the sandbox. See http://code.google.com/p/chromium/wiki/LinuxSandboxIPC
19 class FontConfigIPC : public SkFontConfigInterface { 17 class FontConfigIPC : public SkFontConfigInterface {
20 public: 18 public:
(...skipping 11 matching lines...) Expand all
32 enum Method { 30 enum Method {
33 METHOD_MATCH = 0, 31 METHOD_MATCH = 0,
34 METHOD_OPEN = 1, 32 METHOD_OPEN = 1,
35 }; 33 };
36 34
37 enum { 35 enum {
38 kMaxFontFamilyLength = 2048 36 kMaxFontFamilyLength = 2048
39 }; 37 };
40 38
41 private: 39 private:
42 class MappedFontFile;
43
44 // Removes |mapped_font_file| from |mapped_font_files_|.
45 // Does not delete the passed-in object.
46 void RemoveMappedFontFile(MappedFontFile* mapped_font_file);
47
48 const int fd_; 40 const int fd_;
49 // Lock preventing multiple threads from opening font file and accessing
50 // |mapped_font_files_| map at the same time.
51 base::Lock lock_;
52 // Maps font identity ID to the memory-mapped file with font data.
53 base::hash_map<uint32_t, MappedFontFile*> mapped_font_files_;
54 }; 41 };
55 42
56 } // namespace content 43 } // namespace content
57 44
58 #endif // CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_ 45 #endif // CONTENT_COMMON_FONT_CONFIG_IPC_LINUX_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/font_config_ipc_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698