blob: 95fee11b93ede7d67fb9a29c5f85d6c72ffb6873 [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 -08005is_bazel = not hasattr(native, "genmpm")
6
7def portable_select(select_dict, bazel_condition, default_condition):
Ben Wagnerb303a422018-07-31 10:31:06 -04008 """Replaces select() with a Bazel-friendly wrapper.
benjaminwagner56f6d062016-01-13 10:45:19 -08009
Ben Wagnerb303a422018-07-31 10:31:06 -040010 Args:
11 select_dict: Dictionary in the same format as select().
12 Returns:
13 If Blaze platform, returns select() using select_dict.
14 If Bazel platform, returns dependencies for condition
15 bazel_condition, or empty list if none specified.
16 """
17 if is_bazel:
18 return select_dict.get(bazel_condition, select_dict[default_condition])
19 else:
20 return select(select_dict)
benjaminwagner56f6d062016-01-13 10:45:19 -080021
22def skia_select(conditions, results):
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -050023 """Replaces select() for conditions [UNIX, ANDROID, IOS, WASM]
benjaminwagner56f6d062016-01-13 10:45:19 -080024
Ben Wagnerb303a422018-07-31 10:31:06 -040025 Args:
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -050026 conditions: [CONDITION_UNIX, CONDITION_ANDROID, CONDITION_IOS, CONDITION_WASM]
27 results: [RESULT_UNIX, RESULT_ANDROID, RESULT_IOS, RESULT_WASM]
Ben Wagnerb303a422018-07-31 10:31:06 -040028 Returns:
29 The result matching the platform condition.
30 """
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -050031 if len(conditions) != 4 or len(results) != 4:
32 fail("Must provide exactly 4 conditions and 4 results")
benjaminwagner56f6d062016-01-13 10:45:19 -080033
Ben Wagnerb303a422018-07-31 10:31:06 -040034 selector = {}
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -050035 for i in range(4):
Ben Wagnerb303a422018-07-31 10:31:06 -040036 selector[conditions[i]] = results[i]
37 return portable_select(selector, conditions[2], conditions[0])
benjaminwagner56f6d062016-01-13 10:45:19 -080038
39def skia_glob(srcs):
Ben Wagnerb303a422018-07-31 10:31:06 -040040 """Replaces glob() with a version that accepts a struct.
benjaminwagner56f6d062016-01-13 10:45:19 -080041
Ben Wagnerb303a422018-07-31 10:31:06 -040042 Args:
43 srcs: struct(include=[], exclude=[])
44 Returns:
45 Equivalent of glob(srcs.include, exclude=srcs.exclude)
46 """
47 if hasattr(srcs, "include"):
48 if hasattr(srcs, "exclude"):
49 return native.glob(srcs.include, exclude = srcs.exclude)
50 else:
51 return native.glob(srcs.include)
52 return []
benjaminwagner56f6d062016-01-13 10:45:19 -080053
54################################################################################
Ben Wagner9eca72b2017-10-17 10:57:34 -040055## skia_{all,public}_hdrs()
56################################################################################
57def skia_all_hdrs():
Ben Wagnerb303a422018-07-31 10:31:06 -040058 return native.glob([
59 "src/**/*.h",
60 "include/**/*.h",
61 "third_party/**/*.h",
62 ])
Ben Wagner9eca72b2017-10-17 10:57:34 -040063
64def skia_public_hdrs():
Ben Wagnerb303a422018-07-31 10:31:06 -040065 return native.glob(
66 ["include/**/*.h"],
67 exclude = [
68 "include/private/**/*",
Ben Wagnerb303a422018-07-31 10:31:06 -040069 ],
70 )
Ben Wagner9eca72b2017-10-17 10:57:34 -040071
72################################################################################
73## skia_opts_srcs()
74################################################################################
75# Intel
76SKIA_OPTS_SSE2 = "SSE2"
77
78SKIA_OPTS_SSSE3 = "SSSE3"
79
80SKIA_OPTS_SSE41 = "SSE41"
81
82SKIA_OPTS_SSE42 = "SSE42"
83
84SKIA_OPTS_AVX = "AVX"
85
Mike Klein33d077d2018-02-27 13:43:53 -050086SKIA_OPTS_HSW = "HSW"
87
Ben Wagner9eca72b2017-10-17 10:57:34 -040088# Arm
89SKIA_OPTS_NEON = "NEON"
90
91SKIA_OPTS_CRC32 = "CRC32" # arm64
92
93def opts_srcs(opts):
Ben Wagnerb303a422018-07-31 10:31:06 -040094 if opts == SKIA_OPTS_SSE2:
95 return native.glob([
96 "src/opts/*_SSE2.cpp",
97 "src/opts/*_sse2.cpp", # No matches currently.
98 ])
99 elif opts == SKIA_OPTS_SSSE3:
100 return native.glob([
101 "src/opts/*_SSSE3.cpp",
102 "src/opts/*_ssse3.cpp",
103 ])
104 elif opts == SKIA_OPTS_SSE41:
105 return native.glob([
106 "src/opts/*_sse41.cpp",
107 ])
108 elif opts == SKIA_OPTS_SSE42:
109 return native.glob([
110 "src/opts/*_sse42.cpp",
111 ])
112 elif opts == SKIA_OPTS_AVX:
113 return native.glob([
114 "src/opts/*_avx.cpp",
115 ])
116 elif opts == SKIA_OPTS_HSW:
117 return native.glob([
118 "src/opts/*_hsw.cpp",
119 ])
120 elif opts == SKIA_OPTS_NEON:
121 return native.glob([
122 "src/opts/*_neon.cpp",
123 ])
124 elif opts == SKIA_OPTS_CRC32:
125 return native.glob([
126 "src/opts/*_crc32.cpp",
127 ])
128 else:
129 fail("skia_opts_srcs parameter 'opts' must be one of SKIA_OPTS_*.")
Ben Wagner9eca72b2017-10-17 10:57:34 -0400130
131def opts_cflags(opts):
Ben Wagnerb303a422018-07-31 10:31:06 -0400132 if opts == SKIA_OPTS_SSE2:
133 return ["-msse2"]
134 elif opts == SKIA_OPTS_SSSE3:
135 return ["-mssse3"]
136 elif opts == SKIA_OPTS_SSE41:
137 return ["-msse4.1"]
138 elif opts == SKIA_OPTS_SSE42:
139 return ["-msse4.2"]
140 elif opts == SKIA_OPTS_AVX:
141 return ["-mavx"]
142 elif opts == SKIA_OPTS_HSW:
143 return ["-mavx2", "-mf16c", "-mfma"]
144 elif opts == SKIA_OPTS_NEON:
145 return ["-mfpu=neon"]
146 elif opts == SKIA_OPTS_CRC32:
147 # NDK r11's Clang (3.8) doesn't pass along this -march setting correctly to an external
148 # assembler, so we do it manually with -Wa. This is just a bug, fixed in later Clangs.
149 return ["-march=armv8-a+crc", "-Wa,-march=armv8-a+crc"]
150 else:
151 return []
Ben Wagner9eca72b2017-10-17 10:57:34 -0400152
153SKIA_CPU_ARM = "ARM"
154
155SKIA_CPU_ARM64 = "ARM64"
156
157SKIA_CPU_X86 = "X86"
158
159SKIA_CPU_OTHER = "OTHER"
160
161def opts_rest_srcs(cpu):
Ben Wagnerb303a422018-07-31 10:31:06 -0400162 srcs = []
163 if cpu == SKIA_CPU_ARM or cpu == SKIA_CPU_ARM64:
164 srcs += native.glob([
165 "src/opts/*_arm.cpp",
166 "src/opts/SkBitmapProcState_opts_none.cpp",
167 ])
168 if cpu == SKIA_CPU_ARM64:
169 # NEON doesn't need special flags to compile on ARM64.
170 srcs += native.glob([
171 "src/opts/*_neon.cpp",
172 ])
173 elif cpu == SKIA_CPU_X86:
174 srcs += native.glob([
175 "src/opts/*_x86.cpp",
176 ])
177 elif cpu == SKIA_CPU_OTHER:
178 srcs += native.glob([
179 "src/opts/*_none.cpp",
180 ])
181 else:
182 fail("opts_rest_srcs parameter 'cpu' must be one of " +
183 "SKIA_CPU_{ARM,ARM64,X86,OTHER}.")
184 return srcs
Ben Wagner9eca72b2017-10-17 10:57:34 -0400185
186def skia_opts_deps(cpu):
Ben Wagnerb303a422018-07-31 10:31:06 -0400187 res = [":opts_rest"]
Ben Wagner9eca72b2017-10-17 10:57:34 -0400188
Ben Wagnerb303a422018-07-31 10:31:06 -0400189 if cpu == SKIA_CPU_ARM:
190 res += [":opts_neon"]
Ben Wagner9eca72b2017-10-17 10:57:34 -0400191
Ben Wagnerb303a422018-07-31 10:31:06 -0400192 if cpu == SKIA_CPU_ARM64:
193 res += [":opts_crc32"]
Mike Kleinc29bb572017-10-24 11:40:41 -0400194
Ben Wagnerb303a422018-07-31 10:31:06 -0400195 if cpu == SKIA_CPU_X86:
196 res += [
197 ":opts_sse2",
198 ":opts_ssse3",
199 ":opts_sse41",
200 ":opts_sse42",
201 ":opts_avx",
202 ":opts_hsw",
203 ]
Ben Wagner9eca72b2017-10-17 10:57:34 -0400204
Ben Wagnerb303a422018-07-31 10:31:06 -0400205 return res
Ben Wagner9eca72b2017-10-17 10:57:34 -0400206
207################################################################################
benjaminwagner56f6d062016-01-13 10:45:19 -0800208## BASE_SRCS
209################################################################################
benjaminwagner787ca872015-08-17 12:58:10 -0700210
benjaminwagner39e7aa42015-11-18 13:26:10 -0800211# All platform-independent SRCS.
benjaminwagner56f6d062016-01-13 10:45:19 -0800212BASE_SRCS_ALL = struct(
213 include = [
Ben Wagnerdea74282017-03-16 19:15:09 -0400214 "include/private/**/*.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700215 "src/**/*.h",
216 "src/**/*.cpp",
Ben Wagnerdea74282017-03-16 19:15:09 -0400217 "src/**/*.inc",
benjaminwagner787ca872015-08-17 12:58:10 -0700218 ],
Ben Wagnerdea74282017-03-16 19:15:09 -0400219 exclude = [
benjaminwagner6f6bef82015-10-15 08:09:44 -0700220 # Exclude platform-dependent files.
Mike Klein9509e042019-05-15 21:57:48 +0000221 "src/codec/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700222 "src/device/xps/*", # Windows-only. Move to ports?
223 "src/doc/*_XPS.cpp", # Windows-only. Move to ports?
224 "src/gpu/gl/android/*",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700225 "src/gpu/gl/egl/*",
benjaminwagneraf3b35e2016-03-28 13:27:28 -0700226 "src/gpu/gl/glfw/*",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700227 "src/gpu/gl/glx/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700228 "src/gpu/gl/iOS/*",
229 "src/gpu/gl/mac/*",
230 "src/gpu/gl/win/*",
231 "src/opts/**/*",
232 "src/ports/**/*",
233 "src/utils/android/**/*",
234 "src/utils/mac/**/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700235 "src/utils/win/**/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700236
237 # Exclude multiple definitions.
Kevin Lubickc9210672018-10-15 11:36:55 -0400238 "src/gpu/GrPathRendering_none.cpp",
Kevin Lubick93faa672018-10-10 15:54:53 -0400239 "src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp",
Kevin Lubickc9210672018-10-15 11:36:55 -0400240 "src/gpu/gl/GrGLMakeNativeInterface_none.cpp",
241 "src/pdf/SkDocument_PDF_None.cpp", # We use src/pdf/SkPDFDocument.cpp.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700242
Ben Wagner4ccf49c2018-03-26 15:46:40 -0400243 # Exclude files that don't compile everywhere.
244 "src/svg/**/*", # Depends on xml, SkJpegCodec, and SkPngCodec.
245 "src/xml/**/*", # Avoid dragging in expat when not needed.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700246
benjaminwagner39e7aa42015-11-18 13:26:10 -0800247 # Conflicting dependencies among Lua versions. See cl/107087297.
248 "src/utils/SkLua*",
249
egdaniel32119f12016-02-22 10:07:54 -0800250 # Currently exclude all vulkan specific files
251 "src/gpu/vk/*",
benjaminwagnerc8962512016-09-30 12:06:27 -0700252
Jim Van Verth03b8ab22020-02-24 11:36:15 -0500253 # Currently exclude all Direct3D specific files
254 "src/gpu/d3d/*",
255
Stephen White985741a2019-07-18 11:43:45 -0400256 # Currently exclude all Dawn-specific files
257 "src/gpu/dawn/*",
258
benjaminwagnerc8962512016-09-30 12:06:27 -0700259 # Defines main.
260 "src/sksl/SkSLMain.cpp",
Ethan Nicholas8d7f4ae2017-09-07 11:07:42 -0400261
262 # Only used to regenerate the lexer
263 "src/sksl/lex/*",
Brian Salomoncbcb0a12017-11-19 13:20:13 -0500264
265 # Atlas text
266 "src/atlastext/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700267 ],
268)
269
Hal Canaryce4693f2019-11-20 21:43:54 +0000270def codec_srcs(limited):
271 """Sources for the codecs. Excludes Raw, and Ico, Webp, and Png if limited."""
Ben Wagnerec8c6602018-10-26 12:31:36 -0400272
Hal Canaryb5c217b2019-11-20 10:16:10 -0500273 exclude = ["src/codec/*Raw*.cpp"]
Hal Canaryce4693f2019-11-20 21:43:54 +0000274 if limited:
275 exclude += [
276 "src/codec/*Ico*.cpp",
277 "src/codec/*Webp*.cpp",
278 "src/codec/*Png*",
279 ]
Hal Canaryb5c217b2019-11-20 10:16:10 -0500280 return native.glob(["src/codec/*.cpp"], exclude = exclude)
Ben Wagner9eca72b2017-10-17 10:57:34 -0400281
Mike Klein7f95c292019-03-27 11:16:25 -0500282GL_SRCS_UNIX = struct(
benjaminwagner56f6d062016-01-13 10:45:19 -0800283 include = [
Brian Salomonb3ce76e2017-12-11 15:21:39 -0500284 "src/gpu/gl/GrGLMakeNativeInterface_none.cpp",
Mike Klein7f95c292019-03-27 11:16:25 -0500285 ],
286 exclude = [],
287)
288PORTS_SRCS_UNIX = struct(
289 include = [
benjaminwagner6f6bef82015-10-15 08:09:44 -0700290 "src/ports/**/*.cpp",
291 "src/ports/**/*.h",
292 ],
293 exclude = [
msarett6b4985c2016-03-10 07:15:59 -0800294 "src/ports/*CG*",
msarettfc0b6d12016-03-17 13:50:17 -0700295 "src/ports/*WIC*",
mtklein3f193a92016-03-10 08:52:05 -0800296 "src/ports/*android*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700297 "src/ports/*chromium*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700298 "src/ports/*mac*",
299 "src/ports/*mozalloc*",
300 "src/ports/*nacl*",
301 "src/ports/*win*",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800302 "src/ports/SkFontMgr_custom_directory_factory.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700303 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
benjaminwagnerd9dd5812016-03-21 10:45:01 -0700304 "src/ports/SkFontMgr_custom_empty_factory.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700305 "src/ports/SkFontMgr_empty_factory.cpp",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800306 "src/ports/SkFontMgr_fontconfig_factory.cpp",
Sergey Ulanovf3babcd2018-11-30 17:42:00 -0800307 "src/ports/SkFontMgr_fuchsia.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700308 "src/ports/SkImageGenerator_none.cpp",
mtkleind55d13a2015-08-18 08:51:49 -0700309 ],
310)
311
Mike Klein7f95c292019-03-27 11:16:25 -0500312GL_SRCS_ANDROID = struct(
benjaminwagner56f6d062016-01-13 10:45:19 -0800313 include = [
Ben Wagner773151f2018-08-17 09:28:53 -0400314 "src/gpu/gl/android/*.cpp",
Mike Klein7f95c292019-03-27 11:16:25 -0500315 ],
316 exclude = [],
317)
318PORTS_SRCS_ANDROID = struct(
319 include = [
benjaminwagner86ea33e2015-10-26 10:46:25 -0700320 "src/ports/**/*.cpp",
321 "src/ports/**/*.h",
322 ],
323 exclude = [
msarett6b4985c2016-03-10 07:15:59 -0800324 "src/ports/*CG*",
mtklein3f193a92016-03-10 08:52:05 -0800325 "src/ports/*FontConfig*",
msarettfc0b6d12016-03-17 13:50:17 -0700326 "src/ports/*WIC*",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700327 "src/ports/*chromium*",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700328 "src/ports/*fontconfig*",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700329 "src/ports/*mac*",
330 "src/ports/*mozalloc*",
331 "src/ports/*nacl*",
332 "src/ports/*win*",
333 "src/ports/SkDebug_stdio.cpp",
334 "src/ports/SkFontMgr_custom_directory_factory.cpp",
335 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
benjaminwagnerd9dd5812016-03-21 10:45:01 -0700336 "src/ports/SkFontMgr_custom_empty_factory.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700337 "src/ports/SkFontMgr_empty_factory.cpp",
Sergey Ulanovf3babcd2018-11-30 17:42:00 -0800338 "src/ports/SkFontMgr_fuchsia.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700339 "src/ports/SkImageGenerator_none.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700340 ],
341)
342
Mike Klein7f95c292019-03-27 11:16:25 -0500343GL_SRCS_IOS = struct(
benjaminwagner56f6d062016-01-13 10:45:19 -0800344 include = [
Brian Salomon3d6801e2017-12-11 10:06:31 -0500345 "src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp",
Mike Klein7f95c292019-03-27 11:16:25 -0500346 ],
347 exclude = [],
348)
349PORTS_SRCS_IOS = struct(
350 include = [
iroth8b99ef42015-11-02 11:11:21 -0800351 "src/ports/**/*.cpp",
352 "src/ports/**/*.h",
irothab669de2016-02-16 19:17:01 -0800353 "src/utils/mac/*.cpp",
iroth8b99ef42015-11-02 11:11:21 -0800354 ],
355 exclude = [
mtklein3f193a92016-03-10 08:52:05 -0800356 "src/ports/*FontConfig*",
357 "src/ports/*FreeType*",
msarettfc0b6d12016-03-17 13:50:17 -0700358 "src/ports/*WIC*",
iroth8b99ef42015-11-02 11:11:21 -0800359 "src/ports/*android*",
360 "src/ports/*chromium*",
361 "src/ports/*fontconfig*",
iroth8b99ef42015-11-02 11:11:21 -0800362 "src/ports/*mozalloc*",
363 "src/ports/*nacl*",
364 "src/ports/*win*",
iroth8b99ef42015-11-02 11:11:21 -0800365 "src/ports/SkFontMgr_custom.cpp",
Ben Wagner8ab590f2017-02-08 17:29:33 -0500366 "src/ports/SkFontMgr_custom_directory.cpp",
367 "src/ports/SkFontMgr_custom_embedded.cpp",
368 "src/ports/SkFontMgr_custom_empty.cpp",
iroth8b99ef42015-11-02 11:11:21 -0800369 "src/ports/SkFontMgr_custom_directory_factory.cpp",
370 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
benjaminwagnerd9dd5812016-03-21 10:45:01 -0700371 "src/ports/SkFontMgr_custom_empty_factory.cpp",
iroth8b99ef42015-11-02 11:11:21 -0800372 "src/ports/SkFontMgr_empty_factory.cpp",
Sergey Ulanovf3babcd2018-11-30 17:42:00 -0800373 "src/ports/SkFontMgr_fuchsia.cpp",
iroth8b99ef42015-11-02 11:11:21 -0800374 "src/ports/SkImageGenerator_none.cpp",
iroth8b99ef42015-11-02 11:11:21 -0800375 ],
376)
377
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500378GL_SRCS_WASM = struct(
379 include = [
380 "src/gpu/gl/GrGLMakeNativeInterface_egl.cpp",
381 "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp",
382 ],
383 exclude = [],
384)
385PORTS_SRCS_WASM = struct(
386 include = [
387 "src/ports/**/*.cpp",
388 "src/ports/**/*.h",
389 ],
390 exclude = [
391 # commented lines below left in because they indicate specifically what is
392 # included here and not in other PORTS_SRCS lists.
393 "src/ports/*FontConfig*",
394 "src/ports/*FreeType*",
395 "src/ports/*WIC*",
396 "src/ports/*CG*",
397 "src/ports/*android*",
398 "src/ports/*chromium*",
399 "src/ports/*fontconfig*",
400 "src/ports/*mac*",
401 "src/ports/*mozalloc*",
402 "src/ports/*nacl*",
403 "src/ports/*win*",
404 #"src/ports/SkDebug_stdio.cpp",
405 "src/ports/SkFontMgr_custom.cpp",
406 "src/ports/SkFontMgr_custom_directory.cpp",
407 "src/ports/SkFontMgr_custom_directory_factory.cpp",
408 "src/ports/SkFontMgr_custom_embedded.cpp",
409 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
410 "src/ports/SkFontMgr_custom_empty.cpp",
411 "src/ports/SkFontMgr_custom_empty_factory.cpp",
412 # "src/ports/SkFontMgr_empty_factory.cpp",
413 "src/ports/SkFontMgr_fontconfig_factory.cpp",
414 "src/ports/SkFontMgr_fuchsia.cpp",
415 "src/ports/SkImageGenerator_none.cpp",
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500416 ],
417)
418
Mike Klein7f95c292019-03-27 11:16:25 -0500419def base_srcs():
420 return skia_glob(BASE_SRCS_ALL)
421
422def ports_srcs(os_conditions):
Mike Klein299ea7b2019-03-27 13:53:08 -0500423 return skia_select(
424 os_conditions,
Ben Wagnerb303a422018-07-31 10:31:06 -0400425 [
Mike Klein7f95c292019-03-27 11:16:25 -0500426 skia_glob(PORTS_SRCS_UNIX),
427 skia_glob(PORTS_SRCS_ANDROID),
428 skia_glob(PORTS_SRCS_IOS),
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500429 skia_glob(PORTS_SRCS_WASM),
Mike Klein299ea7b2019-03-27 13:53:08 -0500430 ],
431 )
Mike Klein7f95c292019-03-27 11:16:25 -0500432
433def gl_srcs(os_conditions):
Mike Klein299ea7b2019-03-27 13:53:08 -0500434 return skia_select(
435 os_conditions,
Mike Klein7f95c292019-03-27 11:16:25 -0500436 [
437 skia_glob(GL_SRCS_UNIX),
438 skia_glob(GL_SRCS_ANDROID),
439 skia_glob(GL_SRCS_IOS),
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500440 skia_glob(GL_SRCS_WASM),
Mike Klein299ea7b2019-03-27 13:53:08 -0500441 ],
442 )
Mike Klein7f95c292019-03-27 11:16:25 -0500443
444def skia_srcs(os_conditions):
445 return base_srcs() + ports_srcs(os_conditions) + gl_srcs(os_conditions)
446
Hal Canary6ad6c502019-12-11 14:09:16 -0500447def metal_objc_srcs():
448 return native.glob(
449 [
450 "include/**/*.h",
451 "src/**/*.h",
452 "src/gpu/mtl/**/*.mm",
453 "third_party/**/*.h",
Ben Wagner8718be92019-12-11 20:11:30 -0500454 ],
Hal Canary6ad6c502019-12-11 14:09:16 -0500455 ) + [
456 "src/image/SkSurface_GpuMtl.mm",
457 ]
458
benjaminwagner56f6d062016-01-13 10:45:19 -0800459################################################################################
460## INCLUDES
461################################################################################
benjaminwagner39e7aa42015-11-18 13:26:10 -0800462
benjaminwagner787ca872015-08-17 12:58:10 -0700463# Includes needed by Skia implementation. Not public includes.
464INCLUDES = [
Mike Kleinc0bd9f92019-04-23 12:05:21 -0500465 ".",
benjaminwagnerfa7e1a02015-11-13 12:27:08 -0800466 "include/android",
benjaminwagner787ca872015-08-17 12:58:10 -0700467 "include/c",
468 "include/codec",
469 "include/config",
470 "include/core",
Ben Wagnercc62b5d2018-09-20 16:26:31 -0400471 "include/docs",
benjaminwagner787ca872015-08-17 12:58:10 -0700472 "include/effects",
Matt Sarettd7093c22017-05-09 15:28:32 -0400473 "include/encode",
benjaminwagner787ca872015-08-17 12:58:10 -0700474 "include/gpu",
benjaminwagner787ca872015-08-17 12:58:10 -0700475 "include/pathops",
benjaminwagner787ca872015-08-17 12:58:10 -0700476 "include/ports",
477 "include/private",
Brian Osmanea236bf2019-04-29 10:28:22 -0400478 "include/third_party/skcms",
benjaminwagner787ca872015-08-17 12:58:10 -0700479 "include/utils",
iroth8b99ef42015-11-02 11:11:21 -0800480 "include/utils/mac",
benjaminwagnerfa7e1a02015-11-13 12:27:08 -0800481 "src/codec",
benjaminwagner787ca872015-08-17 12:58:10 -0700482 "src/core",
benjaminwagner787ca872015-08-17 12:58:10 -0700483 "src/gpu",
484 "src/image",
Mike Klein135a1b12017-08-15 13:13:59 -0400485 "src/images",
benjaminwagner787ca872015-08-17 12:58:10 -0700486 "src/lazy",
487 "src/opts",
488 "src/pdf",
Ben Wagner4ccf49c2018-03-26 15:46:40 -0400489 "src/ports",
benjaminwagner787ca872015-08-17 12:58:10 -0700490 "src/sfnt",
Florin Malita5edba452017-05-30 16:39:47 -0400491 "src/shaders",
Michael Ludwig4f94ef62018-09-12 15:22:16 -0400492 "src/shaders/gradients",
benjaminwagnerc8962512016-09-30 12:06:27 -0700493 "src/sksl",
benjaminwagner787ca872015-08-17 12:58:10 -0700494 "src/utils",
Ben Wagnerd0a3b062016-10-24 14:11:12 -0400495 "third_party/gif",
benjaminwagner56f6d062016-01-13 10:45:19 -0800496]
benjaminwagner787ca872015-08-17 12:58:10 -0700497
benjaminwagner56f6d062016-01-13 10:45:19 -0800498################################################################################
499## DM_SRCS
500################################################################################
benjaminwagner86ea33e2015-10-26 10:46:25 -0700501
benjaminwagner56f6d062016-01-13 10:45:19 -0800502DM_SRCS_ALL = struct(
503 include = [
benjaminwagner6f6bef82015-10-15 08:09:44 -0700504 "dm/*.cpp",
505 "dm/*.h",
Mike Klein60900b52018-09-21 11:19:45 -0400506 "experimental/pipe/*.cpp",
507 "experimental/pipe/*.h",
Ben Wagner4ccf49c2018-03-26 15:46:40 -0400508 "experimental/svg/model/*.cpp",
509 "experimental/svg/model/*.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700510 "gm/*.cpp",
511 "gm/*.h",
Tyler Denniston45f94f82020-02-04 16:09:08 -0500512 "gm/verifiers/*.cpp",
513 "gm/verifiers/*.h",
Nathaniel Nifong0426c382019-06-21 11:09:19 -0400514 "src/utils/SkMultiPictureDocument.cpp",
Ben Wagner4ccf49c2018-03-26 15:46:40 -0400515 "src/xml/*.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700516 "tests/*.cpp",
517 "tests/*.h",
Jim Van Verth8a9a3712019-05-31 10:49:12 -0400518 "tools/AutoreleasePool.h",
benjaminwagner99fb6702016-07-28 15:12:21 -0700519 "tools/BigPathBench.inc",
Hal Canarye574f1e2019-07-15 14:01:37 -0400520 "tools/BinaryAsset.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700521 "tools/CrashHandler.cpp",
522 "tools/CrashHandler.h",
Robert Phillipse61ba842018-05-30 08:27:26 -0400523 "tools/DDLPromiseImageHelper.cpp",
524 "tools/DDLPromiseImageHelper.h",
525 "tools/DDLTileHelper.cpp",
526 "tools/DDLTileHelper.h",
Mike Kleinb61e25b2019-03-27 10:51:28 -0500527 "tools/HashAndEncode.cpp",
528 "tools/HashAndEncode.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700529 "tools/ProcStats.cpp",
530 "tools/ProcStats.h",
Ben Wagnerfb4487b2018-03-26 17:48:09 -0400531 "tools/Registry.h",
532 "tools/ResourceFactory.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700533 "tools/Resources.cpp",
534 "tools/Resources.h",
Hal Canarye574f1e2019-07-15 14:01:37 -0400535 "tools/SkMetaData.cpp",
536 "tools/SkMetaData.h",
537 "tools/SkSharingProc.cpp",
Mike Kleina4bb0202019-06-04 13:40:15 -0500538 "tools/SkVMBuilders.cpp",
539 "tools/SkVMBuilders.h",
Hal Canarye574f1e2019-07-15 14:01:37 -0400540 "tools/ToolUtils.cpp",
541 "tools/ToolUtils.h",
benjaminwagner99fb6702016-07-28 15:12:21 -0700542 "tools/UrlDataManager.cpp",
543 "tools/UrlDataManager.h",
544 "tools/debugger/*.cpp",
545 "tools/debugger/*.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700546 "tools/flags/*.cpp",
547 "tools/flags/*.h",
Mike Klein0cffcbf92019-03-20 11:08:46 -0500548 "tools/fonts/RandomScalerContext.cpp",
549 "tools/fonts/RandomScalerContext.h",
550 "tools/fonts/TestFontMgr.cpp",
551 "tools/fonts/TestFontMgr.h",
552 "tools/fonts/TestSVGTypeface.cpp",
553 "tools/fonts/TestSVGTypeface.h",
554 "tools/fonts/TestTypeface.cpp",
555 "tools/fonts/TestTypeface.h",
Mike Kleinea3f0142019-03-20 11:12:10 -0500556 "tools/fonts/ToolUtilsFont.cpp",
Hal Canarye574f1e2019-07-15 14:01:37 -0400557 "tools/fonts/test_font_index.inc",
Ben Wagner483c7722018-02-20 17:06:07 -0500558 "tools/fonts/test_font_monospace.inc",
559 "tools/fonts/test_font_sans_serif.inc",
560 "tools/fonts/test_font_serif.inc",
benjaminwagner38d68bc2016-04-01 05:00:51 -0700561 "tools/gpu/**/*.cpp",
562 "tools/gpu/**/*.h",
Hal Canarye574f1e2019-07-15 14:01:37 -0400563 "tools/ios_utils.h",
mtkleine1fc4522016-02-09 12:32:52 -0800564 "tools/random_parse_path.cpp",
565 "tools/random_parse_path.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700566 "tools/timer/*.cpp",
567 "tools/timer/*.h",
Brian Salomon40d01192017-07-19 13:05:11 -0400568 "tools/trace/*.cpp",
569 "tools/trace/*.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700570 ],
571 exclude = [
Mike Kleindb537602018-06-01 11:01:11 -0400572 "gm/cgms.cpp",
Mike Kleinc4abade2019-08-09 10:11:35 -0400573 "gm/fiddle.cpp",
Mike Reed7bf160e2019-05-17 16:50:51 -0400574 "gm/video_decoder.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700575 "tests/FontMgrAndroidParserTest.cpp", # Android-only.
Ben Wagner37a06c02018-06-22 21:11:00 +0000576 "tests/FontMgrFontConfigTest.cpp", # FontConfig-only.
Julia Lavrovaf0ade8a2019-11-08 12:58:57 -0500577 "tests/SkParagraphTest.cpp", # Skipping tests for now.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700578 "tests/skia_test.cpp", # Old main.
Brian Salomonf9ec4702017-11-19 14:46:36 -0500579 "tools/gpu/atlastext/*",
Jim Van Verth03b8ab22020-02-24 11:36:15 -0500580 "tools/gpu/d3d/*",
Stephen White985741a2019-07-18 11:43:45 -0400581 "tools/gpu/dawn/*",
benjaminwagner38d68bc2016-04-01 05:00:51 -0700582 "tools/gpu/gl/angle/*",
benjaminwagner38d68bc2016-04-01 05:00:51 -0700583 "tools/gpu/gl/egl/*",
584 "tools/gpu/gl/glx/*",
585 "tools/gpu/gl/iOS/*",
586 "tools/gpu/gl/mac/*",
benjaminwagner38d68bc2016-04-01 05:00:51 -0700587 "tools/gpu/gl/win/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700588 "tools/timer/SysTimer_mach.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700589 "tools/timer/SysTimer_windows.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700590 ],
591)
592
Ben Wagnerdea74282017-03-16 19:15:09 -0400593################################################################################
594## dm_srcs()
595################################################################################
benjaminwagner86ea33e2015-10-26 10:46:25 -0700596
Ben Wagner9eca72b2017-10-17 10:57:34 -0400597def dm_srcs(os_conditions):
Ben Wagnerb303a422018-07-31 10:31:06 -0400598 """Sources for the dm binary for the specified os."""
599 return skia_glob(DM_SRCS_ALL) + skia_select(
600 os_conditions,
601 [
Ben Wagnerc5ee4992019-03-25 15:58:31 -0400602 ["tests/FontMgrFontConfigTest.cpp"],
Ben Wagnerb303a422018-07-31 10:31:06 -0400603 ["tests/FontMgrAndroidParserTest.cpp"],
604 [],
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500605 [],
Ben Wagnerb303a422018-07-31 10:31:06 -0400606 ],
607 )
benjaminwagner56f6d062016-01-13 10:45:19 -0800608
609################################################################################
benjaminwagner56f6d062016-01-13 10:45:19 -0800610## DM_ARGS
611################################################################################
benjaminwagner86ea33e2015-10-26 10:46:25 -0700612
Ben Wagner59f9edb2016-11-28 15:30:37 -0500613def DM_ARGS(asan):
Mike Kleindd650c42018-11-08 14:26:02 -0500614 source = ["gm", "image", "lottie"]
Ben Wagnerb303a422018-07-31 10:31:06 -0400615
616 # TODO(benjaminwagner): f16, pic-8888, serialize-8888, and tiles_rt-8888 fail.
617 config = ["565", "8888", "pdf"]
618 match = ["~Codec_78329453"]
619 return (["--src"] + source + ["--config"] + config + ["--nonativeFonts"] +
620 ["--match"] + match)
benjaminwagner56f6d062016-01-13 10:45:19 -0800621
622################################################################################
623## COPTS
624################################################################################
iroth8b99ef42015-11-02 11:11:21 -0800625
Ben Wagner9eca72b2017-10-17 10:57:34 -0400626def base_copts(os_conditions):
Ben Wagnerb303a422018-07-31 10:31:06 -0400627 return skia_select(
628 os_conditions,
629 [
630 # UNIX
631 [
632 "-Wno-implicit-fallthrough", # Some intentional fallthrough.
633 # Internal use of deprecated methods. :(
634 "-Wno-deprecated-declarations",
635 # TODO(kjlubick)
636 "-Wno-self-assign", # Spurious warning in tests/PathOpsDVectorTest.cpp?
637 ],
638 # ANDROID
639 [
Mike Klein9b7e99e2018-08-22 16:45:11 -0400640 "-Wno-implicit-fallthrough", # Some intentional fallthrough.
Ben Wagnerb303a422018-07-31 10:31:06 -0400641 # 'GrResourceCache' declared with greater visibility than the
642 # type of its field 'GrResourceCache::fPurgeableQueue'... bogus.
643 "-Wno-error=attributes",
644 ],
645 # IOS
Benjamin Barenblatfd10d172018-07-31 16:41:37 -0400646 [
647 "-Wno-implicit-fallthrough", # Some intentional fallthrough.
648 ],
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500649 # WASM
650 [
651 "-Wno-implicit-fallthrough", # Some intentional fallthrough.
652 ],
Ben Wagnerb303a422018-07-31 10:31:06 -0400653 ],
654 )
benjaminwagner56f6d062016-01-13 10:45:19 -0800655
656################################################################################
657## DEFINES
658################################################################################
659
Ben Wagner9eca72b2017-10-17 10:57:34 -0400660def base_defines(os_conditions):
Ben Wagnerb303a422018-07-31 10:31:06 -0400661 return [
662 # Chrome DEFINES.
663 "SK_USE_FREETYPE_EMBOLDEN",
664 # Turn on a few Google3-specific build fixes.
665 "SK_BUILD_FOR_GOOGLE3",
666 # Required for building dm.
667 "GR_TEST_UTILS",
Robert Phillips6db27c22019-05-01 10:43:56 -0400668 # Google3 probably doesn't want this feature yet
669 "SK_DISABLE_REDUCE_OPLIST_SPLITTING",
Ben Wagnerb303a422018-07-31 10:31:06 -0400670 # Staging flags for API changes
671 # Should remove after we update golden images
672 "SK_WEBP_ENCODER_USE_DEFAULT_METHOD",
673 # Experiment to diagnose image diffs in Google3
Mike Klein0ade68c2018-10-24 06:52:35 -0400674 "SK_DISABLE_LOWP_RASTER_PIPELINE",
Ben Wagnerb303a422018-07-31 10:31:06 -0400675 # JPEG is in codec_limited
Leon Scroggins IIIa77f30c2020-03-09 14:23:30 -0400676 "SK_CODEC_DECODES_JPEG",
677 "SK_ENCODE_JPEG",
Brian Osman489cf882019-07-09 10:48:28 -0400678 # Needed for some tests in dm
679 "SK_ENABLE_SKSL_INTERPRETER",
Ben Wagnerb303a422018-07-31 10:31:06 -0400680 ] + skia_select(
681 os_conditions,
682 [
683 # UNIX
684 [
685 "PNG_SKIP_SETJMP_CHECK",
686 "SK_BUILD_FOR_UNIX",
Leon Scroggins IIIa77f30c2020-03-09 14:23:30 -0400687 "SK_CODEC_DECODES_PNG",
688 "SK_CODEC_DECODES_WEBP",
689 "SK_ENCODE_PNG",
690 "SK_ENCODE_WEBP",
Mike Kleinf0a53692019-04-24 11:42:40 -0500691 "SK_R32_SHIFT=16",
Ben Wagnerb303a422018-07-31 10:31:06 -0400692 ],
693 # ANDROID
694 [
695 "SK_BUILD_FOR_ANDROID",
Leon Scroggins IIIa77f30c2020-03-09 14:23:30 -0400696 "SK_CODEC_DECODES_PNG",
697 "SK_CODEC_DECODES_WEBP",
698 "SK_ENCODE_PNG",
699 "SK_ENCODE_WEBP",
Ben Wagnerb303a422018-07-31 10:31:06 -0400700 ],
701 # IOS
702 [
703 "SK_BUILD_FOR_IOS",
704 "SK_BUILD_NO_OPTS",
705 "SKNX_NO_SIMD",
Mike Kleindbbf7532020-03-06 12:04:33 -0600706 "SK_NO_COMMAND_BUFFER", # Test tools that use thread_local.
Ben Wagnerb303a422018-07-31 10:31:06 -0400707 ],
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500708 # WASM
709 [
710 "SK_DISABLE_LEGACY_SHADERCONTEXT",
711 "SK_DISABLE_TRACING",
712 "GR_GL_CHECK_ALLOC_WITH_GET_ERROR=0",
713 "SK_SUPPORT_GPU=1",
714 "SK_DISABLE_AAA",
715 "SK_DISABLE_EFFECT_DESERIALIZATION",
716 "SK_FORCE_8_BYTE_ALIGNMENT",
717 "SKNX_NO_SIMD",
718 ],
Ben Wagnerb303a422018-07-31 10:31:06 -0400719 ],
720 )
benjaminwagner787ca872015-08-17 12:58:10 -0700721
benjaminwagner56f6d062016-01-13 10:45:19 -0800722################################################################################
723## LINKOPTS
724################################################################################
benjaminwagner86ea33e2015-10-26 10:46:25 -0700725
Ben Wagner9eca72b2017-10-17 10:57:34 -0400726def base_linkopts(os_conditions):
Ben Wagnerb303a422018-07-31 10:31:06 -0400727 return [
728 "-ldl",
729 ] + skia_select(
730 os_conditions,
731 [
732 # UNIX
733 [],
734 # ANDROID
735 [
736 "-lEGL",
Ben Wagner773151f2018-08-17 09:28:53 -0400737 "-lGLESv2",
Ben Wagnerb303a422018-07-31 10:31:06 -0400738 ],
739 # IOS
740 [
741 "-framework CoreFoundation",
742 "-framework CoreGraphics",
743 "-framework CoreText",
744 "-framework ImageIO",
745 "-framework MobileCoreServices",
746 ],
Nathaniel Nifongc6ce3d42020-03-02 12:10:02 -0500747 # WASM
748 [],
Ben Wagnerb303a422018-07-31 10:31:06 -0400749 ],
750 )
Florin Malitadcc9d062018-11-08 14:25:19 -0500751
752################################################################################
Florin Malitae4e95512019-05-03 14:03:50 -0400753## sksg_lib
Florin Malitadcc9d062018-11-08 14:25:19 -0500754################################################################################
755
Florin Malitae4e95512019-05-03 14:03:50 -0400756def sksg_lib_hdrs():
757 return native.glob(["modules/sksg/include/*.h"])
758
759def sksg_lib_srcs():
Florin Malitaccacfa02019-07-10 13:38:48 -0400760 return native.glob([
761 "modules/sksg/src/*.cpp",
762 "modules/sksg/src/*.h",
763 ])
Florin Malitae4e95512019-05-03 14:03:50 -0400764
765################################################################################
Julia Lavrova5ec1b8f2019-06-10 11:10:17 -0400766## skparagraph_lib
767################################################################################
768
769def skparagraph_lib_hdrs():
770 return native.glob(["modules/skparagraph/include/*.h"])
771
772def skparagraph_lib_srcs():
773 return native.glob(["modules/skparagraph/src/*.cpp"])
774
775################################################################################
Mike Reeddaf19452019-06-11 17:20:33 -0400776## experimental xform
777################################################################################
778
779def exp_xform_lib_hdrs():
780 return native.glob(["experimental/xform/*.h"])
781
782def exp_xform_lib_srcs():
783 return native.glob(["experimental/xform/*.cpp"])
784
785################################################################################
Hal Canary484384b2019-12-17 10:50:26 -0500786## skresources_lib
787################################################################################
788
789def skresources_lib_hdrs():
790 return ["modules/skresources/include/SkResources.h"]
791
792def skresources_lib_srcs():
793 return ["modules/skresources/src/SkResources.cpp"]
794
795################################################################################
Florin Malitae4e95512019-05-03 14:03:50 -0400796## skottie_lib
797################################################################################
798
799def skottie_lib_hdrs():
Florin Malita1b1b6572019-05-03 15:16:30 -0400800 return native.glob(["modules/skottie/include/*.h"])
Florin Malitae4e95512019-05-03 14:03:50 -0400801
802def skottie_lib_srcs():
803 return native.glob(
804 [
805 "modules/skottie/src/*.cpp",
806 "modules/skottie/src/*.h",
Florin Malita141ac682020-03-17 11:20:10 -0400807 "modules/skottie/src/animator/*.cpp",
808 "modules/skottie/src/animator/*.h",
Florin Malitae47d8af2019-06-14 12:20:10 -0400809 "modules/skottie/src/effects/*.cpp",
810 "modules/skottie/src/effects/*.h",
Florin Malita45dc1f02019-07-01 13:57:43 -0400811 "modules/skottie/src/layers/*.cpp",
812 "modules/skottie/src/layers/*.h",
Florin Malitacbf31d02020-01-22 14:22:21 -0500813 "modules/skottie/src/layers/shapelayer/*.cpp",
814 "modules/skottie/src/layers/shapelayer/*.h",
Florin Malitaca449d52019-05-08 10:04:09 -0400815 "modules/skottie/src/text/*.cpp",
816 "modules/skottie/src/text/*.h",
Florin Malitae4e95512019-05-03 14:03:50 -0400817 ],
818 exclude = [
819 "modules/skottie/src/SkottieTest.cpp",
820 "modules/skottie/src/SkottieTool.cpp",
821 ],
822 )
823
824################################################################################
825## skottie_shaper
826################################################################################
827
828SKOTTIE_SHAPER_HDRS = [
Florin Malitaca449d52019-05-08 10:04:09 -0400829 "modules/skottie/src/text/SkottieShaper.h",
Florin Malitadcc9d062018-11-08 14:25:19 -0500830]
831
Florin Malitae4e95512019-05-03 14:03:50 -0400832SKOTTIE_SHAPER_SRCS = [
Florin Malitaca449d52019-05-08 10:04:09 -0400833 "modules/skottie/src/text/SkottieShaper.cpp",
Florin Malitae4e95512019-05-03 14:03:50 -0400834]
835
836################################################################################
837## skottie_tool
838################################################################################
839
Florin Malitadcc9d062018-11-08 14:25:19 -0500840SKOTTIE_TOOL_SRCS = [
841 "modules/skottie/src/SkottieTool.cpp",
Brian Osman849f4d62019-11-26 08:58:26 -0500842 "modules/skresources/src/SkResources.cpp",
843 "modules/skresources/include/SkResources.h",
Florin Malitadcc9d062018-11-08 14:25:19 -0500844 # TODO(benjaminwagner): Add "flags" target.
Mike Klein88544fb2019-03-20 10:50:33 -0500845 "tools/flags/CommandLineFlags.cpp",
846 "tools/flags/CommandLineFlags.h",
Florin Malitadcc9d062018-11-08 14:25:19 -0500847]
Florin Malita6d415bc2019-01-17 16:42:15 -0500848
849################################################################################
850## SkShaper
851################################################################################
852
Florin Malita226ba982019-01-21 11:55:51 -0500853SKSHAPER_HARFBUZZ_SRCS = [
Florin Malita6d415bc2019-01-17 16:42:15 -0500854 "modules/skshaper/include/SkShaper.h",
855 "modules/skshaper/src/SkShaper.cpp",
856 "modules/skshaper/src/SkShaper_harfbuzz.cpp",
Hal Canary30c9eda2019-02-22 15:23:45 -0500857 "modules/skshaper/src/SkShaper_primitive.cpp",
Florin Malita6d415bc2019-01-17 16:42:15 -0500858]
Florin Malita226ba982019-01-21 11:55:51 -0500859
860SKSHAPER_PRIMITIVE_SRCS = [
861 "modules/skshaper/include/SkShaper.h",
862 "modules/skshaper/src/SkShaper.cpp",
863 "modules/skshaper/src/SkShaper_primitive.cpp",
864]
Hal Canaryb56b5542019-12-19 09:48:28 -0500865
866################################################################################
867## skottie_ios_lib
868################################################################################
869
870SKOTTIE_IOS_LIB_SRCS = [
Hal Canary118df7c2019-12-18 16:26:19 -0500871 "tools/skottie_ios_app/SkiaContext.mm",
872 "tools/skottie_ios_app/SkiaUIContext.mm",
873 "tools/skottie_ios_app/SkiaViewController.mm",
874 "tools/skottie_ios_app/SkottieViewController.mm",
Hal Canaryb56b5542019-12-19 09:48:28 -0500875]
876
877SKOTTIE_IOS_LIB_HDRS = [
Hal Canary118df7c2019-12-18 16:26:19 -0500878 "tools/skottie_ios_app/SkiaContext.h",
879 "tools/skottie_ios_app/SkiaViewController.h",
880 "tools/skottie_ios_app/SkottieViewController.h",
Hal Canaryb56b5542019-12-19 09:48:28 -0500881]
Hal Canary76cc2c52020-01-07 12:39:13 -0500882
883SKOTTIE_IOS_LIB_SDK_FRAMEWORKS = [
884 "Foundation",
885 "UIKit",
886]