OLD | NEW |
---|---|
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 | 5 |
6 # This gyp file contains the platform-specific optimizations for Skia | 6 # This gyp file contains the platform-specific optimizations for Skia |
7 { | 7 { |
8 'targets': [ | 8 'targets': [ |
9 # Due to an unfortunate intersection of lameness between gcc and gyp, | 9 # Due to an unfortunate intersection of lameness between gcc and gyp, |
10 # we have to build the *_SSE2.cpp files in a separate target. The | 10 # we have to build the *_SSE2.cpp files in a separate target. The |
(...skipping 17 matching lines...) Expand all Loading... | |
28 'target_name': 'skia_opts', | 28 'target_name': 'skia_opts', |
29 'type': 'static_library', | 29 'type': 'static_library', |
30 'includes': [ | 30 'includes': [ |
31 'skia_common.gypi', | 31 'skia_common.gypi', |
32 ], | 32 ], |
33 'include_dirs': [ | 33 'include_dirs': [ |
34 '../third_party/skia/include/core', | 34 '../third_party/skia/include/core', |
35 '../third_party/skia/include/effects', | 35 '../third_party/skia/include/effects', |
36 '../third_party/skia/src/core', | 36 '../third_party/skia/src/core', |
37 '../third_party/skia/src/opts', | 37 '../third_party/skia/src/opts', |
38 '../third_party/skia/src/utils', | |
38 ], | 39 ], |
39 'conditions': [ | 40 'conditions': [ |
40 [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ | 41 [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ |
41 target_arch != "arm" and target_arch != "arm64" and \ | 42 target_arch != "arm" and target_arch != "arm64" and \ |
42 target_arch != "mipsel"', { | 43 target_arch != "mipsel"', { |
43 'cflags': [ | 44 'cflags': [ |
44 '-msse2', | 45 '-msse2', |
45 ], | 46 ], |
46 }], | 47 }], |
47 [ 'target_arch != "arm" and target_arch != "mipsel" and \ | 48 [ 'target_arch != "arm" and target_arch != "mipsel" and \ |
48 target_arch != "arm64"', { | 49 target_arch != "arm64"', { |
49 'sources': [ | 50 'sources': [ |
51 '../third_party/skia/src/opts/SkBitmapFilter_opts_SSE2.cpp', | |
50 '../third_party/skia/src/opts/SkBitmapProcState_opts_SSE2.cpp', | 52 '../third_party/skia/src/opts/SkBitmapProcState_opts_SSE2.cpp', |
51 '../third_party/skia/src/opts/SkBlitRect_opts_SSE2.cpp', | 53 '../third_party/skia/src/opts/SkBlitRect_opts_SSE2.cpp', |
52 '../third_party/skia/src/opts/SkBlitRow_opts_SSE2.cpp', | 54 '../third_party/skia/src/opts/SkBlitRow_opts_SSE2.cpp', |
55 '../third_party/skia/src/opts/SkBlurImage_opts_SSE2.cpp', | |
56 '../third_party/skia/src/opts/SkMorphology_opts_SSE2.cpp', | |
57 '../third_party/skia/src/opts/SkTextureCompression_opts_none.cpp', | |
53 '../third_party/skia/src/opts/SkUtils_opts_SSE2.cpp', | 58 '../third_party/skia/src/opts/SkUtils_opts_SSE2.cpp', |
54 '../third_party/skia/src/opts/SkXfermode_opts_SSE2.cpp', | 59 '../third_party/skia/src/opts/SkXfermode_opts_SSE2.cpp', |
55 '../third_party/skia/src/opts/SkBitmapFilter_opts_SSE2.cpp', | |
56 '../third_party/skia/src/opts/SkMorphology_opts_SSE2.cpp', | |
57 '../third_party/skia/src/opts/SkBlurImage_opts_SSE2.cpp', | |
58 ], | 60 ], |
59 'dependencies': [ | 61 'dependencies': [ |
60 'skia_opts_ssse3', | 62 'skia_opts_ssse3', |
61 'skia_opts_sse4', | 63 'skia_opts_sse4', |
62 ], | 64 ], |
63 }], | 65 }], |
64 [ 'target_arch == "arm"', { | 66 [ 'target_arch == "arm"', { |
65 'conditions': [ | 67 'conditions': [ |
66 [ 'arm_version >= 7 and arm_neon == 1', { | 68 [ 'arm_version >= 7 and arm_neon == 1', { |
67 'defines': [ | 69 'defines': [ |
(...skipping 25 matching lines...) Expand all Loading... | |
93 'cflags!': [ | 95 'cflags!': [ |
94 '-fno-omit-frame-pointer', | 96 '-fno-omit-frame-pointer', |
95 '-marm', | 97 '-marm', |
96 '-mapcs-frame', | 98 '-mapcs-frame', |
97 ], | 99 ], |
98 'cflags': [ | 100 'cflags': [ |
99 '-fomit-frame-pointer', | 101 '-fomit-frame-pointer', |
100 ], | 102 ], |
101 'sources': [ | 103 'sources': [ |
102 '../third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp', | 104 '../third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp', |
105 '../third_party/skia/src/opts/SkTextureCompression_opts_arm.cpp', | |
103 ], | 106 ], |
104 }], | 107 }], |
105 [ 'target_arch == "arm" and (arm_version < 7 or (arm_neon == 0 and arm_n eon_optional == 1))', { | 108 [ 'target_arch == "arm" and (arm_version < 7 or (arm_neon == 0 and arm_n eon_optional == 1))', { |
106 'sources': [ | 109 'sources': [ |
107 '../third_party/skia/src/opts/memset.arm.S', | 110 '../third_party/skia/src/opts/memset.arm.S', |
108 ], | 111 ], |
109 }], | 112 }], |
110 [ 'target_arch == "arm" and arm_version < 6', { | 113 [ 'target_arch == "arm" and arm_version < 6', { |
krajcevski
2014/07/14 18:52:57
Does one of these need either the "neon" or the "n
mtklein
2014/07/14 18:58:16
Not sure. I had the _arm.cpp unconditionally in b
| |
111 'sources': [ | 114 'sources': [ |
112 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', | 115 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', |
113 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', | 116 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', |
114 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', | 117 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', |
115 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', | 118 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', |
116 '../third_party/skia/src/opts/SkMorphology_opts_none.cpp', | 119 '../third_party/skia/src/opts/SkMorphology_opts_none.cpp', |
117 '../third_party/skia/src/opts/SkBlurImage_opts_none.cpp', | 120 '../third_party/skia/src/opts/SkBlurImage_opts_none.cpp', |
118 ], | 121 ], |
119 }], | 122 }], |
120 [ 'target_arch == "arm" and arm_version >= 6', { | 123 [ 'target_arch == "arm" and arm_version >= 6', { |
121 'sources': [ | 124 'sources': [ |
122 '../third_party/skia/src/opts/SkBlitMask_opts_arm.cpp', | 125 '../third_party/skia/src/opts/SkBlitMask_opts_arm.cpp', |
123 '../third_party/skia/src/opts/SkBlitRow_opts_arm.cpp', | 126 '../third_party/skia/src/opts/SkBlitRow_opts_arm.cpp', |
124 '../third_party/skia/src/opts/SkBlitRow_opts_arm.h', | 127 '../third_party/skia/src/opts/SkBlitRow_opts_arm.h', |
125 '../third_party/skia/src/opts/SkBlurImage_opts_arm.cpp', | 128 '../third_party/skia/src/opts/SkBlurImage_opts_arm.cpp', |
126 '../third_party/skia/src/opts/SkMorphology_opts_arm.cpp', | 129 '../third_party/skia/src/opts/SkMorphology_opts_arm.cpp', |
127 '../third_party/skia/src/opts/SkUtils_opts_arm.cpp', | 130 '../third_party/skia/src/opts/SkUtils_opts_arm.cpp', |
128 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', | 131 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', |
129 ], | 132 ], |
130 }], | 133 }], |
131 [ 'target_arch == "mipsel"',{ | 134 [ 'target_arch == "mipsel"',{ |
132 'cflags': [ | 135 'cflags': [ |
133 '-fomit-frame-pointer', | 136 '-fomit-frame-pointer', |
134 ], | 137 ], |
135 'sources': [ | 138 'sources': [ |
136 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', | 139 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', |
137 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', | 140 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', |
138 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', | 141 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', |
142 '../third_party/skia/src/opts/SkBlurImage_opts_none.cpp', | |
143 '../third_party/skia/src/opts/SkMorphology_opts_none.cpp', | |
144 '../third_party/skia/src/opts/SkTextureCompression_opts_none.cpp', | |
139 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', | 145 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', |
140 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', | 146 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', |
141 '../third_party/skia/src/opts/SkMorphology_opts_none.cpp', | |
142 '../third_party/skia/src/opts/SkBlurImage_opts_none.cpp', | |
143 ], | 147 ], |
144 }], | 148 }], |
145 [ 'target_arch == "arm64"', { | 149 [ 'target_arch == "arm64"', { |
146 'sources': [ | 150 'sources': [ |
147 '../third_party/skia/src/opts/SkBitmapProcState_arm_neon.cpp', | 151 '../third_party/skia/src/opts/SkBitmapProcState_arm_neon.cpp', |
148 '../third_party/skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp ', | 152 '../third_party/skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp ', |
149 '../third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp', | 153 '../third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp', |
150 '../third_party/skia/src/opts/SkBlitMask_opts_arm.cpp', | 154 '../third_party/skia/src/opts/SkBlitMask_opts_arm.cpp', |
151 '../third_party/skia/src/opts/SkBlitMask_opts_arm_neon.cpp', | 155 '../third_party/skia/src/opts/SkBlitMask_opts_arm_neon.cpp', |
152 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', | 156 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', |
153 '../third_party/skia/src/opts/SkBlurImage_opts_arm.cpp', | 157 '../third_party/skia/src/opts/SkBlurImage_opts_arm.cpp', |
154 '../third_party/skia/src/opts/SkBlurImage_opts_neon.cpp', | 158 '../third_party/skia/src/opts/SkBlurImage_opts_neon.cpp', |
155 '../third_party/skia/src/opts/SkMorphology_opts_arm.cpp', | 159 '../third_party/skia/src/opts/SkMorphology_opts_arm.cpp', |
156 '../third_party/skia/src/opts/SkMorphology_opts_neon.cpp', | 160 '../third_party/skia/src/opts/SkMorphology_opts_neon.cpp', |
161 '../third_party/skia/src/opts/SkTextureCompression_opts_arm.cpp', | |
157 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', | 162 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', |
158 '../third_party/skia/src/opts/SkXfermode_opts_arm.cpp', | 163 '../third_party/skia/src/opts/SkXfermode_opts_arm.cpp', |
159 '../third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp', | 164 '../third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp', |
160 ], | 165 ], |
161 }], | 166 }], |
162 ], | 167 ], |
163 }, | 168 }, |
164 # For the same lame reasons as what is done for skia_opts, we have to | 169 # For the same lame reasons as what is done for skia_opts, we have to |
165 # create another target specifically for SSSE3 code as we would not want | 170 # create another target specifically for SSSE3 code as we would not want |
166 # to compile the SSE2 code with -mssse3 which would potentially allow | 171 # to compile the SSE2 code with -mssse3 which would potentially allow |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
253 ], | 258 ], |
254 'include_dirs': [ | 259 'include_dirs': [ |
255 '../third_party/skia/include/core', | 260 '../third_party/skia/include/core', |
256 '../third_party/skia/include/effects', | 261 '../third_party/skia/include/effects', |
257 '../third_party/skia/src/core', | 262 '../third_party/skia/src/core', |
258 ], | 263 ], |
259 'sources': [ | 264 'sources': [ |
260 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', | 265 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', |
261 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', | 266 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', |
262 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', | 267 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', |
268 '../third_party/skia/src/opts/SkBlurImage_opts_none.cpp', | |
269 '../third_party/skia/src/opts/SkMorphology_opts_none.cpp', | |
270 '../third_party/skia/src/opts/SkTextureCompression_opts_none.cpp', | |
263 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', | 271 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', |
264 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', | 272 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', |
265 '../third_party/skia/src/opts/SkMorphology_opts_none.cpp', | |
266 '../third_party/skia/src/opts/SkBlurImage_opts_none.cpp', | |
267 ], | 273 ], |
268 }, | 274 }, |
269 ], | 275 ], |
270 'conditions': [ | 276 'conditions': [ |
271 # NEON code must be compiled with -mfpu=neon which also affects scalar | 277 # NEON code must be compiled with -mfpu=neon which also affects scalar |
272 # code. To support dynamic NEON code paths, we need to build all | 278 # code. To support dynamic NEON code paths, we need to build all |
273 # NEON-specific sources in a separate static library. The situation | 279 # NEON-specific sources in a separate static library. The situation |
274 # is very similar to the SSSE3 one. | 280 # is very similar to the SSSE3 one. |
275 ['target_arch == "arm" and (arm_neon == 1 or arm_neon_optional == 1)', { | 281 ['target_arch == "arm" and (arm_neon == 1 or arm_neon_optional == 1)', { |
276 'targets': [ | 282 'targets': [ |
(...skipping 17 matching lines...) Expand all Loading... | |
294 ], | 300 ], |
295 'cflags': [ | 301 'cflags': [ |
296 '-mfpu=neon', | 302 '-mfpu=neon', |
297 '-fomit-frame-pointer', | 303 '-fomit-frame-pointer', |
298 ], | 304 ], |
299 'ldflags': [ | 305 'ldflags': [ |
300 '-march=armv7-a', | 306 '-march=armv7-a', |
301 '-Wl,--fix-cortex-a8', | 307 '-Wl,--fix-cortex-a8', |
302 ], | 308 ], |
303 'sources': [ | 309 'sources': [ |
304 '../third_party/skia/src/opts/memset16_neon.S', | |
305 '../third_party/skia/src/opts/memset32_neon.S', | |
306 '../third_party/skia/src/opts/SkBitmapProcState_arm_neon.cpp', | 310 '../third_party/skia/src/opts/SkBitmapProcState_arm_neon.cpp', |
307 '../third_party/skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp ', | 311 '../third_party/skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp ', |
308 '../third_party/skia/src/opts/SkBitmapProcState_matrix_clamp_neon.h' , | 312 '../third_party/skia/src/opts/SkBitmapProcState_matrix_clamp_neon.h' , |
309 '../third_party/skia/src/opts/SkBitmapProcState_matrix_repeat_neon.h ', | 313 '../third_party/skia/src/opts/SkBitmapProcState_matrix_repeat_neon.h ', |
310 '../third_party/skia/src/opts/SkBlitMask_opts_arm_neon.cpp', | 314 '../third_party/skia/src/opts/SkBlitMask_opts_arm_neon.cpp', |
311 '../third_party/skia/src/opts/SkBlitRow_opts_arm_neon.cpp', | 315 '../third_party/skia/src/opts/SkBlitRow_opts_arm_neon.cpp', |
312 '../third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp', | |
313 '../third_party/skia/src/opts/SkBlurImage_opts_neon.cpp', | 316 '../third_party/skia/src/opts/SkBlurImage_opts_neon.cpp', |
314 '../third_party/skia/src/opts/SkMorphology_opts_neon.cpp', | 317 '../third_party/skia/src/opts/SkMorphology_opts_neon.cpp', |
318 '../third_party/skia/src/opts/SkTextureCompression_opts_neon.cpp', | |
319 '../third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp', | |
320 '../third_party/skia/src/opts/memset16_neon.S', | |
321 '../third_party/skia/src/opts/memset32_neon.S', | |
315 ], | 322 ], |
316 'conditions': [ | 323 'conditions': [ |
317 ['arm_neon == 1', { | 324 ['arm_neon == 1', { |
318 'defines': [ | 325 'defines': [ |
319 '__ARM_HAVE_NEON', | 326 '__ARM_HAVE_NEON', |
320 ], | 327 ], |
321 }], | 328 }], |
322 ['arm_neon_optional == 1', { | 329 ['arm_neon_optional == 1', { |
323 'defines': [ | 330 'defines': [ |
324 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', | 331 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', |
325 ], | 332 ], |
326 }], | 333 }], |
327 ], | 334 ], |
328 }, | 335 }, |
329 ], | 336 ], |
330 }], | 337 }], |
331 ], | 338 ], |
332 } | 339 } |
OLD | NEW |