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

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: Android framework support. 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
« skia/skia_common.gypi ('K') | « 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', 34 'config',
32 '../third_party/skia/include/config', 35 '../third_party/skia/include/config',
33 '../third_party/skia/include/core', 36 '../third_party/skia/include/core',
34 '../third_party/skia/src/core', 37 '../third_party/skia/src/core',
35 '../third_party/skia/src/opts', 38 '../third_party/skia/src/opts',
36 ], 39 ],
37 'conditions': [ 40 'conditions': [
38 [ 'os_posix == 1 and OS != "mac" and OS != "android" and \ 41 [ 'os_posix == 1 and OS != "mac" and OS != "android" and \
39 target_arch != "arm" and target_arch != "mipsel"', { 42 target_arch != "arm" and target_arch != "mipsel"', {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 }], 130 }],
128 ], 131 ],
129 }, 132 },
130 # For the same lame reasons as what is done for skia_opts, we have to 133 # For the same lame reasons as what is done for skia_opts, we have to
131 # create another target specifically for SSSE3 code as we would not want 134 # create another target specifically for SSSE3 code as we would not want
132 # to compile the SSE2 code with -mssse3 which would potentially allow 135 # to compile the SSE2 code with -mssse3 which would potentially allow
133 # gcc to generate SSSE3 code. 136 # gcc to generate SSSE3 code.
134 { 137 {
135 'target_name': 'skia_opts_ssse3', 138 'target_name': 'skia_opts_ssse3',
136 'type': 'static_library', 139 'type': 'static_library',
140 'includes': [
141 'skia_common.gypi',
142 ],
137 'include_dirs': [ 143 'include_dirs': [
138 '..',
139 'config', 144 'config',
bungeman-skia 2013/09/27 17:59:13 'config' still needs to be listed here in this cas
140 '../third_party/skia/include/config', 145 '../third_party/skia/include/config',
141 '../third_party/skia/include/core', 146 '../third_party/skia/include/core',
142 '../third_party/skia/src/core', 147 '../third_party/skia/src/core',
143 ], 148 ],
144 'conditions': [ 149 'conditions': [
145 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', { 150 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', {
146 'cflags': [ 151 'cflags': [
147 '-mssse3', 152 '-mssse3',
148 ], 153 ],
149 }], 154 }],
(...skipping 15 matching lines...) Expand all
165 [ 'target_arch != "arm" and target_arch != "mipsel"', { 170 [ 'target_arch != "arm" and target_arch != "mipsel"', {
166 'sources': [ 171 'sources': [
167 '../third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp', 172 '../third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp',
168 ], 173 ],
169 }], 174 }],
170 ], 175 ],
171 }, 176 },
172 { 177 {
173 'target_name': 'skia_opts_none', 178 'target_name': 'skia_opts_none',
174 'type': 'static_library', 179 'type': 'static_library',
180 'includes': [
181 'skia_common.gypi',
182 ],
175 'include_dirs': [ 183 'include_dirs': [
176 '..',
177 'config', 184 'config',
178 '../third_party/skia/include/config', 185 '../third_party/skia/include/config',
179 '../third_party/skia/include/core', 186 '../third_party/skia/include/core',
180 '../third_party/skia/src/core', 187 '../third_party/skia/src/core',
181 ], 188 ],
182 'sources': [ 189 'sources': [
183 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp', 190 '../third_party/skia/src/opts/SkBitmapProcState_opts_none.cpp',
184 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp', 191 '../third_party/skia/src/opts/SkBlitMask_opts_none.cpp',
185 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp', 192 '../third_party/skia/src/opts/SkBlitRow_opts_none.cpp',
186 '../third_party/skia/src/opts/SkUtils_opts_none.cpp', 193 '../third_party/skia/src/opts/SkUtils_opts_none.cpp',
187 ], 194 ],
188 }, 195 },
189 ], 196 ],
190 'conditions': [ 197 'conditions': [
191 # NEON code must be compiled with -mfpu=neon which also affects scalar 198 # NEON code must be compiled with -mfpu=neon which also affects scalar
192 # code. To support dynamic NEON code paths, we need to build all 199 # code. To support dynamic NEON code paths, we need to build all
193 # NEON-specific sources in a separate static library. The situation 200 # NEON-specific sources in a separate static library. The situation
194 # is very similar to the SSSE3 one. 201 # is very similar to the SSSE3 one.
195 ['target_arch == "arm" and (arm_neon == 1 or arm_neon_optional == 1)', { 202 ['target_arch == "arm" and (arm_neon == 1 or arm_neon_optional == 1)', {
196 'targets': [ 203 'targets': [
197 { 204 {
198 'target_name': 'skia_opts_neon', 205 'target_name': 'skia_opts_neon',
199 'type': 'static_library', 206 'type': 'static_library',
207 'includes': [
208 'skia_common.gypi',
209 ],
200 'include_dirs': [ 210 'include_dirs': [
201 '..',
202 'config', 211 'config',
203 '../third_party/skia/include/core', 212 '../third_party/skia/include/core',
204 '../third_party/skia/src/core', 213 '../third_party/skia/src/core',
205 '../third_party/skia/src/opts', 214 '../third_party/skia/src/opts',
206 ], 215 ],
207 'cflags!': [ 216 'cflags!': [
208 '-fno-omit-frame-pointer', 217 '-fno-omit-frame-pointer',
209 '-mfpu=vfp', # remove them all, just in case. 218 '-mfpu=vfp', # remove them all, just in case.
210 '-mfpu=vfpv3', 219 '-mfpu=vfpv3',
211 '-mfpu=vfpv3-d16', 220 '-mfpu=vfpv3-d16',
(...skipping 25 matching lines...) Expand all
237 'defines': [ 246 'defines': [
238 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', 247 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT',
239 ], 248 ],
240 }], 249 }],
241 ], 250 ],
242 }, 251 },
243 ], 252 ],
244 }], 253 }],
245 ], 254 ],
246 } 255 }
OLDNEW
« skia/skia_common.gypi ('K') | « skia/skia_library.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698