OLD | NEW |
1 # Copyright 2016 Google Inc. | 1 # Copyright 2016 Google Inc. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 declare_args() { | 6 declare_args() { |
7 } | 7 } |
8 | 8 |
9 skia_public_includes = [ | 9 skia_public_includes = [ |
| 10 "include/android", |
10 "include/codec", | 11 "include/codec", |
11 "include/config", | 12 "include/config", |
12 "include/core", | 13 "include/core", |
13 "include/effects", | 14 "include/effects", |
14 "include/gpu", | 15 "include/gpu", |
15 "include/gpu/gl", | 16 "include/gpu/gl", |
16 "include/images", | 17 "include/images", |
17 "include/pathops", | 18 "include/pathops", |
18 "include/ports", | 19 "include/ports", |
| 20 "include/svg", |
19 "include/utils", | 21 "include/utils", |
20 "include/utils/mac", | 22 "include/utils/mac", |
| 23 "include/xml", |
21 | 24 |
22 "include/c", # TODO: move back to top, order shouldn't matter | 25 "include/c", # TODO: move back to top, order shouldn't matter |
23 ] | 26 ] |
24 | 27 |
25 # Skia public API, generally provided by :skia. | 28 # Skia public API, generally provided by :skia. |
26 config("skia_public") { | 29 config("skia_public") { |
27 include_dirs = skia_public_includes | 30 include_dirs = skia_public_includes |
28 defines = [ "SKIA_DLL" ] | 31 defines = [ "SKIA_DLL" ] |
29 } | 32 } |
30 | 33 |
31 # Skia internal APIs, used by Skia itself and a few test tools. | 34 # Skia internal APIs, used by Skia itself and a few test tools. |
32 config("skia_private") { | 35 config("skia_private") { |
33 visibility = [ ":*" ] | 36 visibility = [ ":*" ] |
34 | 37 |
35 include_dirs = [ | 38 include_dirs = [ |
36 "include/private", | 39 "include/private", |
37 "src/c", | 40 "src/c", |
38 "src/codec", | 41 "src/codec", |
39 "src/config", | 42 "src/config", |
40 "src/core", | 43 "src/core", |
41 "src/effects", | 44 "src/effects", |
| 45 "src/effects/gradients", |
| 46 "src/fonts", |
42 "src/gpu", | 47 "src/gpu", |
43 "src/image", | 48 "src/image", |
44 "src/images", | 49 "src/images", |
45 "src/lazy", | 50 "src/lazy", |
46 "src/opts", | 51 "src/opts", |
47 "src/pathops", | 52 "src/pathops", |
48 "src/ports", | 53 "src/ports", |
49 "src/sfnt", | 54 "src/sfnt", |
50 "src/utils", | 55 "src/utils", |
51 "third_party/etc1", | 56 "third_party/etc1", |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 } | 146 } |
142 | 147 |
143 component("skia") { | 148 component("skia") { |
144 public_configs = [ ":skia_public" ] | 149 public_configs = [ ":skia_public" ] |
145 configs += skia_library_configs | 150 configs += skia_library_configs |
146 | 151 |
147 deps = [ | 152 deps = [ |
148 ":opts_avx", | 153 ":opts_avx", |
149 ":opts_sse41", | 154 ":opts_sse41", |
150 ":opts_ssse3", | 155 ":opts_ssse3", |
| 156 "//third_party/expat", |
| 157 "//third_party/giflib", |
151 "//third_party/libjpeg_turbo", | 158 "//third_party/libjpeg_turbo", |
152 "//third_party/libpng", | 159 "//third_party/libpng", |
| 160 "//third_party/libwebp", |
153 "//third_party/zlib", | 161 "//third_party/zlib", |
154 ] | 162 ] |
155 | 163 |
156 defines = [ | 164 defines = [ |
| 165 "SK_HAS_GIF_LIBRARY", |
157 "SK_HAS_JPEG_LIBRARY", | 166 "SK_HAS_JPEG_LIBRARY", |
158 "SK_HAS_PNG_LIBRARY", | 167 "SK_HAS_PNG_LIBRARY", |
| 168 "SK_HAS_WEBP_LIBRARY", |
159 ] | 169 ] |
160 | 170 |
161 libs = [ "pthread" ] | 171 libs = [ "pthread" ] |
162 | 172 |
163 sources = [] | 173 sources = [] |
164 sources += core_gypi.sources | 174 sources += core_gypi.sources |
165 sources += effects_gypi.sources | 175 sources += effects_gypi.sources |
166 sources += gpu_gypi.skgpu_sources | 176 sources += gpu_gypi.skgpu_sources |
167 sources += opts_gypi.sse2_sources | 177 sources += opts_gypi.sse2_sources |
168 sources += pdf_gypi.sources | 178 sources += pdf_gypi.sources |
169 sources += utils_gypi.sources | 179 sources += utils_gypi.sources |
170 sources += [ | 180 sources += [ |
| 181 "src/android/SkBitmapRegionCodec.cpp", |
| 182 "src/android/SkBitmapRegionDecoder.cpp", |
| 183 "src/codec/SkAndroidCodec.cpp", |
171 "src/codec/SkBmpCodec.cpp", | 184 "src/codec/SkBmpCodec.cpp", |
172 "src/codec/SkBmpMaskCodec.cpp", | 185 "src/codec/SkBmpMaskCodec.cpp", |
173 "src/codec/SkBmpRLECodec.cpp", | 186 "src/codec/SkBmpRLECodec.cpp", |
174 "src/codec/SkBmpStandardCodec.cpp", | 187 "src/codec/SkBmpStandardCodec.cpp", |
175 "src/codec/SkCodec.cpp", | 188 "src/codec/SkCodec.cpp", |
176 "src/codec/SkCodecImageGenerator.cpp", | 189 "src/codec/SkCodecImageGenerator.cpp", |
| 190 "src/codec/SkGifCodec.cpp", |
177 "src/codec/SkIcoCodec.cpp", | 191 "src/codec/SkIcoCodec.cpp", |
178 "src/codec/SkJpegCodec.cpp", | 192 "src/codec/SkJpegCodec.cpp", |
179 "src/codec/SkJpegDecoderMgr.cpp", | 193 "src/codec/SkJpegDecoderMgr.cpp", |
180 "src/codec/SkJpegUtility.cpp", | 194 "src/codec/SkJpegUtility.cpp", |
181 "src/codec/SkMaskSwizzler.cpp", | 195 "src/codec/SkMaskSwizzler.cpp", |
182 "src/codec/SkMasks.cpp", | 196 "src/codec/SkMasks.cpp", |
183 "src/codec/SkPngCodec.cpp", | 197 "src/codec/SkPngCodec.cpp", |
| 198 "src/codec/SkSampledCodec.cpp", |
184 "src/codec/SkSampler.cpp", | 199 "src/codec/SkSampler.cpp", |
185 "src/codec/SkSwizzler.cpp", | 200 "src/codec/SkSwizzler.cpp", |
186 "src/codec/SkWbmpCodec.cpp", | 201 "src/codec/SkWbmpCodec.cpp", |
| 202 "src/codec/SkWebpAdapterCodec.cpp", |
| 203 "src/codec/SkWebpCodec.cpp", |
187 "src/images/SkImageEncoder.cpp", | 204 "src/images/SkImageEncoder.cpp", |
188 "src/images/SkImageEncoder_Factory.cpp", | 205 "src/images/SkImageEncoder_Factory.cpp", |
189 "src/ports/SkDiscardableMemory_none.cpp", | 206 "src/ports/SkDiscardableMemory_none.cpp", |
190 "src/ports/SkGlobalInitialization_default.cpp", | 207 "src/ports/SkGlobalInitialization_default.cpp", |
191 "src/ports/SkImageGenerator_skia.cpp", | 208 "src/ports/SkImageGenerator_skia.cpp", |
192 "src/ports/SkMemory_malloc.cpp", | 209 "src/ports/SkMemory_malloc.cpp", |
193 "src/ports/SkOSFile_stdio.cpp", | 210 "src/ports/SkOSFile_stdio.cpp", |
194 "src/sfnt/SkOTTable_name.cpp", | 211 "src/sfnt/SkOTTable_name.cpp", |
195 "src/sfnt/SkOTUtils.cpp", | 212 "src/sfnt/SkOTUtils.cpp", |
| 213 "src/svg/SkSVGCanvas.cpp", |
| 214 "src/svg/SkSVGDevice.cpp", |
196 "src/utils/mac/SkStream_mac.cpp", | 215 "src/utils/mac/SkStream_mac.cpp", |
| 216 "src/xml/SkDOM.cpp", |
| 217 "src/xml/SkXMLParser.cpp", |
| 218 "src/xml/SkXMLWriter.cpp", |
197 "third_party/etc1/etc1.cpp", | 219 "third_party/etc1/etc1.cpp", |
198 "third_party/ktx/ktx.cpp", | 220 "third_party/ktx/ktx.cpp", |
199 ] | 221 ] |
200 | 222 |
201 if (is_win) { | 223 if (is_win) { |
202 sources += [ | 224 sources += [ |
203 "src/ports/SkDebug_win.cpp", | 225 "src/ports/SkDebug_win.cpp", |
204 "src/ports/SkFontHost_win.cpp", | 226 "src/ports/SkFontHost_win.cpp", |
205 "src/ports/SkFontMgr_win_dw.cpp", | 227 "src/ports/SkFontMgr_win_dw.cpp", |
206 "src/ports/SkFontMgr_win_dw_factory.cpp", | 228 "src/ports/SkFontMgr_win_dw_factory.cpp", |
207 "src/ports/SkImageEncoder_WIC.cpp", | 229 "src/ports/SkImageEncoder_WIC.cpp", |
208 "src/ports/SkImageGeneratorWIC.cpp", | 230 "src/ports/SkImageGeneratorWIC.cpp", |
209 "src/ports/SkOSFile_win.cpp", | 231 "src/ports/SkOSFile_win.cpp", |
210 "src/ports/SkScalerContext_win_dw.cpp", | 232 "src/ports/SkScalerContext_win_dw.cpp", |
211 "src/ports/SkTLS_win.cpp", | 233 "src/ports/SkTLS_win.cpp", |
212 "src/ports/SkTypeface_win_dw.cpp", | 234 "src/ports/SkTypeface_win_dw.cpp", |
| 235 "src/xps/SkDocument_XPS.cpp", |
213 ] | 236 ] |
214 } else { | 237 } else { |
215 sources += [ | 238 sources += [ |
216 "src/ports/SkDebug_stdio.cpp", | 239 "src/ports/SkDebug_stdio.cpp", |
217 "src/ports/SkOSFile_posix.cpp", | 240 "src/ports/SkOSFile_posix.cpp", |
218 "src/ports/SkTLS_pthread.cpp", | 241 "src/ports/SkTLS_pthread.cpp", |
| 242 "src/xps/SkDocument_XPS_None.cpp", |
219 ] | 243 ] |
220 } | 244 } |
221 | 245 |
222 if (is_linux) { | 246 if (is_linux) { |
223 deps += [ | 247 deps += [ |
224 "third_party:fontconfig", | 248 "third_party:fontconfig", |
225 "third_party:freetype2", | 249 "third_party:freetype2", |
226 ] | 250 ] |
227 sources += [ | 251 sources += [ |
228 "src/fonts/SkFontMgr_fontconfig.cpp", | 252 "src/fonts/SkFontMgr_fontconfig.cpp", |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 293 |
270 sources = [ | 294 sources = [ |
271 "tools/fiddle/draw.cpp", | 295 "tools/fiddle/draw.cpp", |
272 "tools/fiddle/fiddle_main.cpp", | 296 "tools/fiddle/fiddle_main.cpp", |
273 ] | 297 ] |
274 deps = [ | 298 deps = [ |
275 ":skia", | 299 ":skia", |
276 ":skia.h", | 300 ":skia.h", |
277 ] | 301 ] |
278 } | 302 } |
| 303 |
| 304 template("test_lib") { |
| 305 config(target_name + "_config") { |
| 306 include_dirs = invoker.public_include_dirs |
| 307 } |
| 308 source_set(target_name) { |
| 309 forward_variables_from(invoker, "*", [ "public_include_dirs" ]) |
| 310 public_configs = [ |
| 311 ":" + target_name + "_config", |
| 312 ":skia_private", |
| 313 ] |
| 314 |
| 315 if (!defined(deps)) { |
| 316 deps = [] |
| 317 } |
| 318 deps += [ ":skia" ] |
| 319 testonly = true |
| 320 } |
| 321 } |
| 322 |
| 323 test_lib("gpu_tool_utils") { |
| 324 public_include_dirs = [ "tools/gpu" ] |
| 325 sources = [ |
| 326 "tools/gpu/GrContextFactory.cpp", |
| 327 "tools/gpu/GrTest.cpp", |
| 328 "tools/gpu/TestContext.cpp", |
| 329 "tools/gpu/gl/GLTestContext.cpp", |
| 330 "tools/gpu/gl/debug/DebugGLTestContext.cpp", |
| 331 "tools/gpu/gl/debug/GrBufferObj.cpp", |
| 332 "tools/gpu/gl/debug/GrFrameBufferObj.cpp", |
| 333 "tools/gpu/gl/debug/GrProgramObj.cpp", |
| 334 "tools/gpu/gl/debug/GrShaderObj.cpp", |
| 335 "tools/gpu/gl/debug/GrTextureObj.cpp", |
| 336 "tools/gpu/gl/debug/GrTextureUnitObj.cpp", |
| 337 "tools/gpu/gl/null/NullGLTestContext.cpp", |
| 338 ] |
| 339 libs = [] |
| 340 |
| 341 if (is_linux) { |
| 342 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] |
| 343 libs += [ |
| 344 "GL", |
| 345 "GLU", |
| 346 "X11", |
| 347 ] |
| 348 } else if (is_mac) { |
| 349 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] |
| 350 libs += [ "OpenGL.framework" ] |
| 351 } |
| 352 } |
| 353 |
| 354 test_lib("flags") { |
| 355 public_include_dirs = [ "tools/flags" ] |
| 356 sources = [ |
| 357 "tools/flags/SkCommandLineFlags.cpp", |
| 358 "tools/flags/SkCommonFlags.cpp", |
| 359 "tools/flags/SkCommonFlagsConfig.cpp", |
| 360 ] |
| 361 deps = [ |
| 362 ":gpu_tool_utils", |
| 363 ] |
| 364 } |
| 365 |
| 366 test_lib("tool_utils") { |
| 367 public_include_dirs = [ |
| 368 "tools", |
| 369 "tools/timer", |
| 370 ] |
| 371 sources = [ |
| 372 "src/utils/SkMultiPictureDocumentReader.cpp", # TODO(halcanary): move to to
ols? |
| 373 "tools/ProcStats.cpp", |
| 374 "tools/Resources.cpp", |
| 375 "tools/picture_utils.cpp", |
| 376 "tools/random_parse_path.cpp", |
| 377 "tools/sk_tool_utils.cpp", |
| 378 "tools/sk_tool_utils_font.cpp", |
| 379 "tools/timer/Timer.cpp", |
| 380 ] |
| 381 deps = [ |
| 382 ":flags", |
| 383 ] |
| 384 } |
| 385 |
| 386 gm_sources = exec_script("gyp/find.py", |
| 387 [ |
| 388 rebase_path("gm"), |
| 389 "*.c*", |
| 390 ], |
| 391 "list lines", |
| 392 []) |
| 393 test_lib("gm") { |
| 394 public_include_dirs = [ "gm" ] |
| 395 sources = gm_sources |
| 396 deps = [ |
| 397 ":gpu_tool_utils", |
| 398 ":skia", |
| 399 ":tool_utils", |
| 400 ] |
| 401 } |
| 402 |
| 403 executable("dm") { |
| 404 sources = [ |
| 405 "dm/DM.cpp", |
| 406 "dm/DMJsonWriter.cpp", |
| 407 "dm/DMSrcSink.cpp", |
| 408 |
| 409 # TODO: tests for real |
| 410 "tests/Test.cpp", |
| 411 ] |
| 412 include_dirs = [ "tests" ] |
| 413 deps = [ |
| 414 ":flags", |
| 415 ":gm", |
| 416 ":gpu_tool_utils", |
| 417 ":skia", |
| 418 ":tool_utils", |
| 419 "//third_party/jsoncpp", |
| 420 "//third_party/libpng", |
| 421 ] |
| 422 testonly = true |
| 423 } |
OLD | NEW |