OLD | NEW |
1 # Gyp file for opts projects | 1 # Gyp file for opts projects |
2 { | 2 { |
3 'targets': [ | 3 'targets': [ |
4 # Due to an unfortunate intersection of lameness between gcc and gyp, | 4 # Due to an unfortunate intersection of lameness between gcc and gyp, |
5 # we have to build the *_SSE2.cpp files in a separate target. The | 5 # we have to build the *_SSE2.cpp files in a separate target. The |
6 # gcc lameness is that, in order to compile SSE2 intrinsics code, it | 6 # gcc lameness is that, in order to compile SSE2 intrinsics code, it |
7 # must be passed the -msse2 flag. However, with this flag, it may | 7 # must be passed the -msse2 flag. However, with this flag, it may |
8 # emit SSE2 instructions even for scalar code, such as the CPUID | 8 # emit SSE2 instructions even for scalar code, such as the CPUID |
9 # test used to test for the presence of SSE2. So that, and all other | 9 # test used to test for the presence of SSE2. So that, and all other |
10 # code must be compiled *without* -msse2. The gyp lameness is that it | 10 # code must be compiled *without* -msse2. The gyp lameness is that it |
(...skipping 13 matching lines...) Expand all Loading... |
24 'product_name': 'skia_opts', | 24 'product_name': 'skia_opts', |
25 'type': 'static_library', | 25 'type': 'static_library', |
26 'standalone_static_library': 1, | 26 'standalone_static_library': 1, |
27 'dependencies': [ | 27 'dependencies': [ |
28 'core.gyp:*', | 28 'core.gyp:*', |
29 'effects.gyp:*' | 29 'effects.gyp:*' |
30 ], | 30 ], |
31 'include_dirs': [ | 31 'include_dirs': [ |
32 '../src/core', | 32 '../src/core', |
33 '../src/opts', | 33 '../src/opts', |
| 34 '../src/utils', |
34 ], | 35 ], |
35 'conditions': [ | 36 'conditions': [ |
36 [ 'skia_arch_type == "x86" and skia_os != "ios"', { | 37 [ 'skia_arch_type == "x86" and skia_os != "ios"', { |
37 'conditions': [ | 38 'conditions': [ |
38 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "ch
romeos", "android"]', { | 39 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "ch
romeos", "android"]', { |
39 'cflags': [ | 40 'cflags': [ |
40 '-msse2', | 41 '-msse2', |
41 ], | 42 ], |
42 }], | 43 }], |
43 ], | 44 ], |
44 'include_dirs': [ | 45 'include_dirs': [ |
45 '../include/utils', | 46 '../include/utils', |
46 ], | 47 ], |
47 'dependencies': [ | 48 'dependencies': [ |
48 'opts_ssse3', | 49 'opts_ssse3', |
49 'opts_sse4', | 50 'opts_sse4', |
50 ], | 51 ], |
51 'sources': [ | 52 'sources': [ |
52 '../src/opts/opts_check_x86.cpp', | 53 '../src/opts/opts_check_x86.cpp', |
53 '../src/opts/SkBitmapProcState_opts_SSE2.cpp', | 54 '../src/opts/SkBitmapProcState_opts_SSE2.cpp', |
54 '../src/opts/SkBitmapFilter_opts_SSE2.cpp', | 55 '../src/opts/SkBitmapFilter_opts_SSE2.cpp', |
55 '../src/opts/SkBlitRow_opts_SSE2.cpp', | 56 '../src/opts/SkBlitRow_opts_SSE2.cpp', |
56 '../src/opts/SkBlitRect_opts_SSE2.cpp', | 57 '../src/opts/SkBlitRect_opts_SSE2.cpp', |
57 '../src/opts/SkBlurImage_opts_SSE2.cpp', | 58 '../src/opts/SkBlurImage_opts_SSE2.cpp', |
58 '../src/opts/SkMorphology_opts_SSE2.cpp', | 59 '../src/opts/SkMorphology_opts_SSE2.cpp', |
| 60 '../src/opts/SkTextureCompression_opts_none.cpp', |
59 '../src/opts/SkUtils_opts_SSE2.cpp', | 61 '../src/opts/SkUtils_opts_SSE2.cpp', |
60 '../src/opts/SkXfermode_opts_SSE2.cpp', | 62 '../src/opts/SkXfermode_opts_SSE2.cpp', |
61 ], | 63 ], |
62 }], | 64 }], |
63 [ 'skia_arch_type == "arm" and arm_version >= 7', { | 65 [ 'skia_arch_type == "arm" and arm_version >= 7', { |
64 # The assembly uses the frame pointer register (r7 in Thumb/r11 in | 66 # The assembly uses the frame pointer register (r7 in Thumb/r11 in |
65 # ARM), the compiler doesn't like that. | 67 # ARM), the compiler doesn't like that. |
66 'cflags!': [ | 68 'cflags!': [ |
67 '-fno-omit-frame-pointer', | 69 '-fno-omit-frame-pointer', |
68 '-mapcs-frame', | 70 '-mapcs-frame', |
69 '-mapcs', | 71 '-mapcs', |
70 ], | 72 ], |
71 'cflags': [ | 73 'cflags': [ |
72 '-fomit-frame-pointer', | 74 '-fomit-frame-pointer', |
73 '-mno-apcs-frame', | 75 '-mno-apcs-frame', |
74 ], | 76 ], |
75 'variables': { | 77 'variables': { |
76 'arm_neon_optional%': '<(arm_neon_optional>', | 78 'arm_neon_optional%': '<(arm_neon_optional>', |
77 }, | 79 }, |
78 'sources': [ | 80 'sources': [ |
79 '../src/opts/memset.arm.S', | 81 '../src/opts/memset.arm.S', |
80 '../src/opts/SkBitmapProcState_opts_arm.cpp', | 82 '../src/opts/SkBitmapProcState_opts_arm.cpp', |
81 '../src/opts/SkBlitMask_opts_arm.cpp', | 83 '../src/opts/SkBlitMask_opts_arm.cpp', |
82 '../src/opts/SkBlitRow_opts_arm.cpp', | 84 '../src/opts/SkBlitRow_opts_arm.cpp', |
83 '../src/opts/SkBlurImage_opts_arm.cpp', | 85 '../src/opts/SkBlurImage_opts_arm.cpp', |
84 '../src/opts/SkMorphology_opts_arm.cpp', | 86 '../src/opts/SkMorphology_opts_arm.cpp', |
| 87 '../src/opts/SkTextureCompression_opts_arm.cpp', |
85 '../src/opts/SkUtils_opts_arm.cpp', | 88 '../src/opts/SkUtils_opts_arm.cpp', |
86 '../src/opts/SkXfermode_opts_arm.cpp', | 89 '../src/opts/SkXfermode_opts_arm.cpp', |
87 ], | 90 ], |
88 'conditions': [ | 91 'conditions': [ |
89 [ 'arm_neon == 1 or arm_neon_optional == 1', { | 92 [ 'arm_neon == 1 or arm_neon_optional == 1', { |
90 'dependencies': [ | 93 'dependencies': [ |
91 'opts_neon', | 94 'opts_neon', |
92 ] | 95 ] |
93 }], | 96 }], |
94 [ 'skia_os == "ios"', { | 97 [ 'skia_os == "ios"', { |
95 'sources!': [ | 98 'sources!': [ |
96 # these fail to compile under xcode for ios | 99 # these fail to compile under xcode for ios |
97 '../src/opts/memset.arm.S', | 100 '../src/opts/memset.arm.S', |
98 '../src/opts/SkBitmapProcState_opts_arm.cpp', | 101 '../src/opts/SkBitmapProcState_opts_arm.cpp', |
99 '../src/opts/SkBlitRow_opts_arm.cpp', | 102 '../src/opts/SkBlitRow_opts_arm.cpp', |
100 ], | 103 ], |
101 }], | 104 }], |
102 ], | 105 ], |
103 }], | 106 }], |
104 [ 'skia_arch_type == "mips"', { | 107 [ 'skia_arch_type == "mips"', { |
105 'sources': [ | 108 'sources': [ |
106 '../src/opts/SkBlitMask_opts_none.cpp', | 109 '../src/opts/SkBlitMask_opts_none.cpp', |
107 '../src/opts/SkBlurImage_opts_none.cpp', | 110 '../src/opts/SkBlurImage_opts_none.cpp', |
108 '../src/opts/SkMorphology_opts_none.cpp', | 111 '../src/opts/SkMorphology_opts_none.cpp', |
109 '../src/opts/SkUtils_opts_none.cpp', | 112 '../src/opts/SkUtils_opts_none.cpp', |
| 113 '../src/opts/SkTextureCompression_opts_none.cpp', |
110 '../src/opts/SkXfermode_opts_none.cpp', | 114 '../src/opts/SkXfermode_opts_none.cpp', |
111 ], | 115 ], |
112 'conditions': [ | 116 'conditions': [ |
113 [ '(mips_arch_variant == "mips32r2") \ | 117 [ '(mips_arch_variant == "mips32r2") \ |
114 and (mips_dsp == 1 or mips_dsp == 2)', { | 118 and (mips_dsp == 1 or mips_dsp == 2)', { |
115 'sources': [ | 119 'sources': [ |
116 '../src/opts/SkBitmapProcState_opts_mips_dsp.cpp', | 120 '../src/opts/SkBitmapProcState_opts_mips_dsp.cpp', |
117 '../src/opts/SkBlitRow_opts_mips_dsp.cpp', | 121 '../src/opts/SkBlitRow_opts_mips_dsp.cpp', |
118 ], | 122 ], |
119 }, { | 123 }, { |
120 'sources': [ | 124 'sources': [ |
121 '../src/opts/SkBitmapProcState_opts_none.cpp', | 125 '../src/opts/SkBitmapProcState_opts_none.cpp', |
122 '../src/opts/SkBlitRow_opts_none.cpp', | 126 '../src/opts/SkBlitRow_opts_none.cpp', |
123 ], | 127 ], |
124 }], | 128 }], |
125 ], | 129 ], |
126 }], | 130 }], |
127 [ '(skia_arch_type == "arm" and arm_version < 7) \ | 131 [ '(skia_arch_type == "arm" and arm_version < 7) \ |
128 or (skia_os == "ios") \ | 132 or (skia_os == "ios") \ |
129 or (skia_os == "android" and skia_arch_type not in ["x86", "arm", "m
ips", "arm64"])', { | 133 or (skia_os == "android" and skia_arch_type not in ["x86", "arm", "m
ips", "arm64"])', { |
130 'sources': [ | 134 'sources': [ |
131 '../src/opts/SkBitmapProcState_opts_none.cpp', | 135 '../src/opts/SkBitmapProcState_opts_none.cpp', |
132 '../src/opts/SkBlitMask_opts_none.cpp', | 136 '../src/opts/SkBlitMask_opts_none.cpp', |
133 '../src/opts/SkBlitRow_opts_none.cpp', | 137 '../src/opts/SkBlitRow_opts_none.cpp', |
134 '../src/opts/SkBlurImage_opts_none.cpp', | 138 '../src/opts/SkBlurImage_opts_none.cpp', |
135 '../src/opts/SkMorphology_opts_none.cpp', | 139 '../src/opts/SkMorphology_opts_none.cpp', |
136 '../src/opts/SkUtils_opts_none.cpp', | 140 '../src/opts/SkUtils_opts_none.cpp', |
| 141 '../src/opts/SkTextureCompression_opts_none.cpp', |
137 '../src/opts/SkXfermode_opts_none.cpp', | 142 '../src/opts/SkXfermode_opts_none.cpp', |
138 ], | 143 ], |
139 }], | 144 }], |
140 [ 'skia_android_framework', { | 145 [ 'skia_android_framework', { |
141 'cflags!': [ | 146 'cflags!': [ |
142 '-msse2', | 147 '-msse2', |
143 '-mfpu=neon', | 148 '-mfpu=neon', |
144 '-fomit-frame-pointer', | 149 '-fomit-frame-pointer', |
145 '-mno-apcs-frame', | 150 '-mno-apcs-frame', |
146 ] | 151 ] |
147 }], | 152 }], |
148 [ 'skia_arch_type == "arm64"', { | 153 [ 'skia_arch_type == "arm64"', { |
149 'sources': [ | 154 'sources': [ |
150 '../src/opts/SkBitmapProcState_arm_neon.cpp', | 155 '../src/opts/SkBitmapProcState_arm_neon.cpp', |
151 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp', | 156 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp', |
152 '../src/opts/SkBitmapProcState_opts_arm.cpp', | 157 '../src/opts/SkBitmapProcState_opts_arm.cpp', |
153 '../src/opts/SkBlitMask_opts_arm.cpp', | 158 '../src/opts/SkBlitMask_opts_arm.cpp', |
154 '../src/opts/SkBlitMask_opts_arm_neon.cpp', | 159 '../src/opts/SkBlitMask_opts_arm_neon.cpp', |
155 '../src/opts/SkBlitRow_opts_arm.cpp', | 160 '../src/opts/SkBlitRow_opts_arm.cpp', |
156 '../src/opts/SkBlitRow_opts_arm_neon.cpp', | 161 '../src/opts/SkBlitRow_opts_arm_neon.cpp', |
157 '../src/opts/SkBlurImage_opts_arm.cpp', | 162 '../src/opts/SkBlurImage_opts_arm.cpp', |
158 '../src/opts/SkBlurImage_opts_neon.cpp', | 163 '../src/opts/SkBlurImage_opts_neon.cpp', |
159 '../src/opts/SkMorphology_opts_arm.cpp', | 164 '../src/opts/SkMorphology_opts_arm.cpp', |
160 '../src/opts/SkMorphology_opts_neon.cpp', | 165 '../src/opts/SkMorphology_opts_neon.cpp', |
| 166 '../src/opts/SkTextureCompression_opts_none.cpp', |
161 '../src/opts/SkUtils_opts_none.cpp', | 167 '../src/opts/SkUtils_opts_none.cpp', |
162 '../src/opts/SkXfermode_opts_arm.cpp', | 168 '../src/opts/SkXfermode_opts_arm.cpp', |
163 '../src/opts/SkXfermode_opts_arm_neon.cpp', | 169 '../src/opts/SkXfermode_opts_arm_neon.cpp', |
164 ], | 170 ], |
165 }], | 171 }], |
166 ], | 172 ], |
167 }, | 173 }, |
168 # For the same lame reasons as what is done for skia_opts, we have to | 174 # For the same lame reasons as what is done for skia_opts, we have to |
169 # create another target specifically for SSSE3 code as we would not want | 175 # create another target specifically for SSSE3 code as we would not want |
170 # to compile the SSE2 code with -mssse3 which would potentially allow | 176 # to compile the SSE2 code with -mssse3 which would potentially allow |
171 # gcc to generate SSSE3 code. | 177 # gcc to generate SSSE3 code. |
172 { | 178 { |
173 'target_name': 'opts_ssse3', | 179 'target_name': 'opts_ssse3', |
174 'product_name': 'skia_opts_ssse3', | 180 'product_name': 'skia_opts_ssse3', |
175 'type': 'static_library', | 181 'type': 'static_library', |
176 'standalone_static_library': 1, | 182 'standalone_static_library': 1, |
177 'dependencies': [ | 183 'dependencies': [ |
178 'core.gyp:*', | 184 'core.gyp:*', |
179 'effects.gyp:*' | 185 'effects.gyp:*' |
180 ], | 186 ], |
181 'include_dirs': [ | 187 'include_dirs': [ |
182 '../src/core', | 188 '../src/core', |
| 189 '../src/utils', |
183 ], | 190 ], |
184 'conditions': [ | 191 'conditions': [ |
185 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"] \ | 192 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"] \ |
186 and not skia_android_framework', { | 193 and not skia_android_framework', { |
187 'cflags': [ | 194 'cflags': [ |
188 '-mssse3', | 195 '-mssse3', |
189 ], | 196 ], |
190 }], | 197 }], |
191 # (Mac has -mssse3 globally.) | 198 # (Mac has -mssse3 globally.) |
192 [ 'skia_arch_type == "x86"', { | 199 [ 'skia_arch_type == "x86"', { |
(...skipping 11 matching lines...) Expand all Loading... |
204 'target_name': 'opts_sse4', | 211 'target_name': 'opts_sse4', |
205 'product_name': 'skia_opts_sse4', | 212 'product_name': 'skia_opts_sse4', |
206 'type': 'static_library', | 213 'type': 'static_library', |
207 'standalone_static_library': 1, | 214 'standalone_static_library': 1, |
208 'dependencies': [ | 215 'dependencies': [ |
209 'core.gyp:*', | 216 'core.gyp:*', |
210 'effects.gyp:*' | 217 'effects.gyp:*' |
211 ], | 218 ], |
212 'include_dirs': [ | 219 'include_dirs': [ |
213 '../src/core', | 220 '../src/core', |
| 221 '../src/utils', |
214 ], | 222 ], |
215 'conditions': [ | 223 'conditions': [ |
216 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"] \ | 224 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android"] \ |
217 and not skia_android_framework', { | 225 and not skia_android_framework', { |
218 'cflags': [ | 226 'cflags': [ |
219 '-msse4', | 227 '-msse4', |
220 ], | 228 ], |
221 }], | 229 }], |
222 [ 'skia_os == "mac"', { | 230 [ 'skia_os == "mac"', { |
223 'xcode_settings': { | 231 'xcode_settings': { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 'product_name': 'skia_opts_neon', | 265 'product_name': 'skia_opts_neon', |
258 'type': 'static_library', | 266 'type': 'static_library', |
259 'standalone_static_library': 1, | 267 'standalone_static_library': 1, |
260 'dependencies': [ | 268 'dependencies': [ |
261 'core.gyp:*', | 269 'core.gyp:*', |
262 'effects.gyp:*' | 270 'effects.gyp:*' |
263 ], | 271 ], |
264 'include_dirs': [ | 272 'include_dirs': [ |
265 '../src/core', | 273 '../src/core', |
266 '../src/opts', | 274 '../src/opts', |
| 275 '../src/utils', |
267 ], | 276 ], |
268 'cflags!': [ | 277 'cflags!': [ |
269 '-fno-omit-frame-pointer', | 278 '-fno-omit-frame-pointer', |
270 '-mfpu=vfp', # remove them all, just in case. | 279 '-mfpu=vfp', # remove them all, just in case. |
271 '-mfpu=vfpv3', | 280 '-mfpu=vfpv3', |
272 '-mfpu=vfpv3-d16', | 281 '-mfpu=vfpv3-d16', |
273 ], | 282 ], |
274 'conditions': [ | 283 'conditions': [ |
275 [ 'not skia_android_framework', { | 284 [ 'not skia_android_framework', { |
276 'cflags': [ | 285 'cflags': [ |
277 '-mfpu=neon', | 286 '-mfpu=neon', |
278 '-fomit-frame-pointer', | 287 '-fomit-frame-pointer', |
279 ], | 288 ], |
280 }], | 289 }], |
281 ], | 290 ], |
282 'ldflags': [ | 291 'ldflags': [ |
283 '-march=armv7-a', | 292 '-march=armv7-a', |
284 '-Wl,--fix-cortex-a8', | 293 '-Wl,--fix-cortex-a8', |
285 ], | 294 ], |
286 'sources': [ | 295 'sources': [ |
287 '../src/opts/memset16_neon.S', | 296 '../src/opts/memset16_neon.S', |
288 '../src/opts/memset32_neon.S', | 297 '../src/opts/memset32_neon.S', |
289 '../src/opts/SkBitmapProcState_arm_neon.cpp', | 298 '../src/opts/SkBitmapProcState_arm_neon.cpp', |
290 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp', | 299 '../src/opts/SkBitmapProcState_matrixProcs_neon.cpp', |
291 '../src/opts/SkBitmapProcState_matrix_neon.h', | 300 '../src/opts/SkBitmapProcState_matrix_neon.h', |
292 '../src/opts/SkBlitMask_opts_arm_neon.cpp', | 301 '../src/opts/SkBlitMask_opts_arm_neon.cpp', |
293 '../src/opts/SkBlitRow_opts_arm_neon.cpp', | 302 '../src/opts/SkBlitRow_opts_arm_neon.cpp', |
294 '../src/opts/SkBlurImage_opts_neon.cpp', | 303 '../src/opts/SkBlurImage_opts_neon.cpp', |
295 '../src/opts/SkMorphology_opts_neon.cpp', | 304 '../src/opts/SkMorphology_opts_neon.cpp', |
| 305 '../src/opts/SkTextureCompression_opts_neon.cpp', |
296 '../src/opts/SkXfermode_opts_arm_neon.cpp', | 306 '../src/opts/SkXfermode_opts_arm_neon.cpp', |
297 ], | 307 ], |
298 }, | 308 }, |
299 ], | 309 ], |
300 } | 310 } |
OLD | NEW |