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

Side by Side Diff: gyp/ports.gyp

Issue 1184923002: Refactor SkFontHost_linux into SkFontMgr_custom. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Don't export embedded. Created 5 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
1 # Copyright 2015 Google Inc. 1 # Copyright 2015 Google Inc.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 # Port-specific Skia library code. 5 # Port-specific Skia library code.
6 { 6 {
7 'targets': [ 7 'targets': [
8 { 8 {
9 'target_name': 'ports', 9 'target_name': 'ports',
10 'product_name': 'skia_ports', 10 'product_name': 'skia_ports',
(...skipping 14 matching lines...) Expand all
25 '../src/sfnt', 25 '../src/sfnt',
26 '../src/utils', 26 '../src/utils',
27 ], 27 ],
28 'sources': [ 28 'sources': [
29 '../src/ports/SkDebug_stdio.cpp', 29 '../src/ports/SkDebug_stdio.cpp',
30 '../src/ports/SkDebug_win.cpp', 30 '../src/ports/SkDebug_win.cpp',
31 31
32 '../src/fonts/SkFontMgr_indirect.cpp', 32 '../src/fonts/SkFontMgr_indirect.cpp',
33 '../src/fonts/SkRemotableFontMgr.cpp', 33 '../src/fonts/SkRemotableFontMgr.cpp',
34 '../src/ports/SkFontHost_win.cpp', 34 '../src/ports/SkFontHost_win.cpp',
35 '../src/ports/SkFontMgr_default_gdi.cpp', 35 '../src/ports/SkFontMgr_custom_directory_factory.cpp',
36 '../src/ports/SkFontMgr_default_dw.cpp', 36 '../src/ports/SkFontMgr_custom_embedded_factory.cpp',
37 '../src/ports/SkFontMgr_win_dw.cpp', 37 '../src/ports/SkFontMgr_win_dw.cpp',
38 '../src/ports/SkFontMgr_win_dw_factory.cpp',
39 '../src/ports/SkFontMgr_win_gdi_factory.cpp',
38 '../src/ports/SkRemotableFontMgr_win_dw.cpp', 40 '../src/ports/SkRemotableFontMgr_win_dw.cpp',
39 '../src/ports/SkScalerContext_win_dw.cpp', 41 '../src/ports/SkScalerContext_win_dw.cpp',
40 '../src/ports/SkScalerContext_win_dw.h', 42 '../src/ports/SkScalerContext_win_dw.h',
41 '../src/ports/SkTypeface_win_dw.cpp', 43 '../src/ports/SkTypeface_win_dw.cpp',
42 '../src/ports/SkTypeface_win_dw.h', 44 '../src/ports/SkTypeface_win_dw.h',
43 45
44 '../src/ports/SkGlobalInitialization_default.cpp', 46 '../src/ports/SkGlobalInitialization_default.cpp',
45 '../src/ports/SkMemory_malloc.cpp', 47 '../src/ports/SkMemory_malloc.cpp',
46 '../src/ports/SkOSFile_posix.cpp', 48 '../src/ports/SkOSFile_posix.cpp',
47 '../src/ports/SkOSFile_stdio.cpp', 49 '../src/ports/SkOSFile_stdio.cpp',
48 '../src/ports/SkOSFile_win.cpp', 50 '../src/ports/SkOSFile_win.cpp',
49 '../src/ports/SkDiscardableMemory_none.cpp', 51 '../src/ports/SkDiscardableMemory_none.cpp',
50 '../src/ports/SkTime_Unix.cpp', 52 '../src/ports/SkTime_Unix.cpp',
51 '../src/ports/SkTime_win.cpp', 53 '../src/ports/SkTime_win.cpp',
52 '../src/ports/SkTLS_pthread.cpp', 54 '../src/ports/SkTLS_pthread.cpp',
53 '../src/ports/SkTLS_win.cpp', 55 '../src/ports/SkTLS_win.cpp',
54 56
55 '../include/ports/SkFontConfigInterface.h', 57 '../include/ports/SkFontConfigInterface.h',
56 '../include/ports/SkFontMgr.h', 58 '../include/ports/SkFontMgr.h',
57 '../include/ports/SkFontMgr_indirect.h', 59 '../include/ports/SkFontMgr_indirect.h',
58 '../include/ports/SkRemotableFontMgr.h', 60 '../include/ports/SkRemotableFontMgr.h',
59 ], 61 ],
62 'sources/': [
63 ['exclude', 'SkFontMgr_.+_factory\\.cpp$'],
64 ],
60 'conditions': [ 65 'conditions': [
61 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos", "an droid"]', { 66 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos", "an droid"]', {
62 'sources': [ 67 'sources': [
63 '../src/ports/SkFontHost_FreeType.cpp', 68 '../src/ports/SkFontHost_FreeType.cpp',
64 '../src/ports/SkFontHost_FreeType_common.cpp', 69 '../src/ports/SkFontHost_FreeType_common.cpp',
65 ], 70 ],
66 'dependencies': [ 71 'dependencies': [
67 'freetype.gyp:freetype', 72 'freetype.gyp:freetype',
68 ], 73 ],
69 }], 74 }],
70 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', { 75 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
71 'conditions': [ 76 'conditions': [
72 [ 'skia_embedded_fonts', { 77 [ 'skia_embedded_fonts', {
73 'link_settings': { 78 'link_settings': {
74 'libraries': [ 79 'libraries': [
75 '-ldl', 80 '-ldl',
76 ], 81 ],
77 }, 82 },
78 'variables': { 83 'variables': {
79 'embedded_font_data_identifier': 'sk_fonts', 84 'embedded_font_data_identifier': 'sk_fonts',
80 'fonts_to_include': [ 85 'fonts_to_include': [
81 '../resources/fonts/Funkster.ttf', 86 '../resources/fonts/Funkster.ttf',
82 ], 87 ],
83 }, 88 },
84 'sources': [ 89 'sources': [
85 '../src/ports/SkFontHost_linux.cpp', 90 '../include/ports/SkFontMgr_custom.h',
91 '../src/ports/SkFontMgr_custom.cpp',
86 ], 92 ],
93 'sources/': [['include', '../src/ports/SkFontMgr_custom_embedded_f actory.cpp']],
87 'actions': [{ 94 'actions': [{
88 'action_name': 'generate_embedded_font_data', 95 'action_name': 'generate_embedded_font_data',
89 'inputs': [ 96 'inputs': [
90 '../tools/embed_resources.py', 97 '../tools/embed_resources.py',
91 '<@(fonts_to_include)', 98 '<@(fonts_to_include)',
92 ], 99 ],
93 'outputs': [ 100 'outputs': [
94 '<(SHARED_INTERMEDIATE_DIR)/ports/fonts/fonts.cpp', 101 '<(SHARED_INTERMEDIATE_DIR)/ports/fonts/fonts.cpp',
95 ], 102 ],
96 'action': ['python', '../tools/embed_resources.py', 103 'action': ['python', '../tools/embed_resources.py',
97 '--align', '4', 104 '--align', '4',
98 '--name', '<(embedded_font_data_identifier) ', 105 '--name', '<(embedded_font_data_identifier) ',
99 '--input', '<@(fonts_to_include)', 106 '--input', '<@(fonts_to_include)',
100 '--output', '<@(_outputs)', 107 '--output', '<@(_outputs)',
101 ], 108 ],
102 'message': 'Generating <@(_outputs)', 109 'message': 'Generating <@(_outputs)',
103 'process_outputs_as_sources': 1, 110 'process_outputs_as_sources': 1,
104 }], 111 }],
105 'defines': [ 112 'defines': [
106 'SK_EMBEDDED_FONTS=<(embedded_font_data_identifier)', 113 'SK_EMBEDDED_FONTS=<(embedded_font_data_identifier)',
107 ], 114 ],
108 }, 'skia_no_fontconfig', { 115 }, 'skia_no_fontconfig', {
109 'link_settings': { 116 'link_settings': {
110 'libraries': [ 117 'libraries': [
111 '-ldl', 118 '-ldl',
112 ], 119 ],
113 }, 120 },
114 'sources': [ 121 'sources': [
115 '../src/ports/SkFontHost_linux.cpp', 122 '../include/ports/SkFontMgr_custom.h',
123 '../src/ports/SkFontMgr_custom.cpp',
116 ], 124 ],
125 'sources/': [['include', '../src/ports/SkFontMgr_custom_directory_ factory.cpp']],
117 }, { 126 }, {
118 'link_settings': { 127 'link_settings': {
119 'libraries': [ 128 'libraries': [
120 '-lfontconfig', 129 '-lfontconfig',
121 '-ldl', 130 '-ldl',
122 ], 131 ],
123 }, 132 },
124 'sources': [ 133 'sources': [
125 '../src/ports/SkFontMgr_fontconfig.cpp', 134 '../src/ports/SkFontMgr_fontconfig.cpp',
126 '../src/ports/SkFontHost_fontconfig.cpp', 135 '../src/ports/SkFontHost_fontconfig.cpp',
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 ], 170 ],
162 'sources!': [ # these are used everywhere but windows 171 'sources!': [ # these are used everywhere but windows
163 '../src/ports/SkDebug_stdio.cpp', 172 '../src/ports/SkDebug_stdio.cpp',
164 '../src/ports/SkOSFile_posix.cpp', 173 '../src/ports/SkOSFile_posix.cpp',
165 '../src/ports/SkTime_Unix.cpp', 174 '../src/ports/SkTime_Unix.cpp',
166 '../src/ports/SkTLS_pthread.cpp', 175 '../src/ports/SkTLS_pthread.cpp',
167 ], 176 ],
168 'conditions': [ 177 'conditions': [
169 # when we build for win, we only want one of these default files 178 # when we build for win, we only want one of these default files
170 [ 'skia_gdi', { 179 [ 'skia_gdi', {
171 'sources!': [ 180 'sources/': [['include', '../src/ports/SkFontMgr_win_gdi_factory.c pp']],
172 '../src/ports/SkFontMgr_default_dw.cpp',
173 ],
174 }, { # normally default to direct write 181 }, { # normally default to direct write
175 'sources!': [ 182 'sources/': [['include', '../src/ports/SkFontMgr_win_dw_factory.cp p']],
176 '../src/ports/SkFontMgr_default_gdi.cpp',
177 ],
178 }], 183 }],
179 ], 184 ],
180 }, { # else !win 185 }, { # else !win
181 'sources!': [ 186 'sources!': [
182 '../src/ports/SkDebug_win.cpp', 187 '../src/ports/SkDebug_win.cpp',
183 '../src/ports/SkFontHost_win.cpp', 188 '../src/ports/SkFontHost_win.cpp',
184 '../src/ports/SkFontMgr_default_gdi.cpp',
185 '../src/ports/SkFontMgr_default_dw.cpp',
186 '../src/ports/SkFontMgr_win_dw.cpp', 189 '../src/ports/SkFontMgr_win_dw.cpp',
187 '../src/ports/SkOSFile_win.cpp', 190 '../src/ports/SkOSFile_win.cpp',
188 '../src/ports/SkRemotableFontMgr_win_dw.cpp', 191 '../src/ports/SkRemotableFontMgr_win_dw.cpp',
189 '../src/ports/SkTime_win.cpp', 192 '../src/ports/SkTime_win.cpp',
190 '../src/ports/SkTLS_win.cpp', 193 '../src/ports/SkTLS_win.cpp',
191 '../src/ports/SkScalerContext_win_dw.cpp', 194 '../src/ports/SkScalerContext_win_dw.cpp',
192 '../src/ports/SkScalerContext_win_dw.h', 195 '../src/ports/SkScalerContext_win_dw.h',
193 '../src/ports/SkTypeface_win_dw.cpp', 196 '../src/ports/SkTypeface_win_dw.cpp',
194 '../src/ports/SkTypeface_win_dw.h', 197 '../src/ports/SkTypeface_win_dw.h',
195 ], 198 ],
(...skipping 13 matching lines...) Expand all
209 }], 212 }],
210 ], 213 ],
211 'direct_dependent_settings': { 214 'direct_dependent_settings': {
212 'include_dirs': [ 215 'include_dirs': [
213 '../include/ports', 216 '../include/ports',
214 ], 217 ],
215 }, 218 },
216 }, 219 },
217 ], 220 ],
218 } 221 }
OLDNEW
« no previous file with comments | « no previous file | include/ports/SkFontMgr_custom.h » ('j') | src/ports/SkFontMgr_custom_embedded_factory.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698