blob: b184f726f10fb64e9f324fc413ecf8bbae2f83ce [file] [log] [blame]
benjaminwagner787ca872015-08-17 12:58:10 -07001# Description:
2# Skia graphics library.
3#
4# Definitions for Google BUILD file.
5
6exports_files(["BUILD.public"])
7
benjaminwagner39e7aa42015-11-18 13:26:10 -08008# All platform-independent SRCS.
9BASE_SRCS = glob(
benjaminwagner787ca872015-08-17 12:58:10 -070010 [
mtkleind55d13a2015-08-18 08:51:49 -070011 "include/private/*.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -070012 "src/**/*.h",
13 "src/**/*.cpp",
benjaminwagner787ca872015-08-17 12:58:10 -070014
mtkleind55d13a2015-08-18 08:51:49 -070015 # Third Party
benjaminwagner787ca872015-08-17 12:58:10 -070016 "third_party/etc1/*.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -070017 "third_party/etc1/*.h",
benjaminwagner787ca872015-08-17 12:58:10 -070018 "third_party/ktx/*.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -070019 "third_party/ktx/*.h",
benjaminwagner787ca872015-08-17 12:58:10 -070020 ],
21 exclude = [
benjaminwagner6f6bef82015-10-15 08:09:44 -070022 # Exclude platform-dependent files.
23 "src/device/xps/*", # Windows-only. Move to ports?
24 "src/doc/*_XPS.cpp", # Windows-only. Move to ports?
benjaminwagner2211a7b2015-12-01 11:12:05 -080025 "src/fonts/SkFontMgr_fontconfig.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -070026 "src/gpu/gl/android/*",
benjaminwagner86ea33e2015-10-26 10:46:25 -070027 "src/gpu/gl/egl/*",
28 "src/gpu/gl/glx/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -070029 "src/gpu/gl/iOS/*",
30 "src/gpu/gl/mac/*",
31 "src/gpu/gl/win/*",
32 "src/opts/**/*",
33 "src/ports/**/*",
34 "src/utils/android/**/*",
35 "src/utils/mac/**/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -070036 "src/utils/SkThreadUtils_win.cpp", # Windows-only. Move to ports?
37 "src/utils/win/**/*",
38 "src/views/sdl/*",
39 "src/views/win/*",
40 "src/views/unix/*",
41
42 # Exclude multiple definitions.
43 # TODO(mtklein): Move to opts?
mtkleind55d13a2015-08-18 08:51:49 -070044 "src/doc/SkDocument_PDF_None.cpp", # We use SkDocument_PDF.cpp.
benjaminwagner86ea33e2015-10-26 10:46:25 -070045 "src/gpu/gl/GrGLCreateNativeInterface_none.cpp",
46 "src/gpu/gl/GrGLDefaultInterface_native.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -070047
48 # Exclude files that don't compile with the current DEFINES.
benjaminwagneraada3e82015-10-27 09:14:29 -070049 "src/codec/SkJpegCodec.cpp", # libjpeg_turbo version mismatch.
benjaminwagner6f6bef82015-10-15 08:09:44 -070050 "src/gpu/gl/angle/*", # Requires SK_ANGLE define.
51 "src/gpu/gl/command_buffer/*", # unknown type name 'HMODULE'
52 "src/gpu/gl/mesa/*", # Requires SK_MESA define.
53 "src/svg/parser/*", # Missing SkSVG.h.
54
benjaminwagner39e7aa42015-11-18 13:26:10 -080055 # Conflicting dependencies among Lua versions. See cl/107087297.
56 "src/utils/SkLua*",
57
benjaminwagner6f6bef82015-10-15 08:09:44 -070058 # Not used.
59 "src/animator/**/*",
60 "src/views/**/*",
61 "src/xml/SkBML_Verbs.h",
62 "src/xml/SkBML_XMLParser.cpp",
63 "src/xml/SkXMLPullParser.cpp",
64 ],
65)
66
67# Platform-dependent SRCS for google3-default platform.
benjaminwagner39e7aa42015-11-18 13:26:10 -080068BASE_SRCS_UNIX = glob(
benjaminwagner6f6bef82015-10-15 08:09:44 -070069 [
benjaminwagner2211a7b2015-12-01 11:12:05 -080070 "src/fonts/SkFontMgr_fontconfig.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -070071 "src/opts/**/*.cpp",
72 "src/opts/**/*.h",
73 "src/ports/**/*.cpp",
74 "src/ports/**/*.h",
75 ],
76 exclude = [
77 "src/opts/*arm*",
78 "src/opts/*mips*",
79 "src/opts/*NEON*",
80 "src/opts/*neon*",
benjaminwagner86ea33e2015-10-26 10:46:25 -070081 # Included in :opts_ssse3 library.
benjaminwagner6f6bef82015-10-15 08:09:44 -070082 "src/opts/*SSSE3*",
83 "src/opts/*ssse3*",
benjaminwagner86ea33e2015-10-26 10:46:25 -070084 # Included in :opts_sse4 library.
benjaminwagner6f6bef82015-10-15 08:09:44 -070085 "src/opts/*SSE4*",
86 "src/opts/*sse4*",
mtkleinf6d8d282015-12-17 10:18:04 -080087 # Included in :opts_avx or :opts_avx2
88 "src/opts/*avx*",
benjaminwagner6f6bef82015-10-15 08:09:44 -070089 "src/opts/SkBitmapProcState_opts_none.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -070090 "src/opts/SkBlitMask_opts_none.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -070091 "src/opts/SkBlitRow_opts_none.cpp",
92 "src/ports/*android*",
93 "src/ports/*chromium*",
benjaminwagner6f6bef82015-10-15 08:09:44 -070094 "src/ports/*mac*",
95 "src/ports/*mozalloc*",
96 "src/ports/*nacl*",
97 "src/ports/*win*",
benjaminwagner2211a7b2015-12-01 11:12:05 -080098 "src/ports/SkFontConfigInterface_direct_factory.cpp",
99 "src/ports/SkFontMgr_custom_directory_factory.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700100 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
101 "src/ports/SkFontMgr_empty_factory.cpp",
benjaminwagner404816e2015-12-03 05:04:03 -0800102 "src/ports/SkFontMgr_fontconfig.cpp",
benjaminwagner9dbec092015-11-02 05:53:38 -0800103 "src/ports/SkImageDecoder_CG.cpp",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800104 "src/ports/SkFontMgr_fontconfig_factory.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700105 "src/ports/SkImageDecoder_WIC.cpp",
106 "src/ports/SkImageDecoder_empty.cpp",
107 "src/ports/SkImageGenerator_none.cpp",
108 "src/ports/SkTLS_none.cpp",
mtkleind55d13a2015-08-18 08:51:49 -0700109 ],
110)
111
benjaminwagner86ea33e2015-10-26 10:46:25 -0700112# Platform-dependent SRCS for google3-default Android.
benjaminwagner39e7aa42015-11-18 13:26:10 -0800113BASE_SRCS_ANDROID = glob(
benjaminwagner86ea33e2015-10-26 10:46:25 -0700114 [
115 # TODO(benjaminwagner): Figure out how to compile with EGL.
benjaminwagner86ea33e2015-10-26 10:46:25 -0700116 "src/opts/**/*.cpp",
117 "src/opts/**/*.h",
118 "src/ports/**/*.cpp",
119 "src/ports/**/*.h",
120 ],
121 exclude = [
122 "src/opts/*mips*",
123 "src/opts/*SSE2*",
124 "src/opts/*SSSE3*",
125 "src/opts/*ssse3*",
126 "src/opts/*SSE4*",
127 "src/opts/*sse4*",
mtkleinf6d8d282015-12-17 10:18:04 -0800128 "src/opts/*avx*",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700129 "src/opts/*x86*",
130 "src/opts/SkBitmapProcState_opts_none.cpp",
131 "src/opts/SkBlitMask_opts_none.cpp",
132 "src/opts/SkBlitRow_opts_none.cpp",
133 "src/ports/*chromium*",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700134 "src/ports/*fontconfig*",
135 "src/ports/*FontConfig*",
136 "src/ports/*mac*",
137 "src/ports/*mozalloc*",
138 "src/ports/*nacl*",
139 "src/ports/*win*",
140 "src/ports/SkDebug_stdio.cpp",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800141 "src/ports/SkFontConfigInterface_direct_factory.cpp",
142 "src/ports/SkFontConfigInterface_direct_google3_factory.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700143 "src/ports/SkFontMgr_custom_directory_factory.cpp",
144 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
145 "src/ports/SkFontMgr_empty_factory.cpp",
benjaminwagner9dbec092015-11-02 05:53:38 -0800146 "src/ports/SkImageDecoder_CG.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700147 "src/ports/SkImageDecoder_WIC.cpp",
148 "src/ports/SkImageDecoder_empty.cpp",
149 "src/ports/SkImageGenerator_none.cpp",
150 "src/ports/SkTLS_none.cpp",
151 ],
152)
153
iroth8b99ef42015-11-02 11:11:21 -0800154# Platform-dependent SRCS for google3-default iOS.
benjaminwagner39e7aa42015-11-18 13:26:10 -0800155BASE_SRCS_IOS = glob(
iroth8b99ef42015-11-02 11:11:21 -0800156 [
iroth8b99ef42015-11-02 11:11:21 -0800157 "src/opts/**/*.cpp",
158 "src/opts/**/*.h",
159 "src/ports/**/*.cpp",
160 "src/ports/**/*.h",
161 ],
162 exclude = [
163 "src/opts/*mips*",
164 "src/opts/*NEON*",
165 "src/opts/*neon*",
166 "src/opts/*SSE2*",
167 "src/opts/*SSSE3*",
168 "src/opts/*ssse3*",
169 "src/opts/*SSE4*",
170 "src/opts/*sse4*",
mtkleinf6d8d282015-12-17 10:18:04 -0800171 "src/opts/*avx*",
iroth8b99ef42015-11-02 11:11:21 -0800172 "src/opts/*x86*",
173 "src/opts/SkBitmapProcState_opts_none.cpp",
174 "src/opts/SkBlitMask_opts_none.cpp",
175 "src/opts/SkBlitRow_opts_none.cpp",
176 "src/ports/*android*",
177 "src/ports/*chromium*",
178 "src/ports/*fontconfig*",
179 "src/ports/*FontConfig*",
180 "src/ports/*FreeType*",
181 "src/ports/*mozalloc*",
182 "src/ports/*nacl*",
183 "src/ports/*win*",
184 "src/ports/SkDebug_stdio.cpp",
185 "src/ports/SkFontMgr_custom.cpp",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800186 "src/ports/SkFontConfigInterface_direct_factory.cpp",
187 "src/ports/SkFontConfigInterface_direct_google3_factory.cpp",
iroth8b99ef42015-11-02 11:11:21 -0800188 "src/ports/SkFontMgr_custom_directory_factory.cpp",
189 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
190 "src/ports/SkFontMgr_empty_factory.cpp",
191 "src/ports/SkImageDecoder_CG.cpp",
192 "src/ports/SkImageDecoder_WIC.cpp",
193 "src/ports/SkImageDecoder_empty.cpp",
194 "src/ports/SkImageGenerator_none.cpp",
195 "src/ports/SkTLS_none.cpp",
196 ],
197)
198
benjaminwagner39e7aa42015-11-18 13:26:10 -0800199BASE_SRCS_PLATFORM = select({
200 CONDITION_ANDROID: BASE_SRCS_ANDROID,
201 CONDITION_IOS: BASE_SRCS_IOS,
202 "//conditions:default": BASE_SRCS_UNIX,
benjaminwagner86ea33e2015-10-26 10:46:25 -0700203})
204
benjaminwagner39e7aa42015-11-18 13:26:10 -0800205SSSE3_SRCS = glob(
mtkleind55d13a2015-08-18 08:51:49 -0700206 [
207 "src/opts/*SSSE3*.cpp",
208 "src/opts/*ssse3*.cpp",
209 ],
210)
211
benjaminwagner39e7aa42015-11-18 13:26:10 -0800212SSE4_SRCS = glob(
mtkleind55d13a2015-08-18 08:51:49 -0700213 [
214 "src/opts/*SSE4*.cpp",
215 "src/opts/*sse4*.cpp",
benjaminwagner787ca872015-08-17 12:58:10 -0700216 ],
217)
218
mtkleinf6d8d282015-12-17 10:18:04 -0800219AVX_SRCS = glob(
220 [
221 "src/opts/*_avx.cpp",
222 ],
223)
224
225AVX2_SRCS = glob(
226 [
227 "src/opts/*_avx2.cpp",
228 ],
229)
230
benjaminwagner39e7aa42015-11-18 13:26:10 -0800231BASE_HDRS = glob(
benjaminwagner787ca872015-08-17 12:58:10 -0700232 [
233 "include/**/*.h",
234 ],
mtkleind55d13a2015-08-18 08:51:49 -0700235 exclude = [
benjaminwagner6f6bef82015-10-15 08:09:44 -0700236 "include/private/**/*",
237
238 # Not used.
239 "include/animator/**/*",
240 "include/views/**/*",
241 "include/xml/SkBML_WXMLParser.h",
242 "include/xml/SkBML_XMLParser.h",
mtkleind55d13a2015-08-18 08:51:49 -0700243 ],
benjaminwagner787ca872015-08-17 12:58:10 -0700244)
245
benjaminwagner39e7aa42015-11-18 13:26:10 -0800246# Dependencies.
247BASE_DEPS_UNIX = [
mtkleinf6d8d282015-12-17 10:18:04 -0800248 ":opts_avx2",
249 ":opts_avx",
benjaminwagner39e7aa42015-11-18 13:26:10 -0800250 ":opts_sse4",
251 ":opts_ssse3",
252]
253
254BASE_DEPS_ANDROID = []
255
256BASE_DEPS_IOS = []
257
258BASE_DEPS = select({
259 CONDITION_ANDROID: BASE_DEPS_ANDROID + BASE_EXTERNAL_DEPS_ANDROID,
260 CONDITION_IOS: BASE_DEPS_IOS + BASE_EXTERNAL_DEPS_IOS,
261 "//conditions:default": BASE_DEPS_UNIX + BASE_EXTERNAL_DEPS_UNIX,
262}) + EXTERNAL_DEPS_ALL
263
benjaminwagner787ca872015-08-17 12:58:10 -0700264# Includes needed by Skia implementation. Not public includes.
265INCLUDES = [
benjaminwagnerfa7e1a02015-11-13 12:27:08 -0800266 "include/android",
benjaminwagner787ca872015-08-17 12:58:10 -0700267 "include/c",
268 "include/codec",
269 "include/config",
270 "include/core",
benjaminwagner787ca872015-08-17 12:58:10 -0700271 "include/effects",
272 "include/gpu",
273 "include/images",
274 "include/pathops",
benjaminwagner787ca872015-08-17 12:58:10 -0700275 "include/pipe",
276 "include/ports",
277 "include/private",
278 "include/utils",
iroth8b99ef42015-11-02 11:11:21 -0800279 "include/utils/mac",
280 "include/utils/win",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700281 "include/svg",
benjaminwagner787ca872015-08-17 12:58:10 -0700282 "include/xml",
benjaminwagnerfa7e1a02015-11-13 12:27:08 -0800283 "src/codec",
benjaminwagner787ca872015-08-17 12:58:10 -0700284 "src/core",
benjaminwagner787ca872015-08-17 12:58:10 -0700285 "src/gpu",
286 "src/image",
287 "src/lazy",
288 "src/opts",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800289 "src/ports",
benjaminwagner787ca872015-08-17 12:58:10 -0700290 "src/pdf",
benjaminwagner787ca872015-08-17 12:58:10 -0700291 "src/sfnt",
292 "src/utils",
293 "third_party/etc1",
294 "third_party/ktx",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800295] + EXTERNAL_INCLUDES
benjaminwagner787ca872015-08-17 12:58:10 -0700296
benjaminwagner39e7aa42015-11-18 13:26:10 -0800297## :dm
benjaminwagner86ea33e2015-10-26 10:46:25 -0700298
299# Platform-independent SRCS for DM.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700300DM_SRCS = glob(
301 [
302 "dm/*.cpp",
303 "dm/*.h",
304 "gm/*.c",
305 "gm/*.cpp",
306 "gm/*.h",
307 "tests/*.cpp",
308 "tests/*.h",
309 "tools/CrashHandler.cpp",
310 "tools/CrashHandler.h",
311 "tools/LazyDecodeBitmap.cpp",
312 "tools/LazyDecodeBitmap.h",
313 "tools/ProcStats.cpp",
314 "tools/ProcStats.h",
315 "tools/Resources.cpp",
316 "tools/Resources.h",
benjaminwagner32885142015-10-24 07:55:31 -0700317 "tools/SkBitmapRegionCanvas.cpp",
318 "tools/SkBitmapRegionCanvas.h",
319 "tools/SkBitmapRegionCodec.cpp",
320 "tools/SkBitmapRegionCodec.h",
msarett5cb48852015-11-06 08:56:32 -0800321 "tools/SkBitmapRegionDecoder.cpp",
322 "tools/SkBitmapRegionDecoder.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700323 "tools/SkBitmapRegionSampler.cpp",
324 "tools/SkBitmapRegionSampler.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700325 "tools/flags/*.cpp",
326 "tools/flags/*.h",
benjaminwagner32885142015-10-24 07:55:31 -0700327 "tools/sk_tool_utils.cpp",
328 "tools/sk_tool_utils.h",
329 "tools/sk_tool_utils_font.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700330 "tools/timer/*.cpp",
331 "tools/timer/*.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700332 ],
333 exclude = [
benjaminwagner86ea33e2015-10-26 10:46:25 -0700334 "dm/DMSrcSinkAndroid.cpp", # Android-only.
335 "tests/FontMgrAndroidParserTest.cpp", # Android-only.
336 "tests/PathOpsSkpClipTest.cpp", # Alternate main.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700337 "tests/skia_test.cpp", # Old main.
338 "tests/SkpSkGrTest.cpp", # Alternate main.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700339 "tools/timer/SysTimer_mach.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700340 "tools/timer/SysTimer_windows.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700341 ],
342)
343
benjaminwagner86ea33e2015-10-26 10:46:25 -0700344DM_SRCS_UNIX = []
345
346DM_SRCS_ANDROID = glob(
347 [
348 # Depends on Android HWUI library that is not available in google3.
349 #"dm/DMSrcSinkAndroid.cpp",
350 "tests/FontMgrAndroidParserTest.cpp",
351 ],
352)
353
354DM_PLATFORM_SRCS = select({
355 CONDITION_ANDROID: DM_SRCS_ANDROID,
356 "//conditions:default": DM_SRCS_UNIX,
357})
358
benjaminwagner6f6bef82015-10-15 08:09:44 -0700359DM_INCLUDES = [
360 "gm",
361 "src/codec",
362 "src/effects",
363 "src/fonts",
364 "src/pathops",
365 "src/pipe/utils",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700366 "src/ports",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700367 "src/utils/debugger",
368 "tests",
369 "tools",
370 "tools/flags",
371 "tools/timer",
372]
373
benjaminwagner39e7aa42015-11-18 13:26:10 -0800374COPTS_ANDROID = ["-mfpu=neon"]
benjaminwagner86ea33e2015-10-26 10:46:25 -0700375
benjaminwagner39e7aa42015-11-18 13:26:10 -0800376COPTS_IOS = []
iroth8b99ef42015-11-02 11:11:21 -0800377
benjaminwagner86ea33e2015-10-26 10:46:25 -0700378COPTS_UNIX = [
benjaminwagner787ca872015-08-17 12:58:10 -0700379 "-Wno-implicit-fallthrough", # Some intentional fallthrough.
benjaminwagner7d974f52015-10-19 13:55:55 -0700380 "-Wno-deprecated-declarations", # Internal use of deprecated methods. :(
benjaminwagner787ca872015-08-17 12:58:10 -0700381]
382
benjaminwagner86ea33e2015-10-26 10:46:25 -0700383COPTS = select({
384 CONDITION_ANDROID: COPTS_ANDROID,
iroth8b99ef42015-11-02 11:11:21 -0800385 CONDITION_IOS: COPTS_IOS,
benjaminwagner86ea33e2015-10-26 10:46:25 -0700386 "//conditions:default": COPTS_UNIX,
387})
388
389DEFINES_ANDROID = [
390 "SK_BUILD_FOR_ANDROID",
391 # TODO(benjaminwagner): Try to get png library updated?
392 "SK_PNG_NO_INDEX_SUPPORTED",
393]
394
iroth8b99ef42015-11-02 11:11:21 -0800395DEFINES_IOS = [
396 "SK_BUILD_FOR_IOS",
397 "SK_IGNORE_ETC1_SUPPORT",
398]
399
benjaminwagner86ea33e2015-10-26 10:46:25 -0700400DEFINES_UNIX = [
401 "SK_BUILD_FOR_UNIX",
402 "SK_SAMPLES_FOR_X",
403]
404
405DEFINES_ALL = [
benjaminwagner787ca872015-08-17 12:58:10 -0700406 # Chrome DEFINES.
407 "SK_USE_FLOATBITS",
408 "SK_USE_FREETYPE_EMBOLDEN",
409 # Turn on a few Google3-specific build fixes.
410 "GOOGLE3",
benjaminwagner787ca872015-08-17 12:58:10 -0700411]
412
benjaminwagner86ea33e2015-10-26 10:46:25 -0700413DEFINES = select({
414 CONDITION_ANDROID: DEFINES_ANDROID,
iroth8b99ef42015-11-02 11:11:21 -0800415 CONDITION_IOS: DEFINES_IOS,
benjaminwagner86ea33e2015-10-26 10:46:25 -0700416 "//conditions:default": DEFINES_UNIX,
417}) + DEFINES_ALL
418
419LINKOPTS = select({
420 CONDITION_ANDROID: [
421 "-ldl",
422 "-lEGL",
423 ],
424 "//conditions:default": ["-ldl"],
425})
benjaminwagner6f6bef82015-10-15 08:09:44 -0700426
427cc_library(
428 name = "opts_ssse3",
benjaminwagner39e7aa42015-11-18 13:26:10 -0800429 srcs = SSSE3_SRCS,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700430 copts = COPTS + ["-mssse3"],
431 defines = DEFINES,
432 includes = INCLUDES,
benjaminwagner8a3760f2015-10-29 13:40:27 -0700433 deps = EXTERNAL_DEPS_ALL,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700434)
435
436cc_library(
437 name = "opts_sse4",
benjaminwagner39e7aa42015-11-18 13:26:10 -0800438 srcs = SSE4_SRCS,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700439 copts = COPTS + ["-msse4"],
440 defines = DEFINES,
441 includes = INCLUDES,
benjaminwagner8a3760f2015-10-29 13:40:27 -0700442 deps = EXTERNAL_DEPS_ALL,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700443)
444
mtkleinf6d8d282015-12-17 10:18:04 -0800445cc_library(
446 name = "opts_avx",
447 srcs = AVX_SRCS,
448 copts = COPTS + ["-mavx"],
449 defines = DEFINES,
450 includes = INCLUDES,
451 deps = EXTERNAL_DEPS_ALL,
452)
453
454cc_library(
455 name = "opts_avx2",
456 srcs = AVX2_SRCS,
457 copts = COPTS + ["-mavx2"],
458 defines = DEFINES,
459 includes = INCLUDES,
460 deps = EXTERNAL_DEPS_ALL,
461)
462
benjaminwagnera445cbc2015-11-18 13:48:47 -0800463# If you need Ganesh (GPU) support in Skia, please contact skia-team@google.com
464# for help.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700465cc_library(
466 name = "skia",
benjaminwagner39e7aa42015-11-18 13:26:10 -0800467 srcs = BASE_SRCS + BASE_SRCS_PLATFORM,
468 hdrs = BASE_HDRS,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700469 copts = COPTS,
470 defines = DEFINES,
471 includes = INCLUDES,
472 linkopts = LINKOPTS,
473 visibility = [":skia_clients"],
benjaminwagner39e7aa42015-11-18 13:26:10 -0800474 deps = BASE_DEPS,
benjaminwagner9dbec092015-11-02 05:53:38 -0800475 alwayslink = 1,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700476)
477
478cc_test(
479 name = "dm",
480 size = "large",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700481 srcs = DM_SRCS + DM_PLATFORM_SRCS,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700482 args = [
483 "--nogpu",
484 "--verbose",
485 # TODO(mtklein): maybe investigate why these fail?
mtkleine47f1a72015-11-20 13:58:18 -0800486 "--match ~FontMgr ~Scalar ~Canvas ~Codec_stripes ~Codec_Dimensions ~Codec ~Stream ~skps ~RecordDraw_TextBounds",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700487 "--resourcePath %s/resources" % BASE_DIR,
488 "--images %s/resources" % BASE_DIR,
489 ],
490 copts = COPTS,
benjaminwagner964eeba2015-10-20 13:00:48 -0700491 data = glob(["resources/**/*"]),
benjaminwagner6f6bef82015-10-15 08:09:44 -0700492 defines = DEFINES,
493 includes = DM_INCLUDES,
494 deps = DM_EXTERNAL_DEPS + [
495 ":skia",
benjaminwagner8a3760f2015-10-29 13:40:27 -0700496 ] + EXTERNAL_DEPS_ALL,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700497)