blob: f911b8bdcdf23a76f9186ed0398d53194e870841 [file] [log] [blame]
benjaminwagner56f6d062016-01-13 10:45:19 -08001################################################################################
2# Skylark macros
3################################################################################
benjaminwagner787ca872015-08-17 12:58:10 -07004
benjaminwagner56f6d062016-01-13 10:45:19 -08005def skia_select(conditions, results):
Mike Kleinbec7f102020-06-02 08:12:02 -05006 """select() for conditions provided externally.
7
8 Instead of {"conditionA": resultA, "conditionB": resultB},
9 this takes two arrays, ["conditionA", "conditionB"] and [resultA, resultB].
10
11 This allows the exact targets of the conditions to be provided externally while
12 the results can live here, hiding the structure of those conditions in Google3.
13
14 Maybe this is too much paranoia?
benjaminwagner56f6d062016-01-13 10:45:19 -080015
Ben Wagnerb303a422018-07-31 10:31:06 -040016 Args:
Mike Kleinbec7f102020-06-02 08:12:02 -050017 conditions: [CONDITION_UNIX, CONDITION_ANDROID, CONDITION_IOS, CONDITION_WASM, ...]
18 results: [RESULT_UNIX, RESULT_ANDROID, RESULT_IOS, RESULT_WASM, ....]
Ben Wagnerb303a422018-07-31 10:31:06 -040019 Returns:
Mike Kleinbec7f102020-06-02 08:12:02 -050020 The result matching the active condition.
Ben Wagnerb303a422018-07-31 10:31:06 -040021 """
Ben Wagnerb303a422018-07-31 10:31:06 -040022 selector = {}
Mike Kleinbec7f102020-06-02 08:12:02 -050023 for i in range(len(conditions)):
Ben Wagnerb303a422018-07-31 10:31:06 -040024 selector[conditions[i]] = results[i]
Mike Kleinbec7f102020-06-02 08:12:02 -050025 return select(selector)
benjaminwagner56f6d062016-01-13 10:45:19 -080026
27def skia_glob(srcs):
Ben Wagnerb303a422018-07-31 10:31:06 -040028 """Replaces glob() with a version that accepts a struct.
benjaminwagner56f6d062016-01-13 10:45:19 -080029
Ben Wagnerb303a422018-07-31 10:31:06 -040030 Args:
31 srcs: struct(include=[], exclude=[])
32 Returns:
33 Equivalent of glob(srcs.include, exclude=srcs.exclude)
34 """
35 if hasattr(srcs, "include"):
36 if hasattr(srcs, "exclude"):
37 return native.glob(srcs.include, exclude = srcs.exclude)
38 else:
39 return native.glob(srcs.include)
40 return []
benjaminwagner56f6d062016-01-13 10:45:19 -080041
42################################################################################
Ben Wagner9eca72b2017-10-17 10:57:34 -040043## skia_{all,public}_hdrs()
44################################################################################
45def skia_all_hdrs():
Ben Wagnerb303a422018-07-31 10:31:06 -040046 return native.glob([
47 "src/**/*.h",
48 "include/**/*.h",
49 "third_party/**/*.h",
50 ])
Ben Wagner9eca72b2017-10-17 10:57:34 -040051
52def skia_public_hdrs():
Ben Wagnerb303a422018-07-31 10:31:06 -040053 return native.glob(
54 ["include/**/*.h"],
55 exclude = [
56 "include/private/**/*",
Ben Wagnerb303a422018-07-31 10:31:06 -040057 ],
58 )
Ben Wagner9eca72b2017-10-17 10:57:34 -040059
60################################################################################
61## skia_opts_srcs()
62################################################################################
63# Intel
64SKIA_OPTS_SSE2 = "SSE2"
65
66SKIA_OPTS_SSSE3 = "SSSE3"
67
68SKIA_OPTS_SSE41 = "SSE41"
69
70SKIA_OPTS_SSE42 = "SSE42"
71
72SKIA_OPTS_AVX = "AVX"
73
Mike Klein33d077d2018-02-27 13:43:53 -050074SKIA_OPTS_HSW = "HSW"
75
Ben Wagner9eca72b2017-10-17 10:57:34 -040076# Arm
77SKIA_OPTS_NEON = "NEON"
78
79SKIA_OPTS_CRC32 = "CRC32" # arm64
80
81def opts_srcs(opts):
Ben Wagnerb303a422018-07-31 10:31:06 -040082 if opts == SKIA_OPTS_SSE2:
83 return native.glob([
84 "src/opts/*_SSE2.cpp",
85 "src/opts/*_sse2.cpp", # No matches currently.
86 ])
87 elif opts == SKIA_OPTS_SSSE3:
88 return native.glob([
89 "src/opts/*_SSSE3.cpp",
90 "src/opts/*_ssse3.cpp",
91 ])
92 elif opts == SKIA_OPTS_SSE41:
93 return native.glob([
94 "src/opts/*_sse41.cpp",
95 ])
96 elif opts == SKIA_OPTS_SSE42:
97 return native.glob([
98 "src/opts/*_sse42.cpp",
99 ])
100 elif opts == SKIA_OPTS_AVX:
101 return native.glob([
102 "src/opts/*_avx.cpp",
103 ])
104 elif opts == SKIA_OPTS_HSW:
105 return native.glob([
106 "src/opts/*_hsw.cpp",
107 ])
108 elif opts == SKIA_OPTS_NEON:
109 return native.glob([
110 "src/opts/*_neon.cpp",
111 ])
112 elif opts == SKIA_OPTS_CRC32:
113 return native.glob([
114 "src/opts/*_crc32.cpp",
115 ])
116 else:
117 fail("skia_opts_srcs parameter 'opts' must be one of SKIA_OPTS_*.")
Ben Wagner9eca72b2017-10-17 10:57:34 -0400118
119def opts_cflags(opts):
Ben Wagnerb303a422018-07-31 10:31:06 -0400120 if opts == SKIA_OPTS_SSE2:
121 return ["-msse2"]
122 elif opts == SKIA_OPTS_SSSE3:
123 return ["-mssse3"]
124 elif opts == SKIA_OPTS_SSE41:
125 return ["-msse4.1"]
126 elif opts == SKIA_OPTS_SSE42:
127 return ["-msse4.2"]
128 elif opts == SKIA_OPTS_AVX:
129 return ["-mavx"]
130 elif opts == SKIA_OPTS_HSW:
131 return ["-mavx2", "-mf16c", "-mfma"]
132 elif opts == SKIA_OPTS_NEON:
133 return ["-mfpu=neon"]
134 elif opts == SKIA_OPTS_CRC32:
135 # NDK r11's Clang (3.8) doesn't pass along this -march setting correctly to an external
136 # assembler, so we do it manually with -Wa. This is just a bug, fixed in later Clangs.
137 return ["-march=armv8-a+crc", "-Wa,-march=armv8-a+crc"]
138 else:
139 return []
Ben Wagner9eca72b2017-10-17 10:57:34 -0400140
141SKIA_CPU_ARM = "ARM"
142
143SKIA_CPU_ARM64 = "ARM64"
144
145SKIA_CPU_X86 = "X86"
146
147SKIA_CPU_OTHER = "OTHER"
148
149def opts_rest_srcs(cpu):
Ben Wagnerb303a422018-07-31 10:31:06 -0400150 srcs = []
151 if cpu == SKIA_CPU_ARM or cpu == SKIA_CPU_ARM64:
152 srcs += native.glob([
153 "src/opts/*_arm.cpp",
154 "src/opts/SkBitmapProcState_opts_none.cpp",
155 ])
156 if cpu == SKIA_CPU_ARM64:
157 # NEON doesn't need special flags to compile on ARM64.
158 srcs += native.glob([
159 "src/opts/*_neon.cpp",
160 ])
161 elif cpu == SKIA_CPU_X86:
162 srcs += native.glob([
163 "src/opts/*_x86.cpp",
164 ])
165 elif cpu == SKIA_CPU_OTHER:
166 srcs += native.glob([
167 "src/opts/*_none.cpp",
168 ])
169 else:
170 fail("opts_rest_srcs parameter 'cpu' must be one of " +
171 "SKIA_CPU_{ARM,ARM64,X86,OTHER}.")
172 return srcs
Ben Wagner9eca72b2017-10-17 10:57:34 -0400173
174def skia_opts_deps(cpu):
Ben Wagnerb303a422018-07-31 10:31:06 -0400175 res = [":opts_rest"]
Ben Wagner9eca72b2017-10-17 10:57:34 -0400176
Ben Wagnerb303a422018-07-31 10:31:06 -0400177 if cpu == SKIA_CPU_ARM:
178 res += [":opts_neon"]
Ben Wagner9eca72b2017-10-17 10:57:34 -0400179
Ben Wagnerb303a422018-07-31 10:31:06 -0400180 if cpu == SKIA_CPU_ARM64:
181 res += [":opts_crc32"]
Mike Kleinc29bb572017-10-24 11:40:41 -0400182
Ben Wagnerb303a422018-07-31 10:31:06 -0400183 if cpu == SKIA_CPU_X86:
184 res += [
185 ":opts_sse2",
186 ":opts_ssse3",
187 ":opts_sse41",
188 ":opts_sse42",
189 ":opts_avx",
190 ":opts_hsw",
191 ]
Ben Wagner9eca72b2017-10-17 10:57:34 -0400192
Ben Wagnerb303a422018-07-31 10:31:06 -0400193 return res
Ben Wagner9eca72b2017-10-17 10:57:34 -0400194
195################################################################################
benjaminwagner56f6d062016-01-13 10:45:19 -0800196## BASE_SRCS
197################################################################################
benjaminwagner787ca872015-08-17 12:58:10 -0700198
benjaminwagner39e7aa42015-11-18 13:26:10 -0800199# All platform-independent SRCS.
benjaminwagner56f6d062016-01-13 10:45:19 -0800200BASE_SRCS_ALL = struct(
201 include = [
Ben Wagnerdea74282017-03-16 19:15:09 -0400202 "include/private/**/*.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700203 "src/**/*.h",
204 "src/**/*.cpp",
Ben Wagnerdea74282017-03-16 19:15:09 -0400205 "src/**/*.inc",
benjaminwagner787ca872015-08-17 12:58:10 -0700206 ],
Ben Wagnerdea74282017-03-16 19:15:09 -0400207 exclude = [
benjaminwagner6f6bef82015-10-15 08:09:44 -0700208 # Exclude platform-dependent files.
Mike Klein9509e042019-05-15 21:57:48 +0000209 "src/codec/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700210 "src/device/xps/*", # Windows-only. Move to ports?
211 "src/doc/*_XPS.cpp", # Windows-only. Move to ports?
212 "src/gpu/gl/android/*",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700213 "src/gpu/gl/egl/*",
benjaminwagneraf3b35e2016-03-28 13:27:28 -0700214 "src/gpu/gl/glfw/*",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700215 "src/gpu/gl/glx/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700216 "src/gpu/gl/iOS/*",
217 "src/gpu/gl/mac/*",
218 "src/gpu/gl/win/*",
219 "src/opts/**/*",
220 "src/ports/**/*",
221 "src/utils/android/**/*",
222 "src/utils/mac/**/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700223 "src/utils/win/**/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700224
225 # Exclude multiple definitions.
Kevin Lubickc9210672018-10-15 11:36:55 -0400226 "src/gpu/GrPathRendering_none.cpp",
Kevin Lubick93faa672018-10-10 15:54:53 -0400227 "src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp",
Kevin Lubickc9210672018-10-15 11:36:55 -0400228 "src/gpu/gl/GrGLMakeNativeInterface_none.cpp",
229 "src/pdf/SkDocument_PDF_None.cpp", # We use src/pdf/SkPDFDocument.cpp.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700230
Ben Wagner4ccf49c2018-03-26 15:46:40 -0400231 # Exclude files that don't compile everywhere.
232 "src/svg/**/*", # Depends on xml, SkJpegCodec, and SkPngCodec.
233 "src/xml/**/*", # Avoid dragging in expat when not needed.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700234
benjaminwagner39e7aa42015-11-18 13:26:10 -0800235 # Conflicting dependencies among Lua versions. See cl/107087297.
236 "src/utils/SkLua*",
237
egdaniel32119f12016-02-22 10:07:54 -0800238 # Currently exclude all vulkan specific files
239 "src/gpu/vk/*",
benjaminwagnerc8962512016-09-30 12:06:27 -0700240
Jim Van Verth03b8ab22020-02-24 11:36:15 -0500241 # Currently exclude all Direct3D specific files
242 "src/gpu/d3d/*",
243
Stephen White985741a2019-07-18 11:43:45 -0400244 # Currently exclude all Dawn-specific files
245 "src/gpu/dawn/*",
246
benjaminwagnerc8962512016-09-30 12:06:27 -0700247 # Defines main.
248 "src/sksl/SkSLMain.cpp",
Ethan Nicholas8d7f4ae2017-09-07 11:07:42 -0400249
250 # Only used to regenerate the lexer
251 "src/sksl/lex/*",
Brian Salomoncbcb0a12017-11-19 13:20:13 -0500252
253 # Atlas text
254 "src/atlastext/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700255 ],
256)
257
Hal Canaryce4693f2019-11-20 21:43:54 +0000258def codec_srcs(limited):
259 """Sources for the codecs. Excludes Raw, and Ico, Webp, and Png if limited."""
Ben Wagnerec8c6602018-10-26 12:31:36 -0400260
Hal Canaryb5c217b2019-11-20 10:16:10 -0500261 exclude = ["src/codec/*Raw*.cpp"]
Hal Canaryce4693f2019-11-20 21:43:54 +0000262 if limited:
263 exclude += [
264 "src/codec/*Ico*.cpp",
265 "src/codec/*Webp*.cpp",
266 "src/codec/*Png*",
267 ]
Hal Canaryb5c217b2019-11-20 10:16:10 -0500268 return native.glob(["src/codec/*.cpp"], exclude = exclude)
Ben Wagner9eca72b2017-10-17 10:57:34 -0400269
Mike Klein7f95c292019-03-27 11:16:25 -0500270GL_SRCS_UNIX = struct(
benjaminwagner56f6d062016-01-13 10:45:19 -0800271 include = [
Brian Salomonb3ce76e2017-12-11 15:21:39 -0500272 "src/gpu/gl/GrGLMakeNativeInterface_none.cpp",
Mike Klein7f95c292019-03-27 11:16:25 -0500273 ],
274 exclude = [],
275)
276PORTS_SRCS_UNIX = struct(
277 include = [
benjaminwagner6f6bef82015-10-15 08:09:44 -0700278 "src/ports/**/*.cpp",
279 "src/ports/**/*.h",
280 ],
281 exclude = [
msarett6b4985c2016-03-10 07:15:59 -0800282 "src/ports/*CG*",
msarettfc0b6d12016-03-17 13:50:17 -0700283 "src/ports/*WIC*",
mtklein3f193a92016-03-10 08:52:05 -0800284 "src/ports/*android*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700285 "src/ports/*chromium*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700286 "src/ports/*mac*",
287 "src/ports/*mozalloc*",
288 "src/ports/*nacl*",
289 "src/ports/*win*",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800290 "src/ports/SkFontMgr_custom_directory_factory.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700291 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
benjaminwagnerd9dd5812016-03-21 10:45:01 -0700292 "src/ports/SkFontMgr_custom_empty_factory.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700293 "src/ports/SkFontMgr_empty_factory.cpp",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800294 "src/ports/SkFontMgr_fontconfig_factory.cpp",
Sergey Ulanovf3babcd2018-11-30 17:42:00 -0800295 "src/ports/SkFontMgr_fuchsia.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700296 "src/ports/SkImageGenerator_none.cpp",
mtkleind55d13a2015-08-18 08:51:49 -0700297 ],
298)
299
Mike Klein7f95c292019-03-27 11:16:25 -0500300GL_SRCS_ANDROID = struct(
benjaminwagner56f6d062016-01-13 10:45:19 -0800301 include = [
Ben Wagner773151f2018-08-17 09:28:53 -0400302 "src/gpu/gl/android/*.cpp",
Mike Klein7f95c292019-03-27 11:16:25 -0500303 ],
304 exclude = [],
305)
306PORTS_SRCS_ANDROID = struct(
307 include = [
benjaminwagner86ea33e2015-10-26 10:46:25 -0700308 "src/ports/**/*.cpp",
309 "src/ports/**/*.h",
310 ],
311 exclude = [
msarett6b4985c2016-03-10 07:15:59 -0800312 "src/ports/*CG*",
mtklein3f193a92016-03-10 08:52:05 -0800313 "src/ports/*FontConfig*",
msarettfc0b6d12016-03-17 13:50:17 -0700314 "src/ports/*WIC*",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700315 "src/ports/*chromium*",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700316 "src/ports/*fontconfig*",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700317 "src/ports/*mac*",
318 "src/ports/*mozalloc*",
319 "src/ports/*nacl*",
320 "src/ports/*win*",
321 "src/ports/SkDebug_stdio.cpp",
322 "src/ports/SkFontMgr_custom_directory_factory.cpp",
323 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
benjaminwagnerd9dd5812016-03-21 10:45:01 -0700324 "src/ports/SkFontMgr_custom_empty_factory.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700325 "src/ports/SkFontMgr_empty_factory.cpp",
Sergey Ulanovf3babcd2018-11-30 17:42:00 -0800326 "src/ports/SkFontMgr_fuchsia.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700327 "src/ports/SkImageGenerator_none.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700328 ],
329)
330
Mike Klein7f95c292019-03-27 11:16:25 -0500331GL_SRCS_IOS = struct(
benjaminwagner56f6d062016-01-13 10:45:19 -0800332 include = [
Brian Salomon3d6801e2017-12-11 10:06:31 -0500333 "src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp",
Mike Klein7f95c292019-03-27 11:16:25 -0500334 ],
335 exclude = [],
336)
337PORTS_SRCS_IOS = struct(
338 include = [
iroth8b99ef42015-11-02 11:11:21 -0800339 "src/ports/**/*.cpp",
340 "src/ports/**/*.h",
irothab669de2016-02-16 19:17:01 -0800341 "src/utils/mac/*.cpp",
iroth8b99ef42015-11-02 11:11:21 -0800342 ],
343 exclude = [
mtklein3f193a92016-03-10 08:52:05 -0800344 "src/ports/*FontConfig*",
345 "src/ports/*FreeType*",
msarettfc0b6d12016-03-17 13:50:17 -0700346 "src/ports/*WIC*",
iroth8b99ef42015-11-02 11:11:21 -0800347 "src/ports/*android*",
348 "src/ports/*chromium*",
349 "src/ports/*fontconfig*",
iroth8b99ef42015-11-02 11:11:21 -0800350 "src/ports/*mozalloc*",
351 "src/ports/*nacl*",
352 "src/ports/*win*",
iroth8b99ef42015-11-02 11:11:21 -0800353 "src/ports/SkFontMgr_custom.cpp",
Ben Wagner8ab590f2017-02-08 17:29:33 -0500354 "src/ports/SkFontMgr_custom_directory.cpp",
355 "src/ports/SkFontMgr_custom_embedded.cpp",
356 "src/ports/SkFontMgr_custom_empty.cpp",
iroth8b99ef42015-11-02 11:11:21 -0800357 "src/ports/SkFontMgr_custom_directory_factory.cpp",
358 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
benjaminwagnerd9dd5812016-03-21 10:45:01 -0700359 "src/ports/SkFontMgr_custom_empty_factory.cpp",
iroth8b99ef42015-11-02 11:11:21 -0800360 "src/ports/SkFontMgr_empty_factory.cpp",
Sergey Ulanovf3babcd2018-11-30 17:42:00 -0800361 "src/ports/SkFontMgr_fuchsia.cpp",
iroth8b99ef42015-11-02 11:11:21 -0800362 "src/ports/SkImageGenerator_none.cpp",
iroth8b99ef42015-11-02 11:11:21 -0800363 ],
364)
365
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500366GL_SRCS_WASM = struct(
367 include = [
368 "src/gpu/gl/GrGLMakeNativeInterface_egl.cpp",
369 "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp",
370 ],
371 exclude = [],
372)
373PORTS_SRCS_WASM = struct(
374 include = [
375 "src/ports/**/*.cpp",
376 "src/ports/**/*.h",
377 ],
378 exclude = [
379 # commented lines below left in because they indicate specifically what is
380 # included here and not in other PORTS_SRCS lists.
381 "src/ports/*FontConfig*",
382 "src/ports/*FreeType*",
383 "src/ports/*WIC*",
384 "src/ports/*CG*",
385 "src/ports/*android*",
386 "src/ports/*chromium*",
387 "src/ports/*fontconfig*",
388 "src/ports/*mac*",
389 "src/ports/*mozalloc*",
390 "src/ports/*nacl*",
391 "src/ports/*win*",
392 #"src/ports/SkDebug_stdio.cpp",
393 "src/ports/SkFontMgr_custom.cpp",
394 "src/ports/SkFontMgr_custom_directory.cpp",
395 "src/ports/SkFontMgr_custom_directory_factory.cpp",
396 "src/ports/SkFontMgr_custom_embedded.cpp",
397 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
398 "src/ports/SkFontMgr_custom_empty.cpp",
399 "src/ports/SkFontMgr_custom_empty_factory.cpp",
400 # "src/ports/SkFontMgr_empty_factory.cpp",
401 "src/ports/SkFontMgr_fontconfig_factory.cpp",
402 "src/ports/SkFontMgr_fuchsia.cpp",
403 "src/ports/SkImageGenerator_none.cpp",
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500404 ],
405)
406
Mike Klein7f95c292019-03-27 11:16:25 -0500407def base_srcs():
408 return skia_glob(BASE_SRCS_ALL)
409
410def ports_srcs(os_conditions):
Mike Klein299ea7b2019-03-27 13:53:08 -0500411 return skia_select(
412 os_conditions,
Ben Wagnerb303a422018-07-31 10:31:06 -0400413 [
Mike Klein7f95c292019-03-27 11:16:25 -0500414 skia_glob(PORTS_SRCS_UNIX),
415 skia_glob(PORTS_SRCS_ANDROID),
416 skia_glob(PORTS_SRCS_IOS),
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500417 skia_glob(PORTS_SRCS_WASM),
Mike Klein299ea7b2019-03-27 13:53:08 -0500418 ],
419 )
Mike Klein7f95c292019-03-27 11:16:25 -0500420
421def gl_srcs(os_conditions):
Mike Klein299ea7b2019-03-27 13:53:08 -0500422 return skia_select(
423 os_conditions,
Mike Klein7f95c292019-03-27 11:16:25 -0500424 [
425 skia_glob(GL_SRCS_UNIX),
426 skia_glob(GL_SRCS_ANDROID),
427 skia_glob(GL_SRCS_IOS),
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500428 skia_glob(GL_SRCS_WASM),
Mike Klein299ea7b2019-03-27 13:53:08 -0500429 ],
430 )
Mike Klein7f95c292019-03-27 11:16:25 -0500431
432def skia_srcs(os_conditions):
433 return base_srcs() + ports_srcs(os_conditions) + gl_srcs(os_conditions)
434
Hal Canary6ad6c502019-12-11 14:09:16 -0500435def metal_objc_srcs():
436 return native.glob(
437 [
438 "include/**/*.h",
439 "src/**/*.h",
440 "src/gpu/mtl/**/*.mm",
441 "third_party/**/*.h",
Ben Wagner8718be92019-12-11 20:11:30 -0500442 ],
Hal Canary6ad6c502019-12-11 14:09:16 -0500443 ) + [
444 "src/image/SkSurface_GpuMtl.mm",
445 ]
446
benjaminwagner56f6d062016-01-13 10:45:19 -0800447################################################################################
448## INCLUDES
449################################################################################
benjaminwagner39e7aa42015-11-18 13:26:10 -0800450
benjaminwagner787ca872015-08-17 12:58:10 -0700451# Includes needed by Skia implementation. Not public includes.
452INCLUDES = [
Mike Kleinc0bd9f92019-04-23 12:05:21 -0500453 ".",
benjaminwagnerfa7e1a02015-11-13 12:27:08 -0800454 "include/android",
benjaminwagner787ca872015-08-17 12:58:10 -0700455 "include/c",
456 "include/codec",
457 "include/config",
458 "include/core",
Ben Wagnercc62b5d2018-09-20 16:26:31 -0400459 "include/docs",
benjaminwagner787ca872015-08-17 12:58:10 -0700460 "include/effects",
Matt Sarettd7093c22017-05-09 15:28:32 -0400461 "include/encode",
benjaminwagner787ca872015-08-17 12:58:10 -0700462 "include/gpu",
benjaminwagner787ca872015-08-17 12:58:10 -0700463 "include/pathops",
benjaminwagner787ca872015-08-17 12:58:10 -0700464 "include/ports",
465 "include/private",
Brian Osmanea236bf2019-04-29 10:28:22 -0400466 "include/third_party/skcms",
benjaminwagner787ca872015-08-17 12:58:10 -0700467 "include/utils",
iroth8b99ef42015-11-02 11:11:21 -0800468 "include/utils/mac",
benjaminwagnerfa7e1a02015-11-13 12:27:08 -0800469 "src/codec",
benjaminwagner787ca872015-08-17 12:58:10 -0700470 "src/core",
benjaminwagner787ca872015-08-17 12:58:10 -0700471 "src/gpu",
472 "src/image",
Mike Klein135a1b12017-08-15 13:13:59 -0400473 "src/images",
benjaminwagner787ca872015-08-17 12:58:10 -0700474 "src/lazy",
475 "src/opts",
476 "src/pdf",
Ben Wagner4ccf49c2018-03-26 15:46:40 -0400477 "src/ports",
benjaminwagner787ca872015-08-17 12:58:10 -0700478 "src/sfnt",
Florin Malita5edba452017-05-30 16:39:47 -0400479 "src/shaders",
Michael Ludwig4f94ef62018-09-12 15:22:16 -0400480 "src/shaders/gradients",
benjaminwagnerc8962512016-09-30 12:06:27 -0700481 "src/sksl",
benjaminwagner787ca872015-08-17 12:58:10 -0700482 "src/utils",
Ben Wagnerd0a3b062016-10-24 14:11:12 -0400483 "third_party/gif",
benjaminwagner56f6d062016-01-13 10:45:19 -0800484]
benjaminwagner787ca872015-08-17 12:58:10 -0700485
benjaminwagner56f6d062016-01-13 10:45:19 -0800486################################################################################
487## DM_SRCS
488################################################################################
benjaminwagner86ea33e2015-10-26 10:46:25 -0700489
benjaminwagner56f6d062016-01-13 10:45:19 -0800490DM_SRCS_ALL = struct(
491 include = [
benjaminwagner6f6bef82015-10-15 08:09:44 -0700492 "dm/*.cpp",
493 "dm/*.h",
Mike Klein60900b52018-09-21 11:19:45 -0400494 "experimental/pipe/*.cpp",
495 "experimental/pipe/*.h",
Ben Wagner4ccf49c2018-03-26 15:46:40 -0400496 "experimental/svg/model/*.cpp",
497 "experimental/svg/model/*.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700498 "gm/*.cpp",
499 "gm/*.h",
Tyler Denniston45f94f82020-02-04 16:09:08 -0500500 "gm/verifiers/*.cpp",
501 "gm/verifiers/*.h",
Nathaniel Nifong0426c382019-06-21 11:09:19 -0400502 "src/utils/SkMultiPictureDocument.cpp",
Ben Wagner4ccf49c2018-03-26 15:46:40 -0400503 "src/xml/*.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700504 "tests/*.cpp",
505 "tests/*.h",
Jim Van Verth8a9a3712019-05-31 10:49:12 -0400506 "tools/AutoreleasePool.h",
benjaminwagner99fb6702016-07-28 15:12:21 -0700507 "tools/BigPathBench.inc",
Hal Canarye574f1e2019-07-15 14:01:37 -0400508 "tools/BinaryAsset.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700509 "tools/CrashHandler.cpp",
510 "tools/CrashHandler.h",
Robert Phillipse61ba842018-05-30 08:27:26 -0400511 "tools/DDLPromiseImageHelper.cpp",
512 "tools/DDLPromiseImageHelper.h",
513 "tools/DDLTileHelper.cpp",
514 "tools/DDLTileHelper.h",
Mike Kleinb61e25b2019-03-27 10:51:28 -0500515 "tools/HashAndEncode.cpp",
516 "tools/HashAndEncode.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700517 "tools/ProcStats.cpp",
518 "tools/ProcStats.h",
Ben Wagnerfb4487b2018-03-26 17:48:09 -0400519 "tools/Registry.h",
520 "tools/ResourceFactory.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700521 "tools/Resources.cpp",
522 "tools/Resources.h",
Hal Canarye574f1e2019-07-15 14:01:37 -0400523 "tools/SkMetaData.cpp",
524 "tools/SkMetaData.h",
525 "tools/SkSharingProc.cpp",
Mike Kleina4bb0202019-06-04 13:40:15 -0500526 "tools/SkVMBuilders.cpp",
527 "tools/SkVMBuilders.h",
Hal Canarye574f1e2019-07-15 14:01:37 -0400528 "tools/ToolUtils.cpp",
529 "tools/ToolUtils.h",
benjaminwagner99fb6702016-07-28 15:12:21 -0700530 "tools/UrlDataManager.cpp",
531 "tools/UrlDataManager.h",
532 "tools/debugger/*.cpp",
533 "tools/debugger/*.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700534 "tools/flags/*.cpp",
535 "tools/flags/*.h",
Mike Klein0cffcbf92019-03-20 11:08:46 -0500536 "tools/fonts/RandomScalerContext.cpp",
537 "tools/fonts/RandomScalerContext.h",
538 "tools/fonts/TestFontMgr.cpp",
539 "tools/fonts/TestFontMgr.h",
540 "tools/fonts/TestSVGTypeface.cpp",
541 "tools/fonts/TestSVGTypeface.h",
542 "tools/fonts/TestTypeface.cpp",
543 "tools/fonts/TestTypeface.h",
Mike Kleinea3f0142019-03-20 11:12:10 -0500544 "tools/fonts/ToolUtilsFont.cpp",
Hal Canarye574f1e2019-07-15 14:01:37 -0400545 "tools/fonts/test_font_index.inc",
Ben Wagner483c7722018-02-20 17:06:07 -0500546 "tools/fonts/test_font_monospace.inc",
547 "tools/fonts/test_font_sans_serif.inc",
548 "tools/fonts/test_font_serif.inc",
benjaminwagner38d68bc2016-04-01 05:00:51 -0700549 "tools/gpu/**/*.cpp",
550 "tools/gpu/**/*.h",
Hal Canarye574f1e2019-07-15 14:01:37 -0400551 "tools/ios_utils.h",
mtkleine1fc4522016-02-09 12:32:52 -0800552 "tools/random_parse_path.cpp",
553 "tools/random_parse_path.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700554 "tools/timer/*.cpp",
555 "tools/timer/*.h",
Brian Salomon40d01192017-07-19 13:05:11 -0400556 "tools/trace/*.cpp",
557 "tools/trace/*.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700558 ],
559 exclude = [
Mike Kleindb537602018-06-01 11:01:11 -0400560 "gm/cgms.cpp",
Mike Kleinc4abade2019-08-09 10:11:35 -0400561 "gm/fiddle.cpp",
Mike Reed7bf160e2019-05-17 16:50:51 -0400562 "gm/video_decoder.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700563 "tests/FontMgrAndroidParserTest.cpp", # Android-only.
Ben Wagner37a06c02018-06-22 21:11:00 +0000564 "tests/FontMgrFontConfigTest.cpp", # FontConfig-only.
Julia Lavrovaf0ade8a2019-11-08 12:58:57 -0500565 "tests/SkParagraphTest.cpp", # Skipping tests for now.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700566 "tests/skia_test.cpp", # Old main.
Brian Salomonf9ec4702017-11-19 14:46:36 -0500567 "tools/gpu/atlastext/*",
Jim Van Verth03b8ab22020-02-24 11:36:15 -0500568 "tools/gpu/d3d/*",
Stephen White985741a2019-07-18 11:43:45 -0400569 "tools/gpu/dawn/*",
benjaminwagner38d68bc2016-04-01 05:00:51 -0700570 "tools/gpu/gl/angle/*",
benjaminwagner38d68bc2016-04-01 05:00:51 -0700571 "tools/gpu/gl/egl/*",
572 "tools/gpu/gl/glx/*",
573 "tools/gpu/gl/iOS/*",
574 "tools/gpu/gl/mac/*",
benjaminwagner38d68bc2016-04-01 05:00:51 -0700575 "tools/gpu/gl/win/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700576 "tools/timer/SysTimer_mach.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700577 "tools/timer/SysTimer_windows.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700578 ],
579)
580
Ben Wagnerdea74282017-03-16 19:15:09 -0400581################################################################################
582## dm_srcs()
583################################################################################
benjaminwagner86ea33e2015-10-26 10:46:25 -0700584
Ben Wagner9eca72b2017-10-17 10:57:34 -0400585def dm_srcs(os_conditions):
Ben Wagnerb303a422018-07-31 10:31:06 -0400586 """Sources for the dm binary for the specified os."""
587 return skia_glob(DM_SRCS_ALL) + skia_select(
588 os_conditions,
589 [
Ben Wagnerc5ee4992019-03-25 15:58:31 -0400590 ["tests/FontMgrFontConfigTest.cpp"],
Ben Wagnerb303a422018-07-31 10:31:06 -0400591 ["tests/FontMgrAndroidParserTest.cpp"],
592 [],
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500593 [],
Ben Wagnerb303a422018-07-31 10:31:06 -0400594 ],
595 )
benjaminwagner56f6d062016-01-13 10:45:19 -0800596
597################################################################################
benjaminwagner56f6d062016-01-13 10:45:19 -0800598## DM_ARGS
599################################################################################
benjaminwagner86ea33e2015-10-26 10:46:25 -0700600
Ben Wagner59f9edb2016-11-28 15:30:37 -0500601def DM_ARGS(asan):
Mike Kleindd650c42018-11-08 14:26:02 -0500602 source = ["gm", "image", "lottie"]
Ben Wagnerb303a422018-07-31 10:31:06 -0400603
604 # TODO(benjaminwagner): f16, pic-8888, serialize-8888, and tiles_rt-8888 fail.
605 config = ["565", "8888", "pdf"]
606 match = ["~Codec_78329453"]
607 return (["--src"] + source + ["--config"] + config + ["--nonativeFonts"] +
608 ["--match"] + match)
benjaminwagner56f6d062016-01-13 10:45:19 -0800609
610################################################################################
611## COPTS
612################################################################################
iroth8b99ef42015-11-02 11:11:21 -0800613
Ben Wagner9eca72b2017-10-17 10:57:34 -0400614def base_copts(os_conditions):
Ben Wagnerb303a422018-07-31 10:31:06 -0400615 return skia_select(
616 os_conditions,
617 [
618 # UNIX
619 [
620 "-Wno-implicit-fallthrough", # Some intentional fallthrough.
621 # Internal use of deprecated methods. :(
622 "-Wno-deprecated-declarations",
623 # TODO(kjlubick)
624 "-Wno-self-assign", # Spurious warning in tests/PathOpsDVectorTest.cpp?
625 ],
626 # ANDROID
627 [
Mike Klein9b7e99e2018-08-22 16:45:11 -0400628 "-Wno-implicit-fallthrough", # Some intentional fallthrough.
Ben Wagnerb303a422018-07-31 10:31:06 -0400629 # 'GrResourceCache' declared with greater visibility than the
630 # type of its field 'GrResourceCache::fPurgeableQueue'... bogus.
631 "-Wno-error=attributes",
632 ],
633 # IOS
Benjamin Barenblatfd10d172018-07-31 16:41:37 -0400634 [
635 "-Wno-implicit-fallthrough", # Some intentional fallthrough.
636 ],
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500637 # WASM
638 [
639 "-Wno-implicit-fallthrough", # Some intentional fallthrough.
640 ],
Ben Wagnerb303a422018-07-31 10:31:06 -0400641 ],
642 )
benjaminwagner56f6d062016-01-13 10:45:19 -0800643
644################################################################################
645## DEFINES
646################################################################################
647
Ben Wagner9eca72b2017-10-17 10:57:34 -0400648def base_defines(os_conditions):
Ben Wagnerb303a422018-07-31 10:31:06 -0400649 return [
650 # Chrome DEFINES.
651 "SK_USE_FREETYPE_EMBOLDEN",
652 # Turn on a few Google3-specific build fixes.
653 "SK_BUILD_FOR_GOOGLE3",
654 # Required for building dm.
655 "GR_TEST_UTILS",
Robert Phillips6db27c22019-05-01 10:43:56 -0400656 # Google3 probably doesn't want this feature yet
657 "SK_DISABLE_REDUCE_OPLIST_SPLITTING",
Ben Wagnerb303a422018-07-31 10:31:06 -0400658 # Staging flags for API changes
659 # Should remove after we update golden images
660 "SK_WEBP_ENCODER_USE_DEFAULT_METHOD",
661 # Experiment to diagnose image diffs in Google3
Mike Klein0ade68c2018-10-24 06:52:35 -0400662 "SK_DISABLE_LOWP_RASTER_PIPELINE",
Ben Wagnerb303a422018-07-31 10:31:06 -0400663 # JPEG is in codec_limited
Leon Scroggins IIIa77f30c2020-03-09 14:23:30 -0400664 "SK_CODEC_DECODES_JPEG",
665 "SK_ENCODE_JPEG",
Brian Osman489cf882019-07-09 10:48:28 -0400666 # Needed for some tests in dm
667 "SK_ENABLE_SKSL_INTERPRETER",
Ben Wagnerb303a422018-07-31 10:31:06 -0400668 ] + skia_select(
669 os_conditions,
670 [
671 # UNIX
672 [
673 "PNG_SKIP_SETJMP_CHECK",
674 "SK_BUILD_FOR_UNIX",
Leon Scroggins IIIa77f30c2020-03-09 14:23:30 -0400675 "SK_CODEC_DECODES_PNG",
676 "SK_CODEC_DECODES_WEBP",
677 "SK_ENCODE_PNG",
678 "SK_ENCODE_WEBP",
Mike Kleinf0a53692019-04-24 11:42:40 -0500679 "SK_R32_SHIFT=16",
Ben Wagnerb303a422018-07-31 10:31:06 -0400680 ],
681 # ANDROID
682 [
683 "SK_BUILD_FOR_ANDROID",
Leon Scroggins IIIa77f30c2020-03-09 14:23:30 -0400684 "SK_CODEC_DECODES_PNG",
685 "SK_CODEC_DECODES_WEBP",
686 "SK_ENCODE_PNG",
687 "SK_ENCODE_WEBP",
Ben Wagnerb303a422018-07-31 10:31:06 -0400688 ],
689 # IOS
690 [
691 "SK_BUILD_FOR_IOS",
692 "SK_BUILD_NO_OPTS",
693 "SKNX_NO_SIMD",
Mike Kleindbbf7532020-03-06 12:04:33 -0600694 "SK_NO_COMMAND_BUFFER", # Test tools that use thread_local.
Ben Wagnerb303a422018-07-31 10:31:06 -0400695 ],
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500696 # WASM
697 [
698 "SK_DISABLE_LEGACY_SHADERCONTEXT",
699 "SK_DISABLE_TRACING",
700 "GR_GL_CHECK_ALLOC_WITH_GET_ERROR=0",
701 "SK_SUPPORT_GPU=1",
702 "SK_DISABLE_AAA",
703 "SK_DISABLE_EFFECT_DESERIALIZATION",
704 "SK_FORCE_8_BYTE_ALIGNMENT",
705 "SKNX_NO_SIMD",
706 ],
Ben Wagnerb303a422018-07-31 10:31:06 -0400707 ],
708 )
benjaminwagner787ca872015-08-17 12:58:10 -0700709
benjaminwagner56f6d062016-01-13 10:45:19 -0800710################################################################################
711## LINKOPTS
712################################################################################
benjaminwagner86ea33e2015-10-26 10:46:25 -0700713
Ben Wagner9eca72b2017-10-17 10:57:34 -0400714def base_linkopts(os_conditions):
Ben Wagnerb303a422018-07-31 10:31:06 -0400715 return [
716 "-ldl",
717 ] + skia_select(
718 os_conditions,
719 [
720 # UNIX
721 [],
722 # ANDROID
723 [
724 "-lEGL",
Ben Wagner773151f2018-08-17 09:28:53 -0400725 "-lGLESv2",
Ben Wagnerb303a422018-07-31 10:31:06 -0400726 ],
727 # IOS
728 [
729 "-framework CoreFoundation",
730 "-framework CoreGraphics",
731 "-framework CoreText",
732 "-framework ImageIO",
733 "-framework MobileCoreServices",
734 ],
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500735 # WASM
736 [],
Ben Wagnerb303a422018-07-31 10:31:06 -0400737 ],
738 )
Florin Malitadcc9d062018-11-08 14:25:19 -0500739
740################################################################################
Florin Malitae4e95512019-05-03 14:03:50 -0400741## sksg_lib
Florin Malitadcc9d062018-11-08 14:25:19 -0500742################################################################################
743
Florin Malitae4e95512019-05-03 14:03:50 -0400744def sksg_lib_hdrs():
745 return native.glob(["modules/sksg/include/*.h"])
746
747def sksg_lib_srcs():
Florin Malitaccacfa02019-07-10 13:38:48 -0400748 return native.glob([
749 "modules/sksg/src/*.cpp",
750 "modules/sksg/src/*.h",
751 ])
Florin Malitae4e95512019-05-03 14:03:50 -0400752
753################################################################################
Julia Lavrova5ec1b8f2019-06-10 11:10:17 -0400754## skparagraph_lib
755################################################################################
756
757def skparagraph_lib_hdrs():
758 return native.glob(["modules/skparagraph/include/*.h"])
759
760def skparagraph_lib_srcs():
761 return native.glob(["modules/skparagraph/src/*.cpp"])
762
763################################################################################
Mike Reeddaf19452019-06-11 17:20:33 -0400764## experimental xform
765################################################################################
766
767def exp_xform_lib_hdrs():
768 return native.glob(["experimental/xform/*.h"])
769
770def exp_xform_lib_srcs():
771 return native.glob(["experimental/xform/*.cpp"])
772
773################################################################################
Hal Canary484384b2019-12-17 10:50:26 -0500774## skresources_lib
775################################################################################
776
777def skresources_lib_hdrs():
778 return ["modules/skresources/include/SkResources.h"]
779
780def skresources_lib_srcs():
781 return ["modules/skresources/src/SkResources.cpp"]
782
783################################################################################
Florin Malitae4e95512019-05-03 14:03:50 -0400784## skottie_lib
785################################################################################
786
787def skottie_lib_hdrs():
Florin Malita1b1b6572019-05-03 15:16:30 -0400788 return native.glob(["modules/skottie/include/*.h"])
Florin Malitae4e95512019-05-03 14:03:50 -0400789
790def skottie_lib_srcs():
791 return native.glob(
792 [
793 "modules/skottie/src/*.cpp",
794 "modules/skottie/src/*.h",
Florin Malita141ac682020-03-17 11:20:10 -0400795 "modules/skottie/src/animator/*.cpp",
796 "modules/skottie/src/animator/*.h",
Florin Malitae47d8af2019-06-14 12:20:10 -0400797 "modules/skottie/src/effects/*.cpp",
798 "modules/skottie/src/effects/*.h",
Florin Malita45dc1f02019-07-01 13:57:43 -0400799 "modules/skottie/src/layers/*.cpp",
800 "modules/skottie/src/layers/*.h",
Florin Malitacbf31d02020-01-22 14:22:21 -0500801 "modules/skottie/src/layers/shapelayer/*.cpp",
802 "modules/skottie/src/layers/shapelayer/*.h",
Florin Malitaca449d52019-05-08 10:04:09 -0400803 "modules/skottie/src/text/*.cpp",
804 "modules/skottie/src/text/*.h",
Florin Malitae4e95512019-05-03 14:03:50 -0400805 ],
806 exclude = [
807 "modules/skottie/src/SkottieTest.cpp",
808 "modules/skottie/src/SkottieTool.cpp",
809 ],
810 )
811
812################################################################################
813## skottie_shaper
814################################################################################
815
816SKOTTIE_SHAPER_HDRS = [
Florin Malitaca449d52019-05-08 10:04:09 -0400817 "modules/skottie/src/text/SkottieShaper.h",
Florin Malitadcc9d062018-11-08 14:25:19 -0500818]
819
Florin Malitae4e95512019-05-03 14:03:50 -0400820SKOTTIE_SHAPER_SRCS = [
Florin Malitaca449d52019-05-08 10:04:09 -0400821 "modules/skottie/src/text/SkottieShaper.cpp",
Florin Malitae4e95512019-05-03 14:03:50 -0400822]
823
824################################################################################
825## skottie_tool
826################################################################################
827
Florin Malitadcc9d062018-11-08 14:25:19 -0500828SKOTTIE_TOOL_SRCS = [
829 "modules/skottie/src/SkottieTool.cpp",
Brian Osman849f4d62019-11-26 08:58:26 -0500830 "modules/skresources/src/SkResources.cpp",
831 "modules/skresources/include/SkResources.h",
Florin Malitadcc9d062018-11-08 14:25:19 -0500832 # TODO(benjaminwagner): Add "flags" target.
Mike Klein88544fb2019-03-20 10:50:33 -0500833 "tools/flags/CommandLineFlags.cpp",
834 "tools/flags/CommandLineFlags.h",
Florin Malitadcc9d062018-11-08 14:25:19 -0500835]
Florin Malita6d415bc2019-01-17 16:42:15 -0500836
837################################################################################
838## SkShaper
839################################################################################
840
Florin Malita226ba982019-01-21 11:55:51 -0500841SKSHAPER_HARFBUZZ_SRCS = [
Florin Malita6d415bc2019-01-17 16:42:15 -0500842 "modules/skshaper/include/SkShaper.h",
843 "modules/skshaper/src/SkShaper.cpp",
844 "modules/skshaper/src/SkShaper_harfbuzz.cpp",
Hal Canary30c9eda2019-02-22 15:23:45 -0500845 "modules/skshaper/src/SkShaper_primitive.cpp",
Florin Malita6d415bc2019-01-17 16:42:15 -0500846]
Florin Malita226ba982019-01-21 11:55:51 -0500847
848SKSHAPER_PRIMITIVE_SRCS = [
849 "modules/skshaper/include/SkShaper.h",
850 "modules/skshaper/src/SkShaper.cpp",
851 "modules/skshaper/src/SkShaper_primitive.cpp",
852]
Hal Canaryb56b5542019-12-19 09:48:28 -0500853
854################################################################################
855## skottie_ios_lib
856################################################################################
857
858SKOTTIE_IOS_LIB_SRCS = [
Hal Canary118df7c2019-12-18 16:26:19 -0500859 "tools/skottie_ios_app/SkiaContext.mm",
860 "tools/skottie_ios_app/SkiaUIContext.mm",
861 "tools/skottie_ios_app/SkiaViewController.mm",
862 "tools/skottie_ios_app/SkottieViewController.mm",
Hal Canaryb56b5542019-12-19 09:48:28 -0500863]
864
865SKOTTIE_IOS_LIB_HDRS = [
Hal Canary118df7c2019-12-18 16:26:19 -0500866 "tools/skottie_ios_app/SkiaContext.h",
867 "tools/skottie_ios_app/SkiaViewController.h",
868 "tools/skottie_ios_app/SkottieViewController.h",
Hal Canaryb56b5542019-12-19 09:48:28 -0500869]
Hal Canary76cc2c52020-01-07 12:39:13 -0500870
871SKOTTIE_IOS_LIB_SDK_FRAMEWORKS = [
872 "Foundation",
873 "UIKit",
874]