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 import("gn/shared_sources.gni") | 6 import("gn/shared_sources.gni") |
7 | 7 |
8 if (!defined(is_skia_standalone)) { | 8 if (!defined(is_skia_standalone)) { |
9 is_skia_standalone = false | 9 is_skia_standalone = false |
10 } | 10 } |
(...skipping 10 matching lines...) Expand all Loading... |
21 skia_use_sfntly = !is_fuchsia | 21 skia_use_sfntly = !is_fuchsia |
22 skia_use_vulkan = is_android && defined(ndk_api) && ndk_api >= 24 | 22 skia_use_vulkan = is_android && defined(ndk_api) && ndk_api >= 24 |
23 skia_use_zlib = true | 23 skia_use_zlib = true |
24 | 24 |
25 skia_enable_android_framework_defines = false | 25 skia_enable_android_framework_defines = false |
26 skia_enable_gpu = true | 26 skia_enable_gpu = true |
27 skia_enable_tools = is_skia_standalone | 27 skia_enable_tools = is_skia_standalone |
28 skia_enable_vulkan_debug_layers = is_skia_standalone && is_debug | 28 skia_enable_vulkan_debug_layers = is_skia_standalone && is_debug |
29 } | 29 } |
30 | 30 |
31 # Our tools require static linking (they use non-exported symbols) and GPU suppo
rt (just lazy). | 31 # Our tools require static linking (they use non-exported symbols). |
32 skia_enable_tools = skia_enable_tools && skia_enable_gpu && !is_component_build | 32 skia_enable_tools = skia_enable_tools && !is_component_build |
33 | 33 |
34 fontmgr_android_enabled = skia_use_expat && skia_use_freetype | 34 fontmgr_android_enabled = skia_use_expat && skia_use_freetype |
35 | 35 |
36 skia_public_includes = [ | 36 skia_public_includes = [ |
37 "include/android", | 37 "include/android", |
38 "include/c", | 38 "include/c", |
39 "include/codec", | 39 "include/codec", |
40 "include/config", | 40 "include/config", |
41 "include/core", | 41 "include/core", |
42 "include/effects", | 42 "include/effects", |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 | 618 |
619 if (!defined(deps)) { | 619 if (!defined(deps)) { |
620 deps = [] | 620 deps = [] |
621 } | 621 } |
622 deps += [ ":skia" ] | 622 deps += [ ":skia" ] |
623 testonly = true | 623 testonly = true |
624 } | 624 } |
625 } | 625 } |
626 | 626 |
627 test_lib("gpu_tool_utils") { | 627 test_lib("gpu_tool_utils") { |
628 public_defines = [] | 628 public_include_dirs = [] |
629 public_include_dirs = [ "tools/gpu" ] | 629 if (skia_enable_gpu) { |
630 sources = [ | 630 public_defines = [] |
631 "tools/gpu/GrContextFactory.cpp", | 631 public_include_dirs += [ "tools/gpu" ] |
632 "tools/gpu/GrTest.cpp", | 632 sources = [ |
633 "tools/gpu/TestContext.cpp", | 633 "tools/gpu/GrContextFactory.cpp", |
634 "tools/gpu/gl/GLTestContext.cpp", | 634 "tools/gpu/GrTest.cpp", |
635 "tools/gpu/gl/debug/DebugGLTestContext.cpp", | 635 "tools/gpu/TestContext.cpp", |
636 "tools/gpu/gl/debug/GrBufferObj.cpp", | 636 "tools/gpu/gl/GLTestContext.cpp", |
637 "tools/gpu/gl/debug/GrFrameBufferObj.cpp", | 637 "tools/gpu/gl/debug/DebugGLTestContext.cpp", |
638 "tools/gpu/gl/debug/GrProgramObj.cpp", | 638 "tools/gpu/gl/debug/GrBufferObj.cpp", |
639 "tools/gpu/gl/debug/GrShaderObj.cpp", | 639 "tools/gpu/gl/debug/GrFrameBufferObj.cpp", |
640 "tools/gpu/gl/debug/GrTextureObj.cpp", | 640 "tools/gpu/gl/debug/GrProgramObj.cpp", |
641 "tools/gpu/gl/debug/GrTextureUnitObj.cpp", | 641 "tools/gpu/gl/debug/GrShaderObj.cpp", |
642 "tools/gpu/gl/null/NullGLTestContext.cpp", | 642 "tools/gpu/gl/debug/GrTextureObj.cpp", |
643 ] | 643 "tools/gpu/gl/debug/GrTextureUnitObj.cpp", |
644 libs = [] | 644 "tools/gpu/gl/null/NullGLTestContext.cpp", |
| 645 ] |
| 646 libs = [] |
645 | 647 |
646 if (is_android) { | 648 if (is_android) { |
647 sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ] | 649 sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ] |
648 } else if (is_linux) { | 650 } else if (is_linux) { |
649 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] | 651 sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] |
650 } else if (is_mac) { | 652 } else if (is_mac) { |
651 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] | 653 sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] |
652 } | 654 } |
653 | 655 |
654 if (skia_use_vulkan) { | 656 if (skia_use_vulkan) { |
655 sources += [ "tools/gpu/vk/VkTestContext.cpp" ] | 657 sources += [ "tools/gpu/vk/VkTestContext.cpp" ] |
656 } | 658 } |
657 if (skia_use_mesa) { | 659 if (skia_use_mesa) { |
658 public_defines += [ "SK_MESA" ] | 660 public_defines += [ "SK_MESA" ] |
659 sources += [ "tools/gpu/gl/mesa/GLTestContext_mesa.cpp" ] | 661 sources += [ "tools/gpu/gl/mesa/GLTestContext_mesa.cpp" ] |
660 libs += [ "OSMesa" ] | 662 libs += [ "OSMesa" ] |
| 663 } |
661 } | 664 } |
662 } | 665 } |
663 | 666 |
664 test_lib("flags") { | 667 test_lib("flags") { |
665 public_include_dirs = [ "tools/flags" ] | 668 public_include_dirs = [ "tools/flags" ] |
666 sources = [ | 669 sources = [ |
667 "tools/flags/SkCommandLineFlags.cpp", | 670 "tools/flags/SkCommandLineFlags.cpp", |
668 ] | 671 ] |
669 } | 672 } |
670 test_lib("common_flags") { | 673 test_lib("common_flags") { |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 ":flags", | 860 ":flags", |
858 ":gm", | 861 ":gm", |
859 ":gpu_tool_utils", | 862 ":gpu_tool_utils", |
860 ":skia", | 863 ":skia", |
861 ":tool_utils", | 864 ":tool_utils", |
862 "//third_party/jsoncpp", | 865 "//third_party/jsoncpp", |
863 ] | 866 ] |
864 testonly = true | 867 testonly = true |
865 } | 868 } |
866 | 869 |
867 executable("skpbench") { | 870 if (skia_enable_gpu) { |
868 sources = [ | 871 executable("skpbench") { |
869 "tools/skpbench/skpbench.cpp", | 872 sources = [ |
870 ] | 873 "tools/skpbench/skpbench.cpp", |
871 deps = [ | 874 ] |
872 ":flags", | 875 deps = [ |
873 ":gpu_tool_utils", | 876 ":flags", |
874 ":skia", | 877 ":gpu_tool_utils", |
875 ":tool_utils", | 878 ":skia", |
876 ] | 879 ":tool_utils", |
877 testonly = true | 880 ] |
| 881 testonly = true |
| 882 } |
878 } | 883 } |
879 | 884 |
880 if (current_cpu != "mipsel") { # Clang 3.8 crashes while compiling hb-icu.cc
for mipsel. | 885 if (current_cpu != "mipsel") { # Clang 3.8 crashes while compiling hb-icu.cc
for mipsel. |
881 executable("sktexttopdf-hb") { | 886 executable("sktexttopdf-hb") { |
882 sources = [ | 887 sources = [ |
883 "tools/SkShaper_harfbuzz.cpp", | 888 "tools/SkShaper_harfbuzz.cpp", |
884 "tools/using_skia_and_harfbuzz.cpp", | 889 "tools/using_skia_and_harfbuzz.cpp", |
885 ] | 890 ] |
886 deps = [ | 891 deps = [ |
887 ":skia", | 892 ":skia", |
(...skipping 18 matching lines...) Expand all Loading... |
906 "tools/get_images_from_skps.cpp", | 911 "tools/get_images_from_skps.cpp", |
907 ] | 912 ] |
908 deps = [ | 913 deps = [ |
909 ":flags", | 914 ":flags", |
910 ":skia", | 915 ":skia", |
911 "//third_party/jsoncpp", | 916 "//third_party/jsoncpp", |
912 ] | 917 ] |
913 testonly = true | 918 testonly = true |
914 } | 919 } |
915 } | 920 } |
OLD | NEW |