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

Side by Side Diff: skia/skia_library_opts.gyp

Issue 19477005: Improve Skia configuration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Use os_posix for posix tests. Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « skia/skia_library.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 # gcc lameness is that, in order to compile SSE2 intrinsics code, it 11 # gcc lameness is that, in order to compile SSE2 intrinsics code, it
12 # must be passed the -msse2 flag. However, with this flag, it may 12 # must be passed the -msse2 flag. However, with this flag, it may
13 # emit SSE2 instructions even for scalar code, such as the CPUID 13 # emit SSE2 instructions even for scalar code, such as the CPUID
14 # test used to test for the presence of SSE2. So that, and all other 14 # test used to test for the presence of SSE2. So that, and all other
15 # code must be compiled *without* -msse2. The gyp lameness is that it 15 # code must be compiled *without* -msse2. The gyp lameness is that it
16 # does not allow file-specific CFLAGS, so we must create this extra 16 # does not allow file-specific CFLAGS, so we must create this extra
17 # target for those files to be compiled with -msse2. 17 # target for those files to be compiled with -msse2.
18 # 18 #
19 # This is actually only a problem on 32-bit Linux (all Intel Macs have 19 # This is actually only a problem on 32-bit Linux (all Intel Macs have
20 # SSE2, Linux x86_64 has SSE2 by definition, and MSC will happily emit 20 # SSE2, Linux x86_64 has SSE2 by definition, and MSC will happily emit
21 # SSE2 from instrinsics, which generating plain ol' 386 for everything 21 # SSE2 from instrinsics, which generating plain ol' 386 for everything
22 # else). However, to keep the .gyp file simple and avoid platform-specific 22 # else). However, to keep the .gyp file simple and avoid platform-specific
23 # build breakage, we do this on all platforms. 23 # build breakage, we do this on all platforms.
24 24
25 # For about the same reason, we need to compile the ARM opts files 25 # For about the same reason, we need to compile the ARM opts files
26 # separately as well. 26 # separately as well.
27 { 27 {
28 'target_name': 'skia_opts', 28 'target_name': 'skia_opts',
29 'type': 'static_library', 29 'type': 'static_library',
30 'includes': [
31 'skia_common.gypi',
32 ],
30 'include_dirs': [ 33 'include_dirs': [
31 'config',
32 '../third_party/skia/include/config',
33 '../third_party/skia/include/core', 34 '../third_party/skia/include/core',
34 '../third_party/skia/src/core', 35 '../third_party/skia/src/core',
35 '../third_party/skia/src/opts', 36 '../third_party/skia/src/opts',
36 ], 37 ],
37 'conditions': [ 38 'conditions': [
38 [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ 39 [ 'os_posix == 1 and OS != "mac" and OS != "android" and \
39 target_arch != "arm" and target_arch != "mipsel"', { 40 target_arch != "arm" and target_arch != "mipsel"', {
40 'cflags': [ 41 'cflags': [
41 '-msse2', 42 '-msse2',
42 ], 43 ],
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 }], 132 }],
132 ], 133 ],
133 }, 134 },
134 # For the same lame reasons as what is done for skia_opts, we have to 135 # For the same lame reasons as what is done for skia_opts, we have to
135 # create another target specifically for SSSE3 code as we would not want 136 # create another target specifically for SSSE3 code as we would not want
136 # to compile the SSE2 code with -mssse3 which would potentially allow 137 # to compile the SSE2 code with -mssse3 which would potentially allow
137 # gcc to generate SSSE3 code. 138 # gcc to generate SSSE3 code.
138 { 139 {
139 'target_name': 'skia_opts_ssse3', 140 'target_name': 'skia_opts_ssse3',
140 'type': 'static_library', 141 'type': 'static_library',
142 'includes': [
143 'skia_common.gypi',
144 ],
141 'include_dirs': [ 145 'include_dirs': [
142 '..',
143 'config',
144 '../third_party/skia/include/config',
145 '../third_party/skia/include/core', 146 '../third_party/skia/include/core',
146 '../third_party/skia/src/core', 147 '../third_party/skia/src/core',
147 ], 148 ],
148 'conditions': [ 149 'conditions': [
149 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', { 150 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', {
150 'cflags': [ 151 'cflags': [
151 '-mssse3', 152 '-mssse3',
152 ], 153 ],
153 }], 154 }],
154 [ 'OS == "mac"', { 155 [ 'OS == "mac"', {
(...skipping 14 matching lines...) Expand all
169 [ 'target_arch != "arm" and target_arch != "mipsel"', { 170 [ 'target_arch != "arm" and target_arch != "mipsel"', {
170 'sources': [ 171 'sources': [
171 '../third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp', 172 '../third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp',
172 ], 173 ],
173 }], 174 }],
174 ], 175 ],
175 }, 176 },
176 { 177 {
177 'target_name': 'skia_opts_none', 178 'target_name': 'skia_opts_none',
178 'type': 'static_library', 179 'type': 'static_library',
180 'includes': [
181 'skia_common.gypi',
182 ],
179 'include_dirs': [ 183 'include_dirs': [
180 '..',
181 'config',
182 '../third_party/skia/include/config',
183 '../third_party/skia/include/core', 184 '../third_party/skia/include/core',
184 '../third_party/skia/src/core', 185 '../third_party/skia/src/core',
185 ], 186 ],
186 'sources': [ 187 'sources': [
187 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', 188 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp',
188 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', 189 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp',
189 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', 190 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp',
190 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', 191 '../third_party/skia/src/opts/SkUtils_opts_none.cpp',
191 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp', 192 '../third_party/skia/src/opts/SkXfermode_opts_none.cpp',
192 ], 193 ],
193 }, 194 },
194 ], 195 ],
195 'conditions': [ 196 'conditions': [
196 # NEON code must be compiled with -mfpu=neon which also affects scalar 197 # NEON code must be compiled with -mfpu=neon which also affects scalar
197 # code. To support dynamic NEON code paths, we need to build all 198 # code. To support dynamic NEON code paths, we need to build all
198 # NEON-specific sources in a separate static library. The situation 199 # NEON-specific sources in a separate static library. The situation
199 # is very similar to the SSSE3 one. 200 # is very similar to the SSSE3 one.
200 ['target_arch == "arm" and (arm_neon == 1 or arm_neon_optional == 1)', { 201 ['target_arch == "arm" and (arm_neon == 1 or arm_neon_optional == 1)', {
201 'targets': [ 202 'targets': [
202 { 203 {
203 'target_name': 'skia_opts_neon', 204 'target_name': 'skia_opts_neon',
204 'type': 'static_library', 205 'type': 'static_library',
206 'includes': [
207 'skia_common.gypi',
208 ],
205 'include_dirs': [ 209 'include_dirs': [
206 '..',
207 'config',
208 '../third_party/skia/include/core', 210 '../third_party/skia/include/core',
209 '../third_party/skia/src/core', 211 '../third_party/skia/src/core',
210 '../third_party/skia/src/opts', 212 '../third_party/skia/src/opts',
211 ], 213 ],
212 'cflags!': [ 214 'cflags!': [
213 '-fno-omit-frame-pointer', 215 '-fno-omit-frame-pointer',
214 '-mfpu=vfp', # remove them all, just in case. 216 '-mfpu=vfp', # remove them all, just in case.
215 '-mfpu=vfpv3', 217 '-mfpu=vfpv3',
216 '-mfpu=vfpv3-d16', 218 '-mfpu=vfpv3-d16',
217 ], 219 ],
(...skipping 25 matching lines...) Expand all
243 'defines': [ 245 'defines': [
244 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', 246 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT',
245 ], 247 ],
246 }], 248 }],
247 ], 249 ],
248 }, 250 },
249 ], 251 ],
250 }], 252 }],
251 ], 253 ],
252 } 254 }
OLDNEW
« no previous file with comments | « skia/skia_library.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698