OLD | NEW |
1 # Description: | 1 # Description: |
2 # Skia graphics library. | 2 # Skia graphics library. |
3 # | 3 # |
4 # Definitions for Google BUILD file. | 4 # Definitions for Google BUILD file. |
5 | 5 |
6 exports_files(["BUILD.public"]) | 6 exports_files(["BUILD.public"]) |
7 | 7 |
8 # Platform-independent SRCS | 8 # All platform-independent SRCS. |
9 SRCS = glob( | 9 BASE_SRCS = glob( |
10 [ | 10 [ |
11 "include/private/*.h", | 11 "include/private/*.h", |
12 "src/**/*.h", | 12 "src/**/*.h", |
13 "src/**/*.cpp", | 13 "src/**/*.cpp", |
14 | 14 |
15 # Third Party | 15 # Third Party |
16 "third_party/etc1/*.cpp", | 16 "third_party/etc1/*.cpp", |
17 "third_party/etc1/*.h", | 17 "third_party/etc1/*.h", |
18 "third_party/ktx/*.cpp", | 18 "third_party/ktx/*.cpp", |
19 "third_party/ktx/*.h", | 19 "third_party/ktx/*.h", |
(...skipping 27 matching lines...) Expand all Loading... |
47 "src/gpu/gl/GrGLDefaultInterface_native.cpp", | 47 "src/gpu/gl/GrGLDefaultInterface_native.cpp", |
48 "src/gpu/gl/GrGLDefaultInterface_none.cpp", | 48 "src/gpu/gl/GrGLDefaultInterface_none.cpp", |
49 | 49 |
50 # Exclude files that don't compile with the current DEFINES. | 50 # Exclude files that don't compile with the current DEFINES. |
51 "src/codec/SkJpegCodec.cpp", # libjpeg_turbo version mismatch. | 51 "src/codec/SkJpegCodec.cpp", # libjpeg_turbo version mismatch. |
52 "src/gpu/gl/angle/*", # Requires SK_ANGLE define. | 52 "src/gpu/gl/angle/*", # Requires SK_ANGLE define. |
53 "src/gpu/gl/command_buffer/*", # unknown type name 'HMODULE' | 53 "src/gpu/gl/command_buffer/*", # unknown type name 'HMODULE' |
54 "src/gpu/gl/mesa/*", # Requires SK_MESA define. | 54 "src/gpu/gl/mesa/*", # Requires SK_MESA define. |
55 "src/svg/parser/*", # Missing SkSVG.h. | 55 "src/svg/parser/*", # Missing SkSVG.h. |
56 | 56 |
| 57 # Conflicting dependencies among Lua versions. See cl/107087297. |
| 58 "src/utils/SkLua*", |
| 59 |
57 # Not used. | 60 # Not used. |
58 "src/animator/**/*", | 61 "src/animator/**/*", |
59 "src/views/**/*", | 62 "src/views/**/*", |
60 "src/xml/SkBML_Verbs.h", | 63 "src/xml/SkBML_Verbs.h", |
61 "src/xml/SkBML_XMLParser.cpp", | 64 "src/xml/SkBML_XMLParser.cpp", |
62 "src/xml/SkXMLPullParser.cpp", | 65 "src/xml/SkXMLPullParser.cpp", |
63 ], | 66 ], |
64 ) | 67 ) |
65 | 68 |
66 # Platform-dependent SRCS for google3-default platform. | 69 # Platform-dependent SRCS for google3-default platform. |
67 SRCS_UNIX = glob( | 70 BASE_SRCS_UNIX = glob( |
68 [ | 71 [ |
69 "src/gpu/gl/GrGLDefaultInterface_native.cpp", | 72 "src/gpu/gl/GrGLDefaultInterface_native.cpp", |
70 "src/gpu/gl/glx/**/*.cpp", | 73 "src/gpu/gl/glx/**/*.cpp", |
71 "src/gpu/gl/glx/**/*.h", | 74 "src/gpu/gl/glx/**/*.h", |
72 "src/opts/**/*.cpp", | 75 "src/opts/**/*.cpp", |
73 "src/opts/**/*.h", | 76 "src/opts/**/*.h", |
74 "src/ports/**/*.cpp", | 77 "src/ports/**/*.cpp", |
75 "src/ports/**/*.h", | 78 "src/ports/**/*.h", |
76 ], | 79 ], |
77 exclude = [ | 80 exclude = [ |
(...skipping 22 matching lines...) Expand all Loading... |
100 "src/ports/SkFontMgr_empty_factory.cpp", | 103 "src/ports/SkFontMgr_empty_factory.cpp", |
101 "src/ports/SkImageDecoder_CG.cpp", | 104 "src/ports/SkImageDecoder_CG.cpp", |
102 "src/ports/SkImageDecoder_WIC.cpp", | 105 "src/ports/SkImageDecoder_WIC.cpp", |
103 "src/ports/SkImageDecoder_empty.cpp", | 106 "src/ports/SkImageDecoder_empty.cpp", |
104 "src/ports/SkImageGenerator_none.cpp", | 107 "src/ports/SkImageGenerator_none.cpp", |
105 "src/ports/SkTLS_none.cpp", | 108 "src/ports/SkTLS_none.cpp", |
106 ], | 109 ], |
107 ) | 110 ) |
108 | 111 |
109 # Platform-dependent SRCS for google3-default Android. | 112 # Platform-dependent SRCS for google3-default Android. |
110 SRCS_ANDROID = glob( | 113 BASE_SRCS_ANDROID = glob( |
111 [ | 114 [ |
112 # TODO(benjaminwagner): Figure out how to compile with EGL. | 115 # TODO(benjaminwagner): Figure out how to compile with EGL. |
113 "src/gpu/gl/GrGLDefaultInterface_none.cpp", | 116 "src/gpu/gl/GrGLDefaultInterface_none.cpp", |
114 "src/gpu/gl/nacl/SkCreatePlatformGLContext_nacl.cpp", | 117 "src/gpu/gl/nacl/SkCreatePlatformGLContext_nacl.cpp", |
115 "src/opts/**/*.cpp", | 118 "src/opts/**/*.cpp", |
116 "src/opts/**/*.h", | 119 "src/opts/**/*.h", |
117 "src/ports/**/*.cpp", | 120 "src/ports/**/*.cpp", |
118 "src/ports/**/*.h", | 121 "src/ports/**/*.h", |
119 ], | 122 ], |
120 exclude = [ | 123 exclude = [ |
(...skipping 20 matching lines...) Expand all Loading... |
141 "src/ports/SkFontMgr_empty_factory.cpp", | 144 "src/ports/SkFontMgr_empty_factory.cpp", |
142 "src/ports/SkImageDecoder_CG.cpp", | 145 "src/ports/SkImageDecoder_CG.cpp", |
143 "src/ports/SkImageDecoder_WIC.cpp", | 146 "src/ports/SkImageDecoder_WIC.cpp", |
144 "src/ports/SkImageDecoder_empty.cpp", | 147 "src/ports/SkImageDecoder_empty.cpp", |
145 "src/ports/SkImageGenerator_none.cpp", | 148 "src/ports/SkImageGenerator_none.cpp", |
146 "src/ports/SkTLS_none.cpp", | 149 "src/ports/SkTLS_none.cpp", |
147 ], | 150 ], |
148 ) | 151 ) |
149 | 152 |
150 # Platform-dependent SRCS for google3-default iOS. | 153 # Platform-dependent SRCS for google3-default iOS. |
151 SRCS_IOS = glob( | 154 BASE_SRCS_IOS = glob( |
152 [ | 155 [ |
153 "src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp", | 156 "src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp", |
154 "src/opts/**/*.cpp", | 157 "src/opts/**/*.cpp", |
155 "src/opts/**/*.h", | 158 "src/opts/**/*.h", |
156 "src/ports/**/*.cpp", | 159 "src/ports/**/*.cpp", |
157 "src/ports/**/*.h", | 160 "src/ports/**/*.h", |
158 ], | 161 ], |
159 exclude = [ | 162 exclude = [ |
160 "src/opts/*mips*", | 163 "src/opts/*mips*", |
161 "src/opts/*NEON*", | 164 "src/opts/*NEON*", |
(...skipping 21 matching lines...) Expand all Loading... |
183 "src/ports/SkFontMgr_custom_embedded_factory.cpp", | 186 "src/ports/SkFontMgr_custom_embedded_factory.cpp", |
184 "src/ports/SkFontMgr_empty_factory.cpp", | 187 "src/ports/SkFontMgr_empty_factory.cpp", |
185 "src/ports/SkImageDecoder_CG.cpp", | 188 "src/ports/SkImageDecoder_CG.cpp", |
186 "src/ports/SkImageDecoder_WIC.cpp", | 189 "src/ports/SkImageDecoder_WIC.cpp", |
187 "src/ports/SkImageDecoder_empty.cpp", | 190 "src/ports/SkImageDecoder_empty.cpp", |
188 "src/ports/SkImageGenerator_none.cpp", | 191 "src/ports/SkImageGenerator_none.cpp", |
189 "src/ports/SkTLS_none.cpp", | 192 "src/ports/SkTLS_none.cpp", |
190 ], | 193 ], |
191 ) | 194 ) |
192 | 195 |
193 PLATFORM_SRCS = select({ | 196 BASE_SRCS_PLATFORM = select({ |
194 CONDITION_ANDROID: SRCS_ANDROID, | 197 CONDITION_ANDROID: BASE_SRCS_ANDROID, |
195 CONDITION_IOS: SRCS_IOS, | 198 CONDITION_IOS: BASE_SRCS_IOS, |
196 "//conditions:default": SRCS_UNIX, | 199 "//conditions:default": BASE_SRCS_UNIX, |
197 }) | 200 }) |
198 | 201 |
199 SRCS_SSSE3 = glob( | 202 SSSE3_SRCS = glob( |
200 [ | 203 [ |
201 "src/opts/*SSSE3*.cpp", | 204 "src/opts/*SSSE3*.cpp", |
202 "src/opts/*ssse3*.cpp", | 205 "src/opts/*ssse3*.cpp", |
203 ], | 206 ], |
204 ) | 207 ) |
205 | 208 |
206 SRCS_SSE4 = glob( | 209 SSE4_SRCS = glob( |
207 [ | 210 [ |
208 "src/opts/*SSE4*.cpp", | 211 "src/opts/*SSE4*.cpp", |
209 "src/opts/*sse4*.cpp", | 212 "src/opts/*sse4*.cpp", |
210 ], | 213 ], |
211 ) | 214 ) |
212 | 215 |
213 HDRS = glob( | 216 BASE_HDRS = glob( |
214 [ | 217 [ |
215 "include/**/*.h", | 218 "include/**/*.h", |
216 ], | 219 ], |
217 exclude = [ | 220 exclude = [ |
218 "include/private/**/*", | 221 "include/private/**/*", |
219 | 222 |
220 # Not used. | 223 # Not used. |
221 "include/animator/**/*", | 224 "include/animator/**/*", |
222 "include/views/**/*", | 225 "include/views/**/*", |
223 "include/xml/SkBML_WXMLParser.h", | 226 "include/xml/SkBML_WXMLParser.h", |
224 "include/xml/SkBML_XMLParser.h", | 227 "include/xml/SkBML_XMLParser.h", |
225 ], | 228 ], |
226 ) | 229 ) |
227 | 230 |
| 231 # Dependencies. |
| 232 BASE_DEPS_UNIX = [ |
| 233 ":opts_sse4", |
| 234 ":opts_ssse3", |
| 235 ] |
| 236 |
| 237 BASE_DEPS_ANDROID = [] |
| 238 |
| 239 BASE_DEPS_IOS = [] |
| 240 |
| 241 BASE_DEPS = select({ |
| 242 CONDITION_ANDROID: BASE_DEPS_ANDROID + BASE_EXTERNAL_DEPS_ANDROID, |
| 243 CONDITION_IOS: BASE_DEPS_IOS + BASE_EXTERNAL_DEPS_IOS, |
| 244 "//conditions:default": BASE_DEPS_UNIX + BASE_EXTERNAL_DEPS_UNIX, |
| 245 }) + EXTERNAL_DEPS_ALL |
| 246 |
228 # Includes needed by Skia implementation. Not public includes. | 247 # Includes needed by Skia implementation. Not public includes. |
229 INCLUDES = [ | 248 INCLUDES = [ |
230 "include/android", | 249 "include/android", |
231 "include/c", | 250 "include/c", |
232 "include/codec", | 251 "include/codec", |
233 "include/config", | 252 "include/config", |
234 "include/core", | 253 "include/core", |
235 "include/effects", | 254 "include/effects", |
236 "include/gpu", | 255 "include/gpu", |
237 "include/images", | 256 "include/images", |
(...skipping 12 matching lines...) Expand all Loading... |
250 "src/image", | 269 "src/image", |
251 "src/lazy", | 270 "src/lazy", |
252 "src/opts", | 271 "src/opts", |
253 "src/pdf", | 272 "src/pdf", |
254 "src/sfnt", | 273 "src/sfnt", |
255 "src/utils", | 274 "src/utils", |
256 "third_party/etc1", | 275 "third_party/etc1", |
257 "third_party/ktx", | 276 "third_party/ktx", |
258 ] | 277 ] |
259 | 278 |
260 # Dependencies. | 279 ## :dm |
261 DEPS_UNIX = [ | |
262 ":opts_sse4", | |
263 ":opts_ssse3", | |
264 ] | |
265 | |
266 DEPS_ANDROID = [] | |
267 | |
268 DEPS_IOS = [] | |
269 | |
270 DEPS = select({ | |
271 CONDITION_ANDROID: DEPS_ANDROID + EXTERNAL_DEPS_ANDROID, | |
272 CONDITION_IOS: DEPS_IOS + EXTERNAL_DEPS_IOS, | |
273 "//conditions:default": DEPS_UNIX + EXTERNAL_DEPS_UNIX, | |
274 }) + EXTERNAL_DEPS_ALL | |
275 | 280 |
276 # Platform-independent SRCS for DM. | 281 # Platform-independent SRCS for DM. |
277 DM_SRCS = glob( | 282 DM_SRCS = glob( |
278 [ | 283 [ |
279 "dm/*.cpp", | 284 "dm/*.cpp", |
280 "dm/*.h", | 285 "dm/*.h", |
281 "gm/*.c", | 286 "gm/*.c", |
282 "gm/*.cpp", | 287 "gm/*.cpp", |
283 "gm/*.h", | 288 "gm/*.h", |
284 "tests/*.cpp", | 289 "tests/*.cpp", |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 "src/pathops", | 346 "src/pathops", |
342 "src/pipe/utils", | 347 "src/pipe/utils", |
343 "src/ports", | 348 "src/ports", |
344 "src/utils/debugger", | 349 "src/utils/debugger", |
345 "tests", | 350 "tests", |
346 "tools", | 351 "tools", |
347 "tools/flags", | 352 "tools/flags", |
348 "tools/timer", | 353 "tools/timer", |
349 ] | 354 ] |
350 | 355 |
351 COPTS_ANDROID = [ | 356 COPTS_ANDROID = ["-mfpu=neon"] |
352 "-mfpu=neon", | |
353 ] | |
354 | 357 |
355 COPTS_IOS = [ | 358 COPTS_IOS = [] |
356 ] | |
357 | 359 |
358 COPTS_UNIX = [ | 360 COPTS_UNIX = [ |
359 "-Wno-implicit-fallthrough", # Some intentional fallthrough. | 361 "-Wno-implicit-fallthrough", # Some intentional fallthrough. |
360 "-Wno-deprecated-declarations", # Internal use of deprecated methods. :( | 362 "-Wno-deprecated-declarations", # Internal use of deprecated methods. :( |
361 ] | 363 ] |
362 | 364 |
363 COPTS = select({ | 365 COPTS = select({ |
364 CONDITION_ANDROID: COPTS_ANDROID, | 366 CONDITION_ANDROID: COPTS_ANDROID, |
365 CONDITION_IOS: COPTS_IOS, | 367 CONDITION_IOS: COPTS_IOS, |
366 "//conditions:default": COPTS_UNIX, | 368 "//conditions:default": COPTS_UNIX, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 LINKOPTS = select({ | 401 LINKOPTS = select({ |
400 CONDITION_ANDROID: [ | 402 CONDITION_ANDROID: [ |
401 "-ldl", | 403 "-ldl", |
402 "-lEGL", | 404 "-lEGL", |
403 ], | 405 ], |
404 "//conditions:default": ["-ldl"], | 406 "//conditions:default": ["-ldl"], |
405 }) | 407 }) |
406 | 408 |
407 cc_library( | 409 cc_library( |
408 name = "opts_ssse3", | 410 name = "opts_ssse3", |
409 srcs = SRCS_SSSE3, | 411 srcs = SSSE3_SRCS, |
410 copts = COPTS + ["-mssse3"], | 412 copts = COPTS + ["-mssse3"], |
411 defines = DEFINES, | 413 defines = DEFINES, |
412 includes = INCLUDES, | 414 includes = INCLUDES, |
413 deps = EXTERNAL_DEPS_ALL, | 415 deps = EXTERNAL_DEPS_ALL, |
414 ) | 416 ) |
415 | 417 |
416 cc_library( | 418 cc_library( |
417 name = "opts_sse4", | 419 name = "opts_sse4", |
418 srcs = SRCS_SSE4, | 420 srcs = SSE4_SRCS, |
419 copts = COPTS + ["-msse4"], | 421 copts = COPTS + ["-msse4"], |
420 defines = DEFINES, | 422 defines = DEFINES, |
421 includes = INCLUDES, | 423 includes = INCLUDES, |
422 deps = EXTERNAL_DEPS_ALL, | 424 deps = EXTERNAL_DEPS_ALL, |
423 ) | 425 ) |
424 | 426 |
425 cc_library( | 427 cc_library( |
426 name = "skia", | 428 name = "skia", |
427 srcs = SRCS + PLATFORM_SRCS, | 429 srcs = BASE_SRCS + BASE_SRCS_PLATFORM, |
428 hdrs = HDRS, | 430 hdrs = BASE_HDRS, |
429 copts = COPTS, | 431 copts = COPTS, |
430 defines = DEFINES, | 432 defines = DEFINES, |
431 includes = INCLUDES, | 433 includes = INCLUDES, |
432 linkopts = LINKOPTS, | 434 linkopts = LINKOPTS, |
433 visibility = [":skia_clients"], | 435 visibility = [":skia_clients"], |
434 deps = DEPS, | 436 deps = BASE_DEPS, |
435 alwayslink = 1, | 437 alwayslink = 1, |
436 ) | 438 ) |
437 | 439 |
438 cc_test( | 440 cc_test( |
439 name = "dm", | 441 name = "dm", |
440 size = "large", | 442 size = "large", |
441 srcs = DM_SRCS + DM_PLATFORM_SRCS, | 443 srcs = DM_SRCS + DM_PLATFORM_SRCS, |
442 args = [ | 444 args = [ |
443 "--nogpu", | 445 "--nogpu", |
444 "--verbose", | 446 "--verbose", |
445 # TODO(mtklein): maybe investigate why these fail? | 447 # TODO(mtklein): maybe investigate why these fail? |
446 "--match ~FontMgr ~Scalar ~Canvas ~Codec_stripes ~Codec_Dimensions ~Code
c ~Stream ~skps ~Math ~RecordDraw_TextBounds", | 448 "--match ~FontMgr ~Scalar ~Canvas ~Codec_stripes ~Codec_Dimensions ~Code
c ~Stream ~skps ~Math ~RecordDraw_TextBounds", |
447 "--resourcePath %s/resources" % BASE_DIR, | 449 "--resourcePath %s/resources" % BASE_DIR, |
448 "--images %s/resources" % BASE_DIR, | 450 "--images %s/resources" % BASE_DIR, |
449 ], | 451 ], |
450 copts = COPTS, | 452 copts = COPTS, |
451 data = glob(["resources/**/*"]), | 453 data = glob(["resources/**/*"]), |
452 defines = DEFINES, | 454 defines = DEFINES, |
453 includes = DM_INCLUDES, | 455 includes = DM_INCLUDES, |
454 deps = DM_EXTERNAL_DEPS + [ | 456 deps = DM_EXTERNAL_DEPS + [ |
455 ":skia", | 457 ":skia", |
456 ] + EXTERNAL_DEPS_ALL, | 458 ] + EXTERNAL_DEPS_ALL, |
457 ) | 459 ) |
OLD | NEW |