| 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 skia_enable_tools = !is_fuchsia && !is_component_build | 7 skia_enable_tools = !is_fuchsia && !is_component_build |
| 8 | 8 |
| 9 skia_use_expat = true | 9 skia_use_expat = true |
| 10 skia_use_giflib = !is_fuchsia | 10 skia_use_giflib = !is_fuchsia |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 [ | 154 [ |
| 155 "sources", | 155 "sources", |
| 156 "cflags", | 156 "cflags", |
| 157 ]) | 157 ]) |
| 158 } | 158 } |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 | 161 |
| 162 is_x86 = current_cpu == "x64" || current_cpu == "x86" | 162 is_x86 = current_cpu == "x64" || current_cpu == "x86" |
| 163 | 163 |
| 164 opts("armv7") { | 164 opts("none") { |
| 165 enabled = current_cpu == "arm" | 165 enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64" |
| 166 sources = opts_gypi.armv7_sources | 166 sources = opts_gypi.none_sources |
| 167 cflags = [] | 167 cflags = [] |
| 168 } | 168 } |
| 169 | 169 |
| 170 opts("neon") { | 170 opts("armv7") { |
| 171 enabled = current_cpu == "arm" | 171 enabled = current_cpu == "arm" |
| 172 sources = opts_gypi.neon_sources | 172 sources = opts_gypi.armv7_sources + opts_gypi.neon_sources |
| 173 cflags = [ "-mfpu=neon" ] | 173 cflags = [] |
| 174 } | 174 } |
| 175 | 175 |
| 176 opts("arm64") { | 176 opts("arm64") { |
| 177 enabled = current_cpu == "arm64" | 177 enabled = current_cpu == "arm64" |
| 178 sources = opts_gypi.arm64_sources | 178 sources = opts_gypi.arm64_sources |
| 179 cflags = [] | 179 cflags = [] |
| 180 } | 180 } |
| 181 | 181 |
| 182 opts("crc32") { | 182 opts("crc32") { |
| 183 enabled = current_cpu == "arm64" | 183 enabled = current_cpu == "arm64" |
| 184 sources = opts_gypi.crc32_sources | 184 sources = opts_gypi.crc32_sources |
| 185 cflags = [ "-march=armv8-a+crc" ] | 185 cflags = [ "-march=armv8-a+crc" ] |
| 186 } | 186 } |
| 187 | 187 |
| 188 opts("none") { | |
| 189 enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64" | |
| 190 sources = opts_gypi.none_sources | |
| 191 cflags = [] | |
| 192 } | |
| 193 | |
| 194 opts("sse2") { | 188 opts("sse2") { |
| 195 enabled = is_x86 | 189 enabled = is_x86 |
| 196 sources = opts_gypi.sse2_sources | 190 sources = opts_gypi.sse2_sources |
| 197 cflags = [ "-msse2" ] | 191 cflags = [ "-msse2" ] |
| 198 } | 192 } |
| 199 | 193 |
| 200 opts("ssse3") { | 194 opts("ssse3") { |
| 201 enabled = is_x86 | 195 enabled = is_x86 |
| 202 sources = opts_gypi.ssse3_sources | 196 sources = opts_gypi.ssse3_sources |
| 203 cflags = [ "-mssse3" ] | 197 cflags = [ "-mssse3" ] |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 public_configs = [ ":skia_public" ] | 329 public_configs = [ ":skia_public" ] |
| 336 configs += skia_library_configs | 330 configs += skia_library_configs |
| 337 | 331 |
| 338 deps = [ | 332 deps = [ |
| 339 ":arm64", | 333 ":arm64", |
| 340 ":armv7", | 334 ":armv7", |
| 341 ":avx", | 335 ":avx", |
| 342 ":crc32", | 336 ":crc32", |
| 343 ":gif", | 337 ":gif", |
| 344 ":jpeg", | 338 ":jpeg", |
| 345 ":neon", | |
| 346 ":none", | 339 ":none", |
| 347 ":pdf", | 340 ":pdf", |
| 348 ":png", | 341 ":png", |
| 349 ":sse2", | 342 ":sse2", |
| 350 ":sse41", | 343 ":sse41", |
| 351 ":sse42", | 344 ":sse42", |
| 352 ":ssse3", | 345 ":ssse3", |
| 353 ":webp", | 346 ":webp", |
| 354 ":xml", | 347 ":xml", |
| 355 ] | 348 ] |
| 356 | 349 |
| 357 if (!is_win) { | |
| 358 libs = [ "pthread" ] | |
| 359 } | |
| 360 | |
| 361 sources = [] | 350 sources = [] |
| 362 sources += core_gypi.sources | 351 sources += core_gypi.sources |
| 363 sources += effects_gypi.sources | 352 sources += effects_gypi.sources |
| 364 sources += gpu_gypi.skgpu_sources | 353 sources += gpu_gypi.skgpu_sources |
| 365 sources += utils_gypi.sources | 354 sources += utils_gypi.sources |
| 366 sources += [ | 355 sources += [ |
| 367 "src/android/SkBitmapRegionCodec.cpp", | 356 "src/android/SkBitmapRegionCodec.cpp", |
| 368 "src/android/SkBitmapRegionDecoder.cpp", | 357 "src/android/SkBitmapRegionDecoder.cpp", |
| 369 "src/codec/SkAndroidCodec.cpp", | 358 "src/codec/SkAndroidCodec.cpp", |
| 370 "src/codec/SkBmpCodec.cpp", | 359 "src/codec/SkBmpCodec.cpp", |
| (...skipping 23 matching lines...) Expand all Loading... |
| 394 "src/svg/SkSVGDevice.cpp", | 383 "src/svg/SkSVGDevice.cpp", |
| 395 "src/utils/mac/SkStream_mac.cpp", | 384 "src/utils/mac/SkStream_mac.cpp", |
| 396 "third_party/etc1/etc1.cpp", | 385 "third_party/etc1/etc1.cpp", |
| 397 "third_party/ktx/ktx.cpp", | 386 "third_party/ktx/ktx.cpp", |
| 398 ] | 387 ] |
| 399 sources -= [ | 388 sources -= [ |
| 400 "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", | 389 "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", |
| 401 "src/gpu/gl/GrGLDefaultInterface_none.cpp", | 390 "src/gpu/gl/GrGLDefaultInterface_none.cpp", |
| 402 ] | 391 ] |
| 403 | 392 |
| 393 libs = [] |
| 394 |
| 404 if (is_win) { | 395 if (is_win) { |
| 405 sources += [ | 396 sources += [ |
| 406 "src/ports/SkDebug_win.cpp", | 397 "src/ports/SkDebug_win.cpp", |
| 407 "src/ports/SkFontHost_win.cpp", | 398 "src/ports/SkFontHost_win.cpp", |
| 408 "src/ports/SkFontMgr_win_dw.cpp", | 399 "src/ports/SkFontMgr_win_dw.cpp", |
| 409 "src/ports/SkFontMgr_win_dw_factory.cpp", | 400 "src/ports/SkFontMgr_win_dw_factory.cpp", |
| 410 "src/ports/SkImageEncoder_WIC.cpp", | 401 "src/ports/SkImageEncoder_WIC.cpp", |
| 411 "src/ports/SkImageGeneratorWIC.cpp", | 402 "src/ports/SkImageGeneratorWIC.cpp", |
| 412 "src/ports/SkOSFile_win.cpp", | 403 "src/ports/SkOSFile_win.cpp", |
| 413 "src/ports/SkScalerContext_win_dw.cpp", | 404 "src/ports/SkScalerContext_win_dw.cpp", |
| 414 "src/ports/SkTLS_win.cpp", | 405 "src/ports/SkTLS_win.cpp", |
| 415 "src/ports/SkTypeface_win_dw.cpp", | 406 "src/ports/SkTypeface_win_dw.cpp", |
| 416 "src/xps/SkDocument_XPS.cpp", | 407 "src/xps/SkDocument_XPS.cpp", |
| 417 ] | 408 ] |
| 418 sources -= [ "src/utils/SkThreadUtils_pthread.cpp" ] | 409 sources -= [ "src/utils/SkThreadUtils_pthread.cpp" ] |
| 419 } else { | 410 } else { |
| 420 sources += [ | 411 sources += [ |
| 421 "src/ports/SkDebug_stdio.cpp", | |
| 422 "src/ports/SkOSFile_posix.cpp", | 412 "src/ports/SkOSFile_posix.cpp", |
| 423 "src/ports/SkTLS_pthread.cpp", | 413 "src/ports/SkTLS_pthread.cpp", |
| 424 "src/xps/SkDocument_XPS_None.cpp", | 414 "src/xps/SkDocument_XPS_None.cpp", |
| 425 ] | 415 ] |
| 426 } | 416 } |
| 427 | 417 |
| 418 if (is_android) { |
| 419 deps += [ |
| 420 "//third_party/cpu-features", |
| 421 "//third_party/expat", |
| 422 "//third_party/freetype2", |
| 423 ] |
| 424 sources += [ |
| 425 "src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp", |
| 426 "src/ports/SkDebug_android.cpp", |
| 427 "src/ports/SkFontHost_FreeType.cpp", |
| 428 "src/ports/SkFontHost_FreeType_common.cpp", |
| 429 "src/ports/SkFontMgr_android.cpp", |
| 430 "src/ports/SkFontMgr_android_factory.cpp", |
| 431 "src/ports/SkFontMgr_android_parser.cpp", |
| 432 ] |
| 433 libs += [ |
| 434 "EGL", |
| 435 "GLESv2", |
| 436 "log", |
| 437 ] |
| 438 } |
| 439 |
| 428 if (is_linux) { | 440 if (is_linux) { |
| 429 deps += [ | 441 deps += [ |
| 430 "third_party:fontconfig", | 442 "third_party:fontconfig", |
| 431 "third_party:freetype2", | 443 "//third_party/freetype2", |
| 432 ] | 444 ] |
| 433 libs += [ | 445 libs += [ |
| 434 "GL", | 446 "GL", |
| 435 "GLU", | 447 "GLU", |
| 436 "X11", | 448 "X11", |
| 437 ] | 449 ] |
| 438 sources += [ | 450 sources += [ |
| 439 "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp", | 451 "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp", |
| 452 "src/ports/SkDebug_stdio.cpp", |
| 440 "src/ports/SkFontConfigInterface_direct.cpp", | 453 "src/ports/SkFontConfigInterface_direct.cpp", |
| 441 "src/ports/SkFontConfigInterface_direct_factory.cpp", | 454 "src/ports/SkFontConfigInterface_direct_factory.cpp", |
| 442 "src/ports/SkFontHost_FreeType.cpp", | 455 "src/ports/SkFontHost_FreeType.cpp", |
| 443 "src/ports/SkFontHost_FreeType_common.cpp", | 456 "src/ports/SkFontHost_FreeType_common.cpp", |
| 444 "src/ports/SkFontMgr_FontConfigInterface.cpp", | 457 "src/ports/SkFontMgr_FontConfigInterface.cpp", |
| 445 "src/ports/SkFontMgr_fontconfig.cpp", | 458 "src/ports/SkFontMgr_fontconfig.cpp", |
| 446 "src/ports/SkFontMgr_fontconfig_factory.cpp", | 459 "src/ports/SkFontMgr_fontconfig_factory.cpp", |
| 447 ] | 460 ] |
| 448 } | 461 } |
| 449 | 462 |
| 450 if (is_mac) { | 463 if (is_mac) { |
| 451 sources += [ | 464 sources += [ |
| 452 "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp", | 465 "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp", |
| 466 "src/ports/SkDebug_stdio.cpp", |
| 453 "src/ports/SkFontHost_mac.cpp", | 467 "src/ports/SkFontHost_mac.cpp", |
| 454 "src/ports/SkImageEncoder_CG.cpp", | 468 "src/ports/SkImageEncoder_CG.cpp", |
| 455 "src/ports/SkImageGeneratorCG.cpp", | 469 "src/ports/SkImageGeneratorCG.cpp", |
| 456 ] | 470 ] |
| 457 libs += [ | 471 libs += [ |
| 458 "ApplicationServices.framework", | 472 "ApplicationServices.framework", |
| 459 "OpenGL.framework", | 473 "OpenGL.framework", |
| 460 ] | 474 ] |
| 461 } | 475 } |
| 462 | 476 |
| 463 if (is_fuchsia) { | 477 if (is_fuchsia) { |
| 464 sources += [ | 478 sources += [ |
| 465 "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", | 479 "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", |
| 480 "src/ports/SkDebug_stdio.cpp", |
| 466 "src/ports/SkFontMgr_empty_factory.cpp", | 481 "src/ports/SkFontMgr_empty_factory.cpp", |
| 467 ] | 482 ] |
| 468 } | 483 } |
| 469 } | 484 } |
| 470 | 485 |
| 471 skia_h_headers = exec_script("gyp/find.py", | 486 skia_h_headers = exec_script("gyp/find.py", |
| 472 [ "*.h" ] + rebase_path(skia_public_includes), | 487 [ "*.h" ] + rebase_path(skia_public_includes), |
| 473 "list lines", | 488 "list lines", |
| 474 []) - | 489 []) - |
| 475 [ | 490 [ |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 "tools/gpu/gl/debug/GrBufferObj.cpp", | 555 "tools/gpu/gl/debug/GrBufferObj.cpp", |
| 541 "tools/gpu/gl/debug/GrFrameBufferObj.cpp", | 556 "tools/gpu/gl/debug/GrFrameBufferObj.cpp", |
| 542 "tools/gpu/gl/debug/GrProgramObj.cpp", | 557 "tools/gpu/gl/debug/GrProgramObj.cpp", |
| 543 "tools/gpu/gl/debug/GrShaderObj.cpp", | 558 "tools/gpu/gl/debug/GrShaderObj.cpp", |
| 544 "tools/gpu/gl/debug/GrTextureObj.cpp", | 559 "tools/gpu/gl/debug/GrTextureObj.cpp", |
| 545 "tools/gpu/gl/debug/GrTextureUnitObj.cpp", | 560 "tools/gpu/gl/debug/GrTextureUnitObj.cpp", |
| 546 "tools/gpu/gl/null/NullGLTestContext.cpp", | 561 "tools/gpu/gl/null/NullGLTestContext.cpp", |
| 547 ] | 562 ] |
| 548 libs = [] | 563 libs = [] |
| 549 | 564 |
| 550 if (is_linux) { | 565 if (is_android) { |
| 566 sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ] |
| 567 } else if (is_linux) { |
| 551 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] | 568 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] |
| 552 } else if (is_mac) { | 569 } else if (is_mac) { |
| 553 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] | 570 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] |
| 554 } | 571 } |
| 555 } | 572 } |
| 556 | 573 |
| 557 test_lib("flags") { | 574 test_lib("flags") { |
| 558 public_include_dirs = [ "tools/flags" ] | 575 public_include_dirs = [ "tools/flags" ] |
| 559 sources = [ | 576 sources = [ |
| 560 "tools/flags/SkCommandLineFlags.cpp", | 577 "tools/flags/SkCommandLineFlags.cpp", |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 "tools/SkShaper_harfbuzz.cpp", | 766 "tools/SkShaper_harfbuzz.cpp", |
| 750 "tools/using_skia_and_harfbuzz.cpp", | 767 "tools/using_skia_and_harfbuzz.cpp", |
| 751 ] | 768 ] |
| 752 deps = [ | 769 deps = [ |
| 753 ":skia", | 770 ":skia", |
| 754 "//third_party/harfbuzz", | 771 "//third_party/harfbuzz", |
| 755 ] | 772 ] |
| 756 testonly = true | 773 testonly = true |
| 757 } | 774 } |
| 758 } | 775 } |
| OLD | NEW |