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

Side by Side Diff: skia/ext/SkFontHost_fontconfig_ipc.h

Issue 112074: Linux: Add support for chrooted renderers. (Closed)
Patch Set: Created 11 years, 6 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
OLDNEW
(Empty)
1 /* libs/graphics/ports/SkFontHost_fontconfig_direct.h
2 **
3 ** Copyright 2009, Google Inc.
4 **
5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at
8 **
9 ** http://www.apache.org/licenses/LICENSE-2.0
10 **
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 */
17
18 #ifndef FontConfigIPC_DEFINED
19 #define FontConfigIPC_DEFINED
20
21 // http://code.google.com/p/chromium/wiki/LinuxSandboxIPC
22
23 #include <map>
24 #include <string>
25
26 #include "SkFontHost_fontconfig_impl.h"
27
28 class FontConfigIPC : public FontConfigInterface {
29 public:
30 FontConfigIPC(int fd);
31 ~FontConfigIPC();
32
33 // FontConfigInterface implementation.
34 virtual bool Match(std::string* result_family, unsigned* result_fileid,
35 bool fileid_valid, unsigned fileid,
36 const std::string& family, int is_bold, int is_italic);
37 virtual int Open(unsigned fileid);
38
39 enum Method {
40 METHOD_MATCH = 0,
41 METHOD_OPEN = 1,
42 };
43
44 struct MatchRequest {
45 uint16_t method;
46 uint8_t fileid_valid;
47 uint32_t fileid;
48 int8_t is_bold;
49 int8_t is_italic;
50 uint8_t family_len;
51 // char family[0] follows.
52 };
53
54 struct MatchReply {
55 uint8_t result;
56 uint32_t result_fileid;
57 uint16_t filename_len;
58 // char filename[0] follows.
59 };
60
61 struct OpenRequest {
62 uint16_t method;
63 unsigned fileid;
64 };
65
66 struct OpenReply {
67 uint8_t result;
68 };
69
70 private:
71 const int fd_;
72 };
73
74 #endif // FontConfigIPC_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698