mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1 | # Copyright 2016 Google Inc. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
| 5 | |
Brian Osman | f2c9014 | 2017-07-13 15:50:03 -0400 | [diff] [blame] | 6 | import("gn/flutter_defines.gni") |
Mike Reed | 025f783 | 2018-11-12 09:27:05 -0500 | [diff] [blame] | 7 | import("gn/fuchsia_defines.gni") |
mikejurka | 8c24f4f | 2016-09-12 16:51:58 -0700 | [diff] [blame] | 8 | import("gn/shared_sources.gni") |
Hal Canary | 32498f0 | 2019-02-04 15:36:31 -0500 | [diff] [blame] | 9 | import("gn/skia.gni") |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 10 | |
Forrest Reiling | 30229ac | 2017-04-17 13:36:39 -0700 | [diff] [blame] | 11 | if (is_fuchsia) { |
Chinmay Garde | 8982076 | 2019-05-06 16:44:06 -0700 | [diff] [blame] | 12 | import("//build/fuchsia/sdk.gni") |
Forrest Reiling | 30229ac | 2017-04-17 13:36:39 -0700 | [diff] [blame] | 13 | import("//build/vulkan/config.gni") |
| 14 | } |
| 15 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 16 | declare_args() { |
Mike Klein | 26a6049 | 2018-10-15 10:38:25 -0400 | [diff] [blame] | 17 | skia_enable_flutter_defines = false |
| 18 | } |
| 19 | |
| 20 | declare_args() { |
Mike Klein | c168a3a | 2016-11-14 14:53:13 +0000 | [diff] [blame] | 21 | skia_use_angle = false |
Kevin Lubick | 4a24e10 | 2017-03-29 11:19:01 -0400 | [diff] [blame] | 22 | skia_use_egl = false |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 23 | skia_use_expat = true |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 24 | skia_use_fontconfig = is_linux |
Leon Scroggins III | 85e22fc | 2018-11-28 08:58:47 -0500 | [diff] [blame] | 25 | skia_use_fonthost_mac = is_mac |
mtklein | cdedd0e | 2016-09-12 15:15:44 -0700 | [diff] [blame] | 26 | skia_use_freetype = is_android || is_fuchsia || is_linux |
Leon Scroggins III | c41a5f5 | 2018-11-15 15:54:59 -0500 | [diff] [blame] | 27 | skia_use_fixed_gamma_text = is_android |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 28 | skia_use_libjpeg_turbo = true |
| 29 | skia_use_libpng = true |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 30 | skia_use_libwebp = !is_fuchsia |
Mike Klein | fae86b7 | 2018-01-08 15:49:09 -0500 | [diff] [blame] | 31 | skia_use_lua = is_skia_dev_build && !is_ios |
Mike Klein | f9ae670 | 2018-06-20 14:05:05 -0400 | [diff] [blame] | 32 | skia_use_opencl = false |
Mike Klein | 10d665d | 2016-11-01 11:46:10 -0400 | [diff] [blame] | 33 | skia_use_piex = !is_win |
Leon Scroggins III | e93ec68 | 2018-10-26 09:25:51 -0400 | [diff] [blame] | 34 | skia_use_wuffs = false |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 35 | skia_use_zlib = true |
Greg Daniel | e5ddff5 | 2017-07-05 16:49:36 -0400 | [diff] [blame] | 36 | skia_use_metal = false |
Mike Klein | 36f182f | 2017-10-20 12:33:53 -0400 | [diff] [blame] | 37 | skia_use_libheif = is_skia_dev_build |
Chinmay Garde | d92d035 | 2018-09-17 10:23:28 -0700 | [diff] [blame] | 38 | skia_use_x11 = is_linux |
Leon Scroggins III | ee0e5d0 | 2019-02-27 10:59:11 -0500 | [diff] [blame] | 39 | skia_use_xps = true |
mtklein | 1bd72ba | 2016-09-16 07:45:52 -0700 | [diff] [blame] | 40 | |
Mike Klein | 7d92103 | 2017-01-05 12:20:41 -0500 | [diff] [blame] | 41 | skia_android_serial = "" |
Kevin Lubick | 93faa67 | 2018-10-10 15:54:53 -0400 | [diff] [blame] | 42 | skia_enable_ccpr = true |
Kevin Lubick | ca7c297 | 2018-10-17 13:52:24 +0000 | [diff] [blame] | 43 | skia_enable_nvpr = !skia_enable_flutter_defines |
Brian Osman | 3f375d0 | 2016-12-28 11:19:22 -0500 | [diff] [blame] | 44 | skia_enable_discrete_gpu = true |
Kevin Lubick | 134be1d | 2018-10-30 15:05:04 -0400 | [diff] [blame] | 45 | skia_enable_nima = false |
Hal Canary | 43fb7a0 | 2016-12-30 13:09:03 -0500 | [diff] [blame] | 46 | skia_enable_pdf = true |
Ethan Nicholas | a6ae1f7 | 2017-03-16 09:56:54 -0400 | [diff] [blame] | 47 | skia_enable_spirv_validation = is_skia_dev_build && is_debug |
Kevin Lubick | 32dfdbe | 2018-10-18 09:47:01 -0400 | [diff] [blame] | 48 | skia_enable_skpicture = true |
Mike Klein | 3669a82 | 2017-03-03 10:55:02 -0500 | [diff] [blame] | 49 | skia_enable_vulkan_debug_layers = is_skia_dev_build && is_debug |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 50 | skia_qt_path = getenv("QT_PATH") |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 51 | skia_compile_processors = false |
Adrienne Walker | 1df7cd8 | 2018-04-18 13:46:25 -0700 | [diff] [blame] | 52 | skia_generate_workarounds = false |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 53 | skia_lex = false |
Mike Klein | c55a6cb | 2017-06-28 13:21:47 -0400 | [diff] [blame] | 54 | |
Hal Canary | 2331c82 | 2018-02-01 14:06:13 -0500 | [diff] [blame] | 55 | skia_skqp_global_error_tolerance = 0 |
Ethan Nicholas | 26a9aad | 2018-03-27 14:10:52 -0400 | [diff] [blame] | 56 | |
| 57 | skia_llvm_path = "" |
| 58 | skia_llvm_lib = "LLVM" |
Hal Canary | fd9bcab | 2018-04-24 11:47:23 -0400 | [diff] [blame] | 59 | |
| 60 | skia_tools_require_resources = false |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 61 | } |
Brian Salomon | 23d73ea | 2016-10-27 13:31:37 -0400 | [diff] [blame] | 62 | declare_args() { |
Matt Sarett | 189491c | 2017-03-20 18:09:30 -0400 | [diff] [blame] | 63 | skia_use_dng_sdk = !is_fuchsia && skia_use_libjpeg_turbo && skia_use_zlib |
Mike Klein | 10d665d | 2016-11-01 11:46:10 -0400 | [diff] [blame] | 64 | skia_use_sfntly = skia_use_icu |
Brian Salomon | cbcb0a1 | 2017-11-19 13:20:13 -0500 | [diff] [blame] | 65 | skia_enable_atlas_text = is_skia_dev_build && skia_enable_gpu |
Leon Scroggins III | be85c19 | 2018-11-13 13:50:12 -0500 | [diff] [blame] | 66 | skia_enable_fontmgr_empty = false |
Kevin Lubick | ddd0a33 | 2018-12-12 10:35:13 -0500 | [diff] [blame] | 67 | skia_enable_fontmgr_custom = |
| 68 | is_linux && skia_use_freetype && !skia_use_fontconfig |
Leon Scroggins III | be85c19 | 2018-11-13 13:50:12 -0500 | [diff] [blame] | 69 | skia_enable_fontmgr_custom_empty = is_fuchsia && skia_use_freetype |
| 70 | skia_enable_fontmgr_android = skia_use_expat && skia_use_freetype |
Sergey Ulanov | f3babcd | 2018-11-30 17:42:00 -0800 | [diff] [blame] | 71 | skia_enable_fontmgr_fuchsia = is_fuchsia |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 72 | skia_enable_fontmgr_win = is_win |
| 73 | skia_enable_fontmgr_win_gdi = is_win |
Mike Klein | 10d665d | 2016-11-01 11:46:10 -0400 | [diff] [blame] | 74 | |
Kevin Lubick | 27ba703 | 2019-03-21 08:13:54 -0400 | [diff] [blame] | 75 | if (is_mac) { |
| 76 | skia_gl_standard = "gl" |
| 77 | } else if (is_ios) { |
| 78 | skia_gl_standard = "gles" |
| 79 | } else { |
| 80 | skia_gl_standard = "" |
| 81 | } |
| 82 | |
Mike Klein | 4d598a3 | 2016-10-31 13:44:49 -0400 | [diff] [blame] | 83 | if (is_android) { |
| 84 | skia_use_vulkan = defined(ndk_api) && ndk_api >= 24 |
Forrest Reiling | 30229ac | 2017-04-17 13:36:39 -0700 | [diff] [blame] | 85 | } else if (is_fuchsia) { |
| 86 | skia_use_vulkan = fuchsia_use_vulkan |
Mike Klein | 4d598a3 | 2016-10-31 13:44:49 -0400 | [diff] [blame] | 87 | } else { |
Mike Klein | 98dea7b | 2019-01-15 11:26:43 -0500 | [diff] [blame] | 88 | skia_use_vulkan = defined(skia_moltenvk_path) && skia_moltenvk_path != "" |
Mike Klein | 4d598a3 | 2016-10-31 13:44:49 -0400 | [diff] [blame] | 89 | } |
Jim Van Verth | 4e50297 | 2017-12-07 15:16:10 -0500 | [diff] [blame] | 90 | |
| 91 | if (is_ios) { |
| 92 | skia_ios_identity = ".*Google.*" |
| 93 | skia_ios_profile = "Google Development" |
| 94 | } |
Brian Salomon | 23d73ea | 2016-10-27 13:31:37 -0400 | [diff] [blame] | 95 | } |
Brian Salomon | 789e25e | 2016-09-30 13:41:03 -0400 | [diff] [blame] | 96 | |
Adam Barth | 54ef74a | 2017-10-13 10:59:38 -0700 | [diff] [blame] | 97 | if (defined(skia_settings)) { |
| 98 | import(skia_settings) |
| 99 | } |
| 100 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 101 | # Skia public API, generally provided by :skia. |
| 102 | config("skia_public") { |
Mike Klein | 9e25bb9 | 2019-04-29 09:46:36 -0500 | [diff] [blame] | 103 | include_dirs = [ "." ] |
| 104 | |
Mike Klein | ae7e671 | 2016-10-11 17:49:33 -0400 | [diff] [blame] | 105 | defines = [] |
| 106 | if (is_component_build) { |
| 107 | defines += [ "SKIA_DLL" ] |
| 108 | } |
Mike Klein | c4cbd74 | 2016-09-26 21:37:09 -0400 | [diff] [blame] | 109 | if (is_fuchsia || is_linux) { |
Mike Klein | f0a5369 | 2019-04-24 11:42:40 -0500 | [diff] [blame] | 110 | defines += [ "SK_R32_SHIFT=16" ] |
jcgregorio | 5561e3d | 2016-08-25 09:25:11 -0700 | [diff] [blame] | 111 | } |
Brian Osman | f2c9014 | 2017-07-13 15:50:03 -0400 | [diff] [blame] | 112 | if (skia_enable_flutter_defines) { |
| 113 | defines += flutter_defines |
| 114 | } |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 115 | if (!skia_enable_gpu) { |
| 116 | defines += [ "SK_SUPPORT_GPU=0" ] |
| 117 | } |
Brian Salomon | cbcb0a1 | 2017-11-19 13:20:13 -0500 | [diff] [blame] | 118 | if (skia_enable_atlas_text) { |
| 119 | defines += [ "SK_SUPPORT_ATLAS_TEXT=1" ] |
| 120 | } |
Mike Reed | 025f783 | 2018-11-12 09:27:05 -0500 | [diff] [blame] | 121 | if (is_fuchsia) { |
| 122 | defines += fuchsia_defines |
| 123 | } |
Kevin Lubick | 27ba703 | 2019-03-21 08:13:54 -0400 | [diff] [blame] | 124 | if (skia_gl_standard == "gles") { |
| 125 | defines += [ "SK_ASSUME_GL_ES=1" ] |
| 126 | } else if (skia_gl_standard == "gl") { |
| 127 | defines += [ "SK_ASSUME_GL=1" ] |
Kevin Lubick | 3902628 | 2019-03-28 12:46:40 -0400 | [diff] [blame] | 128 | } else if (skia_gl_standard == "webgl") { |
| 129 | defines += [ "SK_ASSUME_WEBGL=1" ] |
Kevin Lubick | 27ba703 | 2019-03-21 08:13:54 -0400 | [diff] [blame] | 130 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 131 | } |
| 132 | |
| 133 | # Skia internal APIs, used by Skia itself and a few test tools. |
| 134 | config("skia_private") { |
| 135 | visibility = [ ":*" ] |
| 136 | |
Mike Reed | a9e241d | 2017-05-03 10:52:00 -0400 | [diff] [blame] | 137 | defines = [ "SK_GAMMA_APPLY_TO_A8" ] |
Leon Scroggins III | c41a5f5 | 2018-11-15 15:54:59 -0500 | [diff] [blame] | 138 | if (skia_use_fixed_gamma_text) { |
mtklein | b37c034 | 2016-09-09 11:07:45 -0700 | [diff] [blame] | 139 | defines += [ |
| 140 | "SK_GAMMA_EXPONENT=1.4", |
| 141 | "SK_GAMMA_CONTRAST=0.0", |
| 142 | ] |
| 143 | } |
Mike Klein | b45d862 | 2019-04-24 14:04:01 -0500 | [diff] [blame] | 144 | if (is_skia_dev_build) { |
| 145 | defines += [ |
| 146 | "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1", |
| 147 | "GR_TEST_UTILS=1", |
| 148 | ] |
mtklein | 88a7ac0 | 2016-09-14 11:16:49 -0700 | [diff] [blame] | 149 | } |
Brian Salomon | 789e25e | 2016-09-30 13:41:03 -0400 | [diff] [blame] | 150 | libs = [] |
| 151 | lib_dirs = [] |
Brian Osman | 34755e2 | 2016-12-05 09:46:02 -0500 | [diff] [blame] | 152 | if (skia_use_angle) { |
| 153 | defines += [ "SK_ANGLE" ] |
| 154 | } |
Ethan Nicholas | 26a9aad | 2018-03-27 14:10:52 -0400 | [diff] [blame] | 155 | if (skia_llvm_path != "") { |
| 156 | defines += [ "SK_LLVM_AVAILABLE" ] |
| 157 | include_dirs += [ "$skia_llvm_path/include" ] |
| 158 | libs += [ skia_llvm_lib ] |
| 159 | lib_dirs += [ "$skia_llvm_path/lib/" ] |
| 160 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 161 | } |
| 162 | |
| 163 | # Any code that's linked into Skia-the-library should use this config via += skia_library_configs. |
| 164 | config("skia_library") { |
| 165 | visibility = [ ":*" ] |
Mike Klein | f5f4e81 | 2019-04-29 15:45:14 +0000 | [diff] [blame] | 166 | defines = [ "SKIA_IMPLEMENTATION=1" ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 167 | } |
| 168 | |
| 169 | skia_library_configs = [ |
| 170 | ":skia_public", |
| 171 | ":skia_private", |
| 172 | ":skia_library", |
| 173 | ] |
| 174 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 175 | # Use for CPU-specific Skia code that needs particular compiler flags. |
| 176 | template("opts") { |
Mike Klein | 6d1df6d | 2018-11-07 15:03:58 -0500 | [diff] [blame] | 177 | visibility = [ ":*" ] |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 178 | if (invoker.enabled) { |
| 179 | source_set(target_name) { |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 180 | check_includes = false |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 181 | forward_variables_from(invoker, "*") |
| 182 | configs += skia_library_configs |
| 183 | } |
| 184 | } else { |
| 185 | # If not enabled, a phony empty target that swallows all otherwise unused variables. |
| 186 | source_set(target_name) { |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 187 | check_includes = false |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 188 | forward_variables_from(invoker, |
| 189 | "*", |
| 190 | [ |
| 191 | "sources", |
| 192 | "cflags", |
| 193 | ]) |
| 194 | } |
| 195 | } |
anmittal | a7eaf2e | 2016-08-17 13:57:26 -0700 | [diff] [blame] | 196 | } |
| 197 | |
mtklein | 422310d | 2016-08-16 18:28:43 -0700 | [diff] [blame] | 198 | is_x86 = current_cpu == "x64" || current_cpu == "x86" |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 199 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 200 | opts("none") { |
| 201 | enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 202 | sources = skia_opts.none_sources |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 203 | cflags = [] |
| 204 | } |
| 205 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 206 | opts("armv7") { |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 207 | enabled = current_cpu == "arm" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 208 | sources = skia_opts.armv7_sources + skia_opts.neon_sources |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 209 | cflags = [] |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 210 | } |
| 211 | |
| 212 | opts("arm64") { |
| 213 | enabled = current_cpu == "arm64" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 214 | sources = skia_opts.arm64_sources |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 215 | cflags = [] |
| 216 | } |
| 217 | |
| 218 | opts("crc32") { |
| 219 | enabled = current_cpu == "arm64" |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 220 | sources = skia_opts.crc32_sources |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 221 | cflags = [ "-march=armv8-a+crc" ] |
| 222 | } |
| 223 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 224 | opts("sse2") { |
| 225 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 226 | sources = skia_opts.sse2_sources |
Mike Klein | c722f79 | 2017-07-31 11:57:21 -0400 | [diff] [blame] | 227 | if (!is_clang && is_win) { |
Mike Klein | d8765e3 | 2016-10-19 13:39:13 -0400 | [diff] [blame] | 228 | defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2" ] |
| 229 | } else { |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 230 | cflags = [ "-msse2" ] |
| 231 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 232 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 233 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 234 | opts("ssse3") { |
| 235 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 236 | sources = skia_opts.ssse3_sources |
Mike Klein | c722f79 | 2017-07-31 11:57:21 -0400 | [diff] [blame] | 237 | if (!is_clang && is_win) { |
Mike Klein | d8765e3 | 2016-10-19 13:39:13 -0400 | [diff] [blame] | 238 | defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSSE3" ] |
| 239 | } else { |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 240 | cflags = [ "-mssse3" ] |
| 241 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 242 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 243 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 244 | opts("sse41") { |
| 245 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 246 | sources = skia_opts.sse41_sources |
Mike Klein | c722f79 | 2017-07-31 11:57:21 -0400 | [diff] [blame] | 247 | if (!is_clang && is_win) { |
Mike Klein | d8765e3 | 2016-10-19 13:39:13 -0400 | [diff] [blame] | 248 | defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE41" ] |
| 249 | } else { |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 250 | cflags = [ "-msse4.1" ] |
| 251 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 252 | } |
mtklein | 4e97607 | 2016-08-08 09:06:27 -0700 | [diff] [blame] | 253 | |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 254 | opts("sse42") { |
| 255 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 256 | sources = skia_opts.sse42_sources |
Mike Klein | c722f79 | 2017-07-31 11:57:21 -0400 | [diff] [blame] | 257 | if (!is_clang && is_win) { |
Mike Klein | d8765e3 | 2016-10-19 13:39:13 -0400 | [diff] [blame] | 258 | defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE42" ] |
| 259 | } else { |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 260 | cflags = [ "-msse4.2" ] |
| 261 | } |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 262 | } |
| 263 | |
| 264 | opts("avx") { |
| 265 | enabled = is_x86 |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 266 | sources = skia_opts.avx_sources |
Mike Klein | 4d4b3aa | 2018-03-21 13:07:35 -0400 | [diff] [blame] | 267 | if (is_win) { |
Mike Klein | 17b6e48 | 2016-11-18 22:11:41 +0000 | [diff] [blame] | 268 | cflags = [ "/arch:AVX" ] |
Mike Klein | 3eb7121 | 2016-10-11 17:08:53 -0400 | [diff] [blame] | 269 | } else { |
| 270 | cflags = [ "-mavx" ] |
| 271 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 272 | } |
| 273 | |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 274 | opts("hsw") { |
| 275 | enabled = is_x86 |
| 276 | sources = skia_opts.hsw_sources |
Mike Klein | 4d4b3aa | 2018-03-21 13:07:35 -0400 | [diff] [blame] | 277 | if (is_win) { |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 278 | cflags = [ "/arch:AVX2" ] |
| 279 | } else { |
Mike Klein | e87c486 | 2018-03-23 00:13:58 +0000 | [diff] [blame] | 280 | cflags = [ "-march=haswell" ] |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 281 | } |
| 282 | |
| 283 | # Oddly, clang-cl doesn't recognize this as a valid flag. |
| 284 | # If it ever does, it'd nice to move this up with -mavx2 and co. |
| 285 | if (is_clang && !is_win) { |
| 286 | # This flag lets Clang generate FMAs when it sees a mul-then-add. It's optional, |
| 287 | # but nice to have, generating slightly better code for paths without explicit FMAs. |
| 288 | cflags += [ "-ffp-contract=fast" ] |
| 289 | } |
| 290 | } |
| 291 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 292 | # Any feature of Skia that requires third-party code should be optional and use this template. |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 293 | template("optional") { |
Mike Klein | 6d1df6d | 2018-11-07 15:03:58 -0500 | [diff] [blame] | 294 | visibility = [ ":*" ] |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 295 | if (invoker.enabled) { |
| 296 | config(target_name + "_public") { |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 297 | if (defined(invoker.public_defines)) { |
| 298 | defines = invoker.public_defines |
| 299 | } |
Chris Dalton | 3a67b8e | 2018-05-03 09:30:29 -0600 | [diff] [blame] | 300 | if (defined(invoker.public_configs)) { |
| 301 | configs = invoker.public_configs |
| 302 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 303 | } |
| 304 | source_set(target_name) { |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 305 | check_includes = false |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 306 | forward_variables_from(invoker, |
| 307 | "*", |
| 308 | [ |
| 309 | "public_defines", |
| 310 | "sources_when_disabled", |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 311 | "configs_to_remove", |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 312 | ]) |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 313 | all_dependent_configs = [ ":" + target_name + "_public" ] |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 314 | configs += skia_library_configs |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 315 | if (defined(invoker.configs_to_remove)) { |
| 316 | configs -= invoker.configs_to_remove |
| 317 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 318 | } |
| 319 | } else { |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 320 | source_set(target_name) { |
| 321 | forward_variables_from(invoker, |
| 322 | "*", |
| 323 | [ |
| 324 | "public_defines", |
Greg Daniel | 91dfa3b | 2018-05-22 13:25:15 -0400 | [diff] [blame] | 325 | "public_deps", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 326 | "deps", |
mtklein | 6ef6999 | 2016-09-14 06:12:09 -0700 | [diff] [blame] | 327 | "libs", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 328 | "sources", |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 329 | "sources_when_disabled", |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 330 | "configs_to_remove", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 331 | ]) |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 332 | if (defined(invoker.sources_when_disabled)) { |
| 333 | sources = invoker.sources_when_disabled |
| 334 | } |
| 335 | configs += skia_library_configs |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 336 | } |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 337 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 338 | } |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 339 | |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 340 | optional("fontmgr_android") { |
Leon Scroggins III | be85c19 | 2018-11-13 13:50:12 -0500 | [diff] [blame] | 341 | enabled = skia_enable_fontmgr_android |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 342 | |
| 343 | deps = [ |
Ben Wagner | fc49734 | 2017-02-24 11:15:26 -0500 | [diff] [blame] | 344 | ":typeface_freetype", |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 345 | "//third_party/expat", |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 346 | ] |
| 347 | sources = [ |
| 348 | "src/ports/SkFontMgr_android.cpp", |
| 349 | "src/ports/SkFontMgr_android_factory.cpp", |
| 350 | "src/ports/SkFontMgr_android_parser.cpp", |
| 351 | ] |
| 352 | } |
| 353 | |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 354 | optional("fontmgr_custom") { |
Leon Scroggins III | be85c19 | 2018-11-13 13:50:12 -0500 | [diff] [blame] | 355 | enabled = skia_enable_fontmgr_custom |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 356 | |
| 357 | deps = [ |
Ben Wagner | fc49734 | 2017-02-24 11:15:26 -0500 | [diff] [blame] | 358 | ":typeface_freetype", |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 359 | ] |
| 360 | sources = [ |
| 361 | "src/ports/SkFontMgr_custom.cpp", |
Ben Wagner | 8ab590f | 2017-02-08 17:29:33 -0500 | [diff] [blame] | 362 | "src/ports/SkFontMgr_custom.h", |
| 363 | "src/ports/SkFontMgr_custom_directory.cpp", |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 364 | "src/ports/SkFontMgr_custom_directory_factory.cpp", |
Ben Wagner | 8ab590f | 2017-02-08 17:29:33 -0500 | [diff] [blame] | 365 | "src/ports/SkFontMgr_custom_embedded.cpp", |
| 366 | "src/ports/SkFontMgr_custom_empty.cpp", |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 367 | ] |
| 368 | } |
| 369 | |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 370 | optional("fontmgr_custom_empty") { |
| 371 | enabled = skia_enable_fontmgr_custom_empty |
Kevin Lubick | ddd0a33 | 2018-12-12 10:35:13 -0500 | [diff] [blame] | 372 | |
| 373 | deps = [ |
| 374 | ":typeface_freetype", |
| 375 | ] |
| 376 | sources = [ |
| 377 | "src/ports/SkFontMgr_custom.cpp", |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 378 | "src/ports/SkFontMgr_custom_empty.cpp", |
| 379 | "src/ports/SkFontMgr_custom_empty_factory.cpp", |
Sergey Ulanov | f3babcd | 2018-11-30 17:42:00 -0800 | [diff] [blame] | 380 | ] |
| 381 | } |
| 382 | |
Hal Canary | ff2742e | 2018-01-30 11:35:47 -0500 | [diff] [blame] | 383 | optional("fontmgr_empty") { |
| 384 | enabled = skia_enable_fontmgr_empty |
| 385 | sources = [ |
| 386 | "src/ports/SkFontMgr_empty_factory.cpp", |
| 387 | ] |
| 388 | } |
| 389 | |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 390 | optional("fontmgr_fontconfig") { |
| 391 | enabled = skia_use_freetype && skia_use_fontconfig |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 392 | |
| 393 | deps = [ |
Ben Wagner | fc49734 | 2017-02-24 11:15:26 -0500 | [diff] [blame] | 394 | ":typeface_freetype", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 395 | "//third_party:fontconfig", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 396 | ] |
| 397 | sources = [ |
bungeman | 1ae0e01 | 2016-09-19 12:13:16 -0700 | [diff] [blame] | 398 | "src/ports/SkFontConfigInterface.cpp", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 399 | "src/ports/SkFontConfigInterface_direct.cpp", |
| 400 | "src/ports/SkFontConfigInterface_direct_factory.cpp", |
| 401 | "src/ports/SkFontMgr_FontConfigInterface.cpp", |
| 402 | "src/ports/SkFontMgr_fontconfig.cpp", |
| 403 | "src/ports/SkFontMgr_fontconfig_factory.cpp", |
| 404 | ] |
| 405 | } |
| 406 | |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 407 | optional("fontmgr_fuchsia") { |
| 408 | enabled = skia_enable_fontmgr_fuchsia |
| 409 | |
Chinmay Garde | 8982076 | 2019-05-06 16:44:06 -0700 | [diff] [blame] | 410 | deps = [] |
| 411 | |
| 412 | if (is_fuchsia && using_fuchsia_sdk) { |
| 413 | deps += [ "$fuchsia_sdk_root/fidl:fuchsia.fonts" ] |
| 414 | } else { |
| 415 | deps += [ "//sdk/fidl/fuchsia.fonts" ] |
| 416 | } |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 417 | sources = [ |
| 418 | "src/ports/SkFontMgr_fuchsia.cpp", |
| 419 | "src/ports/SkFontMgr_fuchsia.h", |
| 420 | ] |
| 421 | } |
| 422 | |
| 423 | optional("fontmgr_wasm") { |
Kevin Lubick | 0e3342c | 2019-04-16 13:31:25 -0400 | [diff] [blame] | 424 | enabled = !skia_enable_fontmgr_empty && target_cpu == "wasm" |
mtklein | cdedd0e | 2016-09-12 15:15:44 -0700 | [diff] [blame] | 425 | |
| 426 | deps = [ |
Ben Wagner | fc49734 | 2017-02-24 11:15:26 -0500 | [diff] [blame] | 427 | ":typeface_freetype", |
mtklein | cdedd0e | 2016-09-12 15:15:44 -0700 | [diff] [blame] | 428 | ] |
| 429 | sources = [ |
| 430 | "src/ports/SkFontMgr_custom.cpp", |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 431 | "src/ports/SkFontMgr_custom.h", |
| 432 | "src/ports/SkFontMgr_custom_embedded.cpp", |
| 433 | "src/ports/SkFontMgr_custom_embedded_factory.cpp", |
mtklein | cdedd0e | 2016-09-12 15:15:44 -0700 | [diff] [blame] | 434 | ] |
| 435 | } |
| 436 | |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 437 | optional("fontmgr_win") { |
| 438 | enabled = skia_enable_fontmgr_win |
| 439 | |
| 440 | sources = [ |
| 441 | "src/fonts/SkFontMgr_indirect.cpp", |
| 442 | "src/ports/SkFontMgr_win_dw.cpp", |
| 443 | "src/ports/SkFontMgr_win_dw_factory.cpp", |
| 444 | "src/ports/SkScalerContext_win_dw.cpp", |
| 445 | "src/ports/SkTypeface_win_dw.cpp", |
| 446 | ] |
| 447 | } |
| 448 | |
| 449 | optional("fontmgr_win_gdi") { |
| 450 | enabled = skia_enable_fontmgr_win_gdi |
| 451 | |
| 452 | sources = [ |
| 453 | "src/ports/SkFontHost_win.cpp", |
| 454 | ] |
| 455 | libs = [ "Gdi32.lib" ] |
| 456 | } |
| 457 | |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 458 | if (skia_lex) { |
Ethan Nicholas | ca82a92 | 2017-09-07 09:39:50 -0400 | [diff] [blame] | 459 | executable("sksllex") { |
| 460 | sources = [ |
| 461 | "src/sksl/lex/Main.cpp", |
| 462 | "src/sksl/lex/NFA.cpp", |
| 463 | "src/sksl/lex/RegexNode.cpp", |
| 464 | "src/sksl/lex/RegexParser.cpp", |
| 465 | ] |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 466 | include_dirs = [ "." ] |
Ethan Nicholas | ca82a92 | 2017-09-07 09:39:50 -0400 | [diff] [blame] | 467 | } |
| 468 | |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 469 | action("run_sksllex") { |
| 470 | script = "gn/run_sksllex.py" |
Ethan Nicholas | e148bf7 | 2017-10-06 14:22:22 -0400 | [diff] [blame] | 471 | deps = [ |
| 472 | ":sksllex(//gn/toolchain:$host_toolchain)", |
| 473 | ] |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 474 | sources = [ |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 475 | "src/sksl/lex/sksl.lex", |
| 476 | ] |
| 477 | |
| 478 | # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a |
| 479 | # path that starts with target_out_dir and then uses ".." to back up into the src dir. |
| 480 | outputs = [ |
| 481 | "$target_out_dir/" + |
| 482 | rebase_path("src/sksl/lex/SkSLLexer.h", target_out_dir), |
| 483 | # the script also modifies the corresponding .cpp file, but if we tell GN that it gets |
| 484 | # confused due to the same file being named by two different paths |
| 485 | ] |
| 486 | sksllex_path = "$root_out_dir/" |
| 487 | sksllex_path += "sksllex" |
| 488 | if (host_os == "win") { |
| 489 | sksllex_path += ".exe" |
| 490 | } |
| 491 | args = [ |
| 492 | rebase_path(sksllex_path), |
| 493 | rebase_path("bin/clang-format"), |
| 494 | rebase_path("src"), |
| 495 | ] |
| 496 | } |
| 497 | } else { |
| 498 | group("run_sksllex") { |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | if (skia_compile_processors) { |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 503 | executable("skslc") { |
| 504 | defines = [ "SKSL_STANDALONE" ] |
| 505 | sources = [ |
| 506 | "src/sksl/SkSLMain.cpp", |
| 507 | ] |
| 508 | sources += skia_sksl_sources |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 509 | include_dirs = [ "." ] |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 510 | deps = [ |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 511 | ":run_sksllex", |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 512 | "//third_party/spirv-tools", |
| 513 | ] |
| 514 | } |
| 515 | |
| 516 | skia_gpu_processor_outputs = [] |
| 517 | foreach(src, skia_gpu_processor_sources) { |
| 518 | dir = get_path_info(src, "dir") |
| 519 | name = get_path_info(src, "name") |
| 520 | |
| 521 | # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a |
| 522 | # path that starts with target_out_dir and then uses ".." to back up into the src dir. |
| 523 | skia_gpu_processor_outputs += [ |
| 524 | "$target_out_dir/" + rebase_path("$dir/$name.h", target_out_dir), |
| 525 | # the script also modifies the corresponding .cpp file, but if we tell GN that it gets |
| 526 | # confused due to the same file being named by two different paths |
| 527 | ] |
| 528 | } |
| 529 | |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 530 | action("create_sksl_enums") { |
| 531 | script = "gn/create_sksl_enums.py" |
| 532 | sources = [ |
| 533 | "include/private/GrSharedEnums.h", |
| 534 | ] |
| 535 | outputs = [ |
| 536 | "$target_out_dir/" + |
Ben Wagner | a56c4d2 | 2018-01-24 17:32:17 -0500 | [diff] [blame] | 537 | rebase_path("src/sksl/sksl_enums.inc", target_out_dir), |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 538 | ] |
| 539 | args = [ |
| 540 | rebase_path(sources[0]), |
| 541 | rebase_path(outputs[0]), |
| 542 | ] |
| 543 | } |
| 544 | |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 545 | action("compile_processors") { |
| 546 | script = "gn/compile_processors.py" |
| 547 | deps = [ |
Ethan Nicholas | aae47c8 | 2017-11-10 15:34:03 -0500 | [diff] [blame] | 548 | ":create_sksl_enums", |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 549 | ":skslc(//gn/toolchain:$host_toolchain)", |
| 550 | ] |
| 551 | sources = skia_gpu_processor_sources |
| 552 | outputs = skia_gpu_processor_outputs |
| 553 | skslc_path = "$root_out_dir/" |
| 554 | if (host_toolchain != default_toolchain_name) { |
| 555 | skslc_path += "$host_toolchain/" |
| 556 | } |
| 557 | skslc_path += "skslc" |
| 558 | if (host_os == "win") { |
| 559 | skslc_path += ".exe" |
| 560 | } |
Ethan Nicholas | b9f6afb | 2017-07-27 16:02:37 -0400 | [diff] [blame] | 561 | args = [ |
| 562 | rebase_path(skslc_path), |
Eric Boren | b121be7 | 2017-07-28 10:00:51 -0400 | [diff] [blame] | 563 | rebase_path("bin/clang-format"), |
Ethan Nicholas | b9f6afb | 2017-07-27 16:02:37 -0400 | [diff] [blame] | 564 | ] |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 565 | args += rebase_path(skia_gpu_processor_sources) |
| 566 | } |
| 567 | } else { |
| 568 | skia_gpu_processor_outputs = [] |
| 569 | group("compile_processors") { |
| 570 | } |
| 571 | } |
| 572 | |
Ben Wagner | e27ee6c | 2019-02-15 14:59:30 -0500 | [diff] [blame] | 573 | optional("gpu") { |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 574 | enabled = skia_enable_gpu |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 575 | deps = [ |
| 576 | ":compile_processors", |
Ethan Nicholas | 5b5f096 | 2017-09-11 13:50:14 -0700 | [diff] [blame] | 577 | ":run_sksllex", |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 578 | ] |
Adrienne Walker | 1df7cd8 | 2018-04-18 13:46:25 -0700 | [diff] [blame] | 579 | if (skia_generate_workarounds) { |
| 580 | deps += [ ":workaround_list" ] |
| 581 | } |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 582 | public_defines = [] |
Chris Dalton | 3a67b8e | 2018-05-03 09:30:29 -0600 | [diff] [blame] | 583 | public_configs = [] |
Greg Daniel | 91dfa3b | 2018-05-22 13:25:15 -0400 | [diff] [blame] | 584 | public_deps = [] |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 585 | |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 586 | sources = skia_gpu_sources + skia_sksl_sources + skia_gpu_processor_outputs |
Kevin Lubick | 93faa67 | 2018-10-10 15:54:53 -0400 | [diff] [blame] | 587 | if (!skia_enable_ccpr) { |
| 588 | sources -= skia_ccpr_sources |
| 589 | sources += [ "src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp" ] |
| 590 | } |
Kevin Lubick | 4bf2c26 | 2018-10-15 09:35:54 -0400 | [diff] [blame] | 591 | if (!skia_enable_nvpr) { |
| 592 | sources -= skia_nvpr_sources |
| 593 | sources += [ "src/gpu/GrPathRendering_none.cpp" ] |
| 594 | } |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 595 | |
| 596 | # These paths need to be absolute to match the ones produced by shared_sources.gni. |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 597 | sources -= get_path_info([ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ], |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 598 | "abspath") |
Mike Klein | 703cf5a | 2016-10-13 17:18:04 -0400 | [diff] [blame] | 599 | libs = [] |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 600 | if (is_android) { |
Hal Canary | 25375e8 | 2018-03-14 15:16:56 -0400 | [diff] [blame] | 601 | sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp" ] |
Derek Sollenberger | 7a86987 | 2017-06-27 15:37:25 -0400 | [diff] [blame] | 602 | |
| 603 | # this lib is required to link against AHardwareBuffer |
| 604 | if (defined(ndk_api) && ndk_api >= 26) { |
| 605 | libs += [ "android" ] |
| 606 | } |
Kevin Lubick | 4a24e10 | 2017-03-29 11:19:01 -0400 | [diff] [blame] | 607 | } else if (skia_use_egl) { |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 608 | sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp" ] |
Kevin Lubick | 4a24e10 | 2017-03-29 11:19:01 -0400 | [diff] [blame] | 609 | libs += [ "EGL" ] |
Chinmay Garde | d92d035 | 2018-09-17 10:23:28 -0700 | [diff] [blame] | 610 | } else if (is_linux && skia_use_x11) { |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 611 | sources += [ "src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp" ] |
Mike Klein | a27f269 | 2018-06-20 11:06:39 -0400 | [diff] [blame] | 612 | libs += [ "GL" ] |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 613 | } else if (is_mac) { |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 614 | sources += [ "src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp" ] |
Chinmay Garde | 130a118 | 2016-11-23 11:43:56 -0800 | [diff] [blame] | 615 | } else if (is_ios) { |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 616 | sources += [ "src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp" ] |
Mike Klein | 703cf5a | 2016-10-13 17:18:04 -0400 | [diff] [blame] | 617 | } else if (is_win) { |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 618 | sources += [ "src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp" ] |
Brian Osman | 0c75727 | 2018-12-10 10:27:26 -0500 | [diff] [blame] | 619 | if (target_cpu != "arm64") { |
| 620 | libs += [ "OpenGL32.lib" ] |
| 621 | } |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 622 | } else { |
Brian Salomon | 3d6801e | 2017-12-11 10:06:31 -0500 | [diff] [blame] | 623 | sources += [ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ] |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 624 | } |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 625 | |
| 626 | if (skia_use_vulkan) { |
Greg Daniel | da16cce | 2018-08-01 09:23:57 -0400 | [diff] [blame] | 627 | public_defines += [ "SK_VULKAN" ] |
Greg Daniel | 18dbfd0 | 2018-05-29 10:46:51 -0400 | [diff] [blame] | 628 | deps += [ "third_party/vulkanmemoryallocator" ] |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 629 | sources += skia_vk_sources |
egdaniel | e4a9bd7 | 2016-09-21 07:36:14 -0700 | [diff] [blame] | 630 | if (skia_enable_vulkan_debug_layers) { |
| 631 | public_defines += [ "SK_ENABLE_VK_LAYERS" ] |
| 632 | } |
Craig Stout | cb6b4bd | 2018-12-13 10:20:07 -0800 | [diff] [blame] | 633 | if (is_fuchsia) { |
Chinmay Garde | 8982076 | 2019-05-06 16:44:06 -0700 | [diff] [blame] | 634 | if (using_fuchsia_sdk) { |
| 635 | public_deps += [ "$fuchsia_sdk_root/pkg:vulkan" ] |
| 636 | } else { |
| 637 | public_deps += |
| 638 | [ "//third_party/vulkan_loader_and_validation_layers:vulkan" ] |
| 639 | } |
Craig Stout | cb6b4bd | 2018-12-13 10:20:07 -0800 | [diff] [blame] | 640 | } |
mtklein | e9fb3d5 | 2016-09-20 15:11:46 -0700 | [diff] [blame] | 641 | } |
Greg Daniel | 91dfa3b | 2018-05-22 13:25:15 -0400 | [diff] [blame] | 642 | |
Ethan Nicholas | a6ae1f7 | 2017-03-16 09:56:54 -0400 | [diff] [blame] | 643 | if (skia_enable_spirv_validation) { |
Ethan Nicholas | 762466e | 2017-06-29 10:03:38 -0400 | [diff] [blame] | 644 | deps += [ "//third_party/spirv-tools" ] |
Ethan Nicholas | a6ae1f7 | 2017-03-16 09:56:54 -0400 | [diff] [blame] | 645 | public_defines += [ "SK_ENABLE_SPIRV_VALIDATION" ] |
| 646 | } |
Greg Daniel | e5ddff5 | 2017-07-05 16:49:36 -0400 | [diff] [blame] | 647 | |
Greg Daniel | 6b7e0e2 | 2017-07-12 16:21:09 -0400 | [diff] [blame] | 648 | cflags_objcc = [] |
Greg Daniel | e5ddff5 | 2017-07-05 16:49:36 -0400 | [diff] [blame] | 649 | if (skia_use_metal) { |
| 650 | public_defines += [ "SK_METAL" ] |
| 651 | sources += skia_metal_sources |
| 652 | libs += [ "Metal.framework" ] |
Greg Daniel | 53956d9 | 2018-08-08 14:41:19 -0400 | [diff] [blame] | 653 | libs += [ "Foundation.framework" ] |
Greg Daniel | 6b7e0e2 | 2017-07-12 16:21:09 -0400 | [diff] [blame] | 654 | cflags_objcc += [ "-fobjc-arc" ] |
Greg Daniel | e5ddff5 | 2017-07-05 16:49:36 -0400 | [diff] [blame] | 655 | } |
Brian Salomon | cbcb0a1 | 2017-11-19 13:20:13 -0500 | [diff] [blame] | 656 | |
| 657 | if (skia_enable_atlas_text) { |
| 658 | sources += skia_atlas_text_sources |
| 659 | } |
Kevin Lubick | f4def34 | 2018-10-04 12:52:50 -0400 | [diff] [blame] | 660 | |
| 661 | if (is_debug) { |
| 662 | public_defines += [ "SK_ENABLE_DUMP_GPU" ] |
| 663 | } |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 664 | } |
| 665 | |
Leon Scroggins III | 4116920 | 2019-01-29 09:29:57 -0500 | [diff] [blame] | 666 | optional("gif") { |
| 667 | enabled = !skia_use_wuffs |
| 668 | sources = [ |
| 669 | "src/codec/SkGifCodec.cpp", |
| 670 | "third_party/gif/SkGifImageReader.cpp", |
| 671 | ] |
| 672 | } |
| 673 | |
Leon Scroggins III | 04be2b5 | 2017-08-17 15:13:20 -0400 | [diff] [blame] | 674 | optional("heif") { |
| 675 | enabled = skia_use_libheif |
| 676 | public_defines = [ "SK_HAS_HEIF_LIBRARY" ] |
| 677 | |
| 678 | deps = [] |
| 679 | |
| 680 | sources = [ |
| 681 | "src/codec/SkHeifCodec.cpp", |
| 682 | ] |
| 683 | } |
| 684 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 685 | optional("jpeg") { |
| 686 | enabled = skia_use_libjpeg_turbo |
| 687 | public_defines = [ "SK_HAS_JPEG_LIBRARY" ] |
| 688 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 689 | deps = [ |
| 690 | "//third_party/libjpeg-turbo:libjpeg", |
| 691 | ] |
Mike Klein | f105dc7 | 2018-06-05 15:22:54 -0400 | [diff] [blame] | 692 | public = [ |
| 693 | "include/encode/SkJpegEncoder.h", |
| 694 | ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 695 | sources = [ |
| 696 | "src/codec/SkJpegCodec.cpp", |
| 697 | "src/codec/SkJpegDecoderMgr.cpp", |
| 698 | "src/codec/SkJpegUtility.cpp", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 699 | "src/images/SkJPEGWriteUtility.cpp", |
Matt Sarett | 04c3731 | 2017-05-05 14:02:13 -0400 | [diff] [blame] | 700 | "src/images/SkJpegEncoder.cpp", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 701 | ] |
| 702 | } |
| 703 | |
| 704 | optional("pdf") { |
Hal Canary | 43fb7a0 | 2016-12-30 13:09:03 -0500 | [diff] [blame] | 705 | enabled = skia_use_zlib && skia_enable_pdf |
| 706 | public_defines = [ "SK_SUPPORT_PDF" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 707 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 708 | deps = [ |
| 709 | "//third_party/zlib", |
| 710 | ] |
Hal Canary | 83e0f1b | 2018-04-05 16:58:41 -0400 | [diff] [blame] | 711 | if (skia_use_libjpeg_turbo) { |
Adrienne Walker | 1df7cd8 | 2018-04-18 13:46:25 -0700 | [diff] [blame] | 712 | deps += [ ":jpeg" ] |
Hal Canary | 83e0f1b | 2018-04-05 16:58:41 -0400 | [diff] [blame] | 713 | } |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 714 | sources = skia_pdf_sources |
mtklein | cd01b03 | 2016-08-31 04:58:19 -0700 | [diff] [blame] | 715 | sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ] |
Hal Canary | 2a3093c | 2019-02-20 11:25:45 -0500 | [diff] [blame] | 716 | if (skia_use_icu && skia_use_harfbuzz && skia_pdf_subset_harfbuzz) { |
| 717 | deps += [ "//third_party/harfbuzz" ] |
| 718 | defines = [ "SK_PDF_USE_HARFBUZZ_SUBSET" ] |
| 719 | } else if (skia_use_icu && skia_use_sfntly) { |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 720 | deps += [ "//third_party/sfntly" ] |
Hal Canary | 32498f0 | 2019-02-04 15:36:31 -0500 | [diff] [blame] | 721 | defines = [ "SK_PDF_USE_SFNTLY" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 722 | } |
| 723 | } |
| 724 | |
| 725 | optional("png") { |
| 726 | enabled = skia_use_libpng |
| 727 | public_defines = [ "SK_HAS_PNG_LIBRARY" ] |
| 728 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 729 | deps = [ |
| 730 | "//third_party/libpng", |
| 731 | ] |
| 732 | sources = [ |
| 733 | "src/codec/SkIcoCodec.cpp", |
| 734 | "src/codec/SkPngCodec.cpp", |
Matt Sarett | 04c3731 | 2017-05-05 14:02:13 -0400 | [diff] [blame] | 735 | "src/images/SkPngEncoder.cpp", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 736 | ] |
| 737 | } |
| 738 | |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 739 | optional("raw") { |
Mike Klein | 10d665d | 2016-11-01 11:46:10 -0400 | [diff] [blame] | 740 | enabled = skia_use_dng_sdk && skia_use_libjpeg_turbo && skia_use_piex |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 741 | public_defines = [ "SK_CODEC_DECODES_RAW" ] |
| 742 | |
| 743 | deps = [ |
| 744 | "//third_party/dng_sdk", |
| 745 | "//third_party/libjpeg-turbo:libjpeg", |
| 746 | "//third_party/piex", |
| 747 | ] |
| 748 | |
| 749 | # SkRawCodec catches any exceptions thrown by dng_sdk, insulating the rest of |
| 750 | # Skia. |
| 751 | configs_to_remove = [ "//gn:no_exceptions" ] |
| 752 | |
| 753 | sources = [ |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 754 | "src/codec/SkRawCodec.cpp", |
| 755 | ] |
| 756 | } |
| 757 | |
Mike Klein | 852a8cb | 2018-05-15 10:46:58 -0400 | [diff] [blame] | 758 | import("third_party/skcms/skcms.gni") |
Brian Osman | 8dc68c6 | 2018-05-30 12:57:45 -0400 | [diff] [blame] | 759 | source_set("skcms") { |
Mike Klein | 852a8cb | 2018-05-15 10:46:58 -0400 | [diff] [blame] | 760 | cflags = [] |
| 761 | if (!is_win || is_clang) { |
| 762 | cflags += [ |
| 763 | "-w", |
| 764 | "-std=c11", |
| 765 | ] |
| 766 | } |
| 767 | |
| 768 | public = [ |
Brian Osman | ea236bf | 2019-04-29 10:28:22 -0400 | [diff] [blame] | 769 | "include/third_party/skcms/skcms.h", |
Mike Klein | 852a8cb | 2018-05-15 10:46:58 -0400 | [diff] [blame] | 770 | ] |
Brian Osman | ea236bf | 2019-04-29 10:28:22 -0400 | [diff] [blame] | 771 | include_dirs = [ "include/third_party/skcms" ] |
Mike Klein | 852a8cb | 2018-05-15 10:46:58 -0400 | [diff] [blame] | 772 | sources = rebase_path(skcms_sources, ".", "third_party/skcms") |
| 773 | } |
| 774 | |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 775 | optional("typeface_freetype") { |
| 776 | enabled = skia_use_freetype |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 777 | |
| 778 | deps = [ |
| 779 | "//third_party/freetype2", |
| 780 | ] |
| 781 | sources = [ |
| 782 | "src/ports/SkFontHost_FreeType.cpp", |
| 783 | "src/ports/SkFontHost_FreeType_common.cpp", |
| 784 | ] |
| 785 | } |
| 786 | |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 787 | optional("webp") { |
| 788 | enabled = skia_use_libwebp |
| 789 | public_defines = [ "SK_HAS_WEBP_LIBRARY" ] |
| 790 | |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 791 | deps = [ |
| 792 | "//third_party/libwebp", |
| 793 | ] |
| 794 | sources = [ |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 795 | "src/codec/SkWebpCodec.cpp", |
Matt Sarett | 04c3731 | 2017-05-05 14:02:13 -0400 | [diff] [blame] | 796 | "src/images/SkWebpEncoder.cpp", |
mtklein | 457b42a | 2016-08-23 13:56:37 -0700 | [diff] [blame] | 797 | ] |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 798 | } |
| 799 | |
Leon Scroggins III | e93ec68 | 2018-10-26 09:25:51 -0400 | [diff] [blame] | 800 | optional("wuffs") { |
| 801 | enabled = skia_use_wuffs |
| 802 | public_defines = [ "SK_HAS_WUFFS_LIBRARY" ] |
| 803 | |
| 804 | deps = [ |
| 805 | "//third_party/wuffs", |
| 806 | ] |
| 807 | sources = [ |
| 808 | "src/codec/SkWuffsCodec.cpp", |
| 809 | ] |
| 810 | } |
| 811 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 812 | optional("xml") { |
| 813 | enabled = skia_use_expat |
Florin Malita | 442fff9 | 2016-11-08 16:07:52 +0000 | [diff] [blame] | 814 | public_defines = [ "SK_XML" ] |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 815 | |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 816 | deps = [ |
| 817 | "//third_party/expat", |
| 818 | ] |
| 819 | sources = [ |
Mike Klein | bd41bcc | 2017-02-09 16:38:15 -0500 | [diff] [blame] | 820 | "src/svg/SkSVGCanvas.cpp", |
| 821 | "src/svg/SkSVGDevice.cpp", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 822 | "src/xml/SkDOM.cpp", |
| 823 | "src/xml/SkXMLParser.cpp", |
| 824 | "src/xml/SkXMLWriter.cpp", |
| 825 | ] |
| 826 | } |
| 827 | |
Adrienne Walker | 1df7cd8 | 2018-04-18 13:46:25 -0700 | [diff] [blame] | 828 | if (skia_enable_gpu && skia_generate_workarounds) { |
| 829 | action("workaround_list") { |
| 830 | script = "tools/build_workaround_header.py" |
| 831 | |
| 832 | inputs = [ |
| 833 | "src/gpu/gpu_workaround_list.txt", |
| 834 | ] |
| 835 | |
| 836 | # see comments in skia_compile_processors about out dir path shenanigans. |
| 837 | output_file = |
Adrienne Walker | ab7181d | 2018-05-14 14:02:03 -0700 | [diff] [blame] | 838 | rebase_path("include/gpu/GrDriverBugWorkaroundsAutogen.h", root_out_dir) |
Adrienne Walker | 1df7cd8 | 2018-04-18 13:46:25 -0700 | [diff] [blame] | 839 | |
| 840 | outputs = [ |
| 841 | "$root_out_dir/$output_file", |
| 842 | ] |
| 843 | args = [ |
| 844 | "--output-file", |
| 845 | "$output_file", |
| 846 | ] |
| 847 | |
| 848 | foreach(file, inputs) { |
| 849 | args += [ rebase_path(file, root_build_dir) ] |
| 850 | } |
| 851 | } |
| 852 | } |
| 853 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 854 | component("skia") { |
| 855 | public_configs = [ ":skia_public" ] |
| 856 | configs += skia_library_configs |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 857 | |
Mike Klein | 607b0a7 | 2018-11-07 16:17:34 -0500 | [diff] [blame] | 858 | public_deps = [ |
Ben Wagner | e27ee6c | 2019-02-15 14:59:30 -0500 | [diff] [blame] | 859 | ":gpu", |
Mike Klein | 607b0a7 | 2018-11-07 16:17:34 -0500 | [diff] [blame] | 860 | ":pdf", |
| 861 | ":skcms", |
| 862 | ] |
| 863 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 864 | deps = [ |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 865 | ":arm64", |
| 866 | ":armv7", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 867 | ":avx", |
Mike Klein | 5437823 | 2018-11-08 12:08:05 +0000 | [diff] [blame] | 868 | ":compile_processors", |
anmittal | b8b3f71 | 2016-08-25 04:55:19 -0700 | [diff] [blame] | 869 | ":crc32", |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 870 | ":fontmgr_android", |
mtklein | d2e39db | 2016-09-07 07:52:55 -0700 | [diff] [blame] | 871 | ":fontmgr_custom", |
Leon Scroggins III | be85c19 | 2018-11-13 13:50:12 -0500 | [diff] [blame] | 872 | ":fontmgr_custom_empty", |
Hal Canary | ff2742e | 2018-01-30 11:35:47 -0500 | [diff] [blame] | 873 | ":fontmgr_empty", |
mtklein | 3cc2218 | 2016-08-29 13:26:14 -0700 | [diff] [blame] | 874 | ":fontmgr_fontconfig", |
Sergey Ulanov | f3babcd | 2018-11-30 17:42:00 -0800 | [diff] [blame] | 875 | ":fontmgr_fuchsia", |
Kevin Lubick | ddd0a33 | 2018-12-12 10:35:13 -0500 | [diff] [blame] | 876 | ":fontmgr_wasm", |
Leon Scroggins III | 631dbc8 | 2019-03-04 13:54:02 -0500 | [diff] [blame] | 877 | ":fontmgr_win", |
| 878 | ":fontmgr_win_gdi", |
Leon Scroggins III | 4116920 | 2019-01-29 09:29:57 -0500 | [diff] [blame] | 879 | ":gif", |
Leon Scroggins III | 04be2b5 | 2017-08-17 15:13:20 -0400 | [diff] [blame] | 880 | ":heif", |
Mike Klein | 1b9b7d5 | 2018-02-27 10:37:40 -0500 | [diff] [blame] | 881 | ":hsw", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 882 | ":jpeg", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 883 | ":none", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 884 | ":png", |
scroggo | f84ad64 | 2016-10-31 09:02:57 -0700 | [diff] [blame] | 885 | ":raw", |
mtklein | 9b8583d | 2016-08-24 17:32:30 -0700 | [diff] [blame] | 886 | ":sse2", |
| 887 | ":sse41", |
| 888 | ":sse42", |
| 889 | ":ssse3", |
mtklein | eb3c425 | 2016-08-23 07:38:09 -0700 | [diff] [blame] | 890 | ":webp", |
Leon Scroggins III | e93ec68 | 2018-10-26 09:25:51 -0400 | [diff] [blame] | 891 | ":wuffs", |
mtklein | 6321381 | 2016-08-24 09:55:56 -0700 | [diff] [blame] | 892 | ":xml", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 893 | ] |
| 894 | |
Kevin Lubick | 134be1d | 2018-10-30 15:05:04 -0400 | [diff] [blame] | 895 | if (skia_enable_nima) { |
| 896 | deps += [ "//third_party/Nima-Cpp" ] |
| 897 | } |
| 898 | |
Chinmay Garde | 43f115c | 2016-11-16 15:04:12 -0800 | [diff] [blame] | 899 | # This file (and all GN files in Skia) are designed to work with an |
| 900 | # empty sources assignment filter; we handle all that explicitly. |
| 901 | # We clear the filter here for clients who may have set up a global filter. |
| 902 | set_sources_assignment_filter([]) |
| 903 | |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 904 | public = skia_core_public |
| 905 | public += skia_utils_public |
| 906 | public += skia_effects_public |
| 907 | public += skia_effects_imagefilter_public |
| 908 | public += skia_xps_public |
| 909 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 910 | sources = [] |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 911 | sources += skia_core_sources |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 912 | sources += skia_utils_sources |
Leon Scroggins III | ee0e5d0 | 2019-02-27 10:59:11 -0500 | [diff] [blame] | 913 | if (skia_use_xps) { |
| 914 | sources += skia_xps_sources |
| 915 | } |
Mike Klein | 5437823 | 2018-11-08 12:08:05 +0000 | [diff] [blame] | 916 | sources += skia_effects_sources |
| 917 | sources += skia_effects_imagefilter_sources |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 918 | sources += [ |
Stan Iliev | 73d8fd9 | 2017-08-02 15:36:24 -0400 | [diff] [blame] | 919 | "src/android/SkAndroidFrameworkUtils.cpp", |
Leon Scroggins III | 42ee284 | 2018-01-14 14:46:51 -0500 | [diff] [blame] | 920 | "src/android/SkAnimatedImage.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 921 | "src/android/SkBitmapRegionCodec.cpp", |
| 922 | "src/android/SkBitmapRegionDecoder.cpp", |
| 923 | "src/codec/SkAndroidCodec.cpp", |
Nigel Tao | 612a65d | 2018-11-09 10:10:31 +1100 | [diff] [blame] | 924 | "src/codec/SkAndroidCodecAdapter.cpp", |
Leon Scroggins III | d81fed9 | 2017-06-01 13:42:28 -0400 | [diff] [blame] | 925 | "src/codec/SkBmpBaseCodec.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 926 | "src/codec/SkBmpCodec.cpp", |
| 927 | "src/codec/SkBmpMaskCodec.cpp", |
| 928 | "src/codec/SkBmpRLECodec.cpp", |
| 929 | "src/codec/SkBmpStandardCodec.cpp", |
| 930 | "src/codec/SkCodec.cpp", |
| 931 | "src/codec/SkCodecImageGenerator.cpp", |
Leon Scroggins III | 22f673d | 2018-05-30 15:33:46 -0400 | [diff] [blame] | 932 | "src/codec/SkColorTable.cpp", |
Leon Scroggins III | 36f7e32 | 2018-08-27 11:55:46 -0400 | [diff] [blame] | 933 | "src/codec/SkEncodedInfo.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 934 | "src/codec/SkMaskSwizzler.cpp", |
| 935 | "src/codec/SkMasks.cpp", |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 936 | "src/codec/SkSampledCodec.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 937 | "src/codec/SkSampler.cpp", |
scroggo | 19b9153 | 2016-10-24 09:03:26 -0700 | [diff] [blame] | 938 | "src/codec/SkStreamBuffer.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 939 | "src/codec/SkSwizzler.cpp", |
| 940 | "src/codec/SkWbmpCodec.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 941 | "src/images/SkImageEncoder.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 942 | "src/ports/SkDiscardableMemory_none.cpp", |
Mike Klein | 5437823 | 2018-11-08 12:08:05 +0000 | [diff] [blame] | 943 | "src/ports/SkGlobalInitialization_default.cpp", |
mtklein | 1211e0c | 2016-07-26 13:55:45 -0700 | [diff] [blame] | 944 | "src/ports/SkImageGenerator_skia.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 945 | "src/ports/SkMemory_malloc.cpp", |
| 946 | "src/ports/SkOSFile_stdio.cpp", |
| 947 | "src/sfnt/SkOTTable_name.cpp", |
| 948 | "src/sfnt/SkOTUtils.cpp", |
| 949 | "src/utils/mac/SkStream_mac.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 950 | ] |
brettw | b944728 | 2016-09-01 14:24:39 -0700 | [diff] [blame] | 951 | |
Kevin Lubick | 32dfdbe | 2018-10-18 09:47:01 -0400 | [diff] [blame] | 952 | defines = [] |
| 953 | if (!skia_enable_skpicture) { |
| 954 | defines = [ "SK_DISABLE_SKPICTURE" ] |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 955 | public -= skia_skpicture_public |
Kevin Lubick | 32dfdbe | 2018-10-18 09:47:01 -0400 | [diff] [blame] | 956 | sources -= skia_skpicture_sources |
Mike Klein | 5437823 | 2018-11-08 12:08:05 +0000 | [diff] [blame] | 957 | sources -= [ "//src/effects/imagefilters/SkPictureImageFilter.cpp" ] |
Kevin Lubick | 32dfdbe | 2018-10-18 09:47:01 -0400 | [diff] [blame] | 958 | sources += [ "src/core/SkPicture_none.cpp" ] |
| 959 | } |
| 960 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 961 | libs = [] |
| 962 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 963 | if (is_win) { |
| 964 | sources += [ |
| 965 | "src/ports/SkDebug_win.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 966 | "src/ports/SkImageEncoder_WIC.cpp", |
| 967 | "src/ports/SkImageGeneratorWIC.cpp", |
| 968 | "src/ports/SkOSFile_win.cpp", |
mtklein | 605d952 | 2016-09-21 14:01:32 -0700 | [diff] [blame] | 969 | "src/ports/SkOSLibrary_win.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 970 | "src/ports/SkTLS_win.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 971 | ] |
Mike Klein | 4b167fc | 2016-10-11 18:13:53 -0400 | [diff] [blame] | 972 | libs += [ |
| 973 | "FontSub.lib", |
| 974 | "Ole32.lib", |
| 975 | "OleAut32.lib", |
| 976 | "User32.lib", |
Mike Klein | 0c5fdcb | 2017-11-13 12:40:46 -0500 | [diff] [blame] | 977 | "Usp10.lib", |
Mike Klein | 4b167fc | 2016-10-11 18:13:53 -0400 | [diff] [blame] | 978 | ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 979 | } else { |
| 980 | sources += [ |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 981 | "src/ports/SkOSFile_posix.cpp", |
mtklein | 605d952 | 2016-09-21 14:01:32 -0700 | [diff] [blame] | 982 | "src/ports/SkOSLibrary_posix.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 983 | "src/ports/SkTLS_pthread.cpp", |
| 984 | ] |
Ben Wagner | be6ae5b | 2017-08-31 16:45:23 -0400 | [diff] [blame] | 985 | libs += [ "dl" ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 986 | } |
| 987 | |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 988 | if (is_android) { |
Mike Klein | 1c47187 | 2017-01-13 15:27:45 -0500 | [diff] [blame] | 989 | deps += [ "//third_party/expat" ] |
Mike Klein | e459afd | 2017-03-03 09:21:30 -0500 | [diff] [blame] | 990 | if (defined(ndk) && ndk != "") { |
Mike Klein | 1c47187 | 2017-01-13 15:27:45 -0500 | [diff] [blame] | 991 | deps += [ "//third_party/cpu-features" ] |
| 992 | } |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 993 | sources += [ "src/ports/SkDebug_android.cpp" ] |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 994 | libs += [ |
| 995 | "EGL", |
| 996 | "GLESv2", |
| 997 | "log", |
| 998 | ] |
| 999 | } |
| 1000 | |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 1001 | if (is_linux || target_cpu == "wasm") { |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 1002 | sources += [ "src/ports/SkDebug_stdio.cpp" ] |
Hal Canary | 25375e8 | 2018-03-14 15:16:56 -0400 | [diff] [blame] | 1003 | if (skia_use_egl) { |
| 1004 | libs += [ "GLESv2" ] |
| 1005 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1006 | } |
| 1007 | |
Leon Scroggins III | 85e22fc | 2018-11-28 08:58:47 -0500 | [diff] [blame] | 1008 | if (skia_use_fonthost_mac) { |
Sergey Ulanov | f3babcd | 2018-11-30 17:42:00 -0800 | [diff] [blame] | 1009 | sources += [ "src/ports/SkFontHost_mac.cpp" ] |
Leon Scroggins III | 85e22fc | 2018-11-28 08:58:47 -0500 | [diff] [blame] | 1010 | } |
| 1011 | |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1012 | if (is_mac) { |
| 1013 | sources += [ |
mtklein | 7d6fb2c | 2016-08-25 14:50:44 -0700 | [diff] [blame] | 1014 | "src/ports/SkDebug_stdio.cpp", |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1015 | "src/ports/SkImageEncoder_CG.cpp", |
| 1016 | "src/ports/SkImageGeneratorCG.cpp", |
| 1017 | ] |
mtklein | 09e61f7 | 2016-08-23 13:35:28 -0700 | [diff] [blame] | 1018 | libs += [ |
bungeman | 3e306f6 | 2017-03-29 11:32:02 -0400 | [diff] [blame] | 1019 | # AppKit symbols NSFontWeightXXX may be dlsym'ed. |
| 1020 | "AppKit.framework", |
mtklein | 09e61f7 | 2016-08-23 13:35:28 -0700 | [diff] [blame] | 1021 | "ApplicationServices.framework", |
| 1022 | "OpenGL.framework", |
| 1023 | ] |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1024 | } |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 1025 | |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1026 | if (is_ios) { |
| 1027 | sources += [ |
| 1028 | "src/ports/SkDebug_stdio.cpp", |
| 1029 | "src/ports/SkFontHost_mac.cpp", |
| 1030 | "src/ports/SkImageEncoder_CG.cpp", |
| 1031 | "src/ports/SkImageGeneratorCG.cpp", |
| 1032 | ] |
| 1033 | libs += [ |
| 1034 | "CoreFoundation.framework", |
| 1035 | "CoreGraphics.framework", |
| 1036 | "CoreText.framework", |
| 1037 | "ImageIO.framework", |
| 1038 | "MobileCoreServices.framework", |
bungeman | 3e306f6 | 2017-03-29 11:32:02 -0400 | [diff] [blame] | 1039 | |
| 1040 | # UIKit symbols UIFontWeightXXX may be dlsym'ed. |
| 1041 | "UIKit.framework", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1042 | ] |
| 1043 | } |
| 1044 | |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 1045 | if (is_fuchsia) { |
mtklein | 06c35c0 | 2016-09-20 12:28:12 -0700 | [diff] [blame] | 1046 | sources += [ "src/ports/SkDebug_stdio.cpp" ] |
abarth | 6fc8ff0 | 2016-07-15 15:15:15 -0700 | [diff] [blame] | 1047 | } |
mtklein | c04ff47 | 2016-06-23 10:29:30 -0700 | [diff] [blame] | 1048 | } |
| 1049 | |
Nathaniel Nifong | ad5f6cd | 2019-03-05 10:45:40 -0500 | [diff] [blame] | 1050 | # DebugCanvas used in experimental/wasm-skp-debugger |
| 1051 | if (target_cpu == "wasm") { |
| 1052 | static_library("debugcanvas") { |
| 1053 | public_configs = [ ":skia_public" ] |
| 1054 | |
Nathaniel Nifong | ad5f6cd | 2019-03-05 10:45:40 -0500 | [diff] [blame] | 1055 | sources = [ |
| 1056 | "tools/UrlDataManager.cpp", |
Mike Klein | 8f4e224 | 2019-03-20 11:59:00 -0500 | [diff] [blame] | 1057 | "tools/debugger/DebugCanvas.cpp", |
| 1058 | "tools/debugger/DrawCommand.cpp", |
| 1059 | "tools/debugger/JsonWriteBuffer.cpp", |
Nathaniel Nifong | ad5f6cd | 2019-03-05 10:45:40 -0500 | [diff] [blame] | 1060 | ] |
| 1061 | |
| 1062 | deps = [ |
| 1063 | ":fontmgr_wasm", |
| 1064 | ] |
| 1065 | } |
| 1066 | } |
| 1067 | |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1068 | static_library("pathkit") { |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 1069 | check_includes = false |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1070 | public_configs = [ ":skia_public" ] |
| 1071 | configs += skia_library_configs |
| 1072 | |
| 1073 | deps = [ |
| 1074 | ":arm64", |
| 1075 | ":armv7", |
| 1076 | ":avx", |
| 1077 | ":crc32", |
| 1078 | ":hsw", |
| 1079 | ":none", |
| 1080 | ":sse2", |
| 1081 | ":sse41", |
| 1082 | ":sse42", |
| 1083 | ":ssse3", |
| 1084 | ] |
| 1085 | |
| 1086 | # This file (and all GN files in Skia) are designed to work with an |
| 1087 | # empty sources assignment filter; we handle all that explicitly. |
| 1088 | # We clear the filter here for clients who may have set up a global filter. |
| 1089 | set_sources_assignment_filter([]) |
| 1090 | |
| 1091 | sources = [] |
| 1092 | sources += skia_pathops_sources |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 1093 | sources += skia_pathops_public |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1094 | sources += [ |
| 1095 | "src/core/SkAnalyticEdge.cpp", |
| 1096 | "src/core/SkArenaAlloc.cpp", |
Mike Reed | cc88f3a | 2019-02-06 11:40:27 -0500 | [diff] [blame] | 1097 | "src/core/SkContourMeasure.cpp", |
Kevin Lubick | cbcff38 | 2018-10-02 09:02:18 -0400 | [diff] [blame] | 1098 | "src/core/SkCubicMap.cpp", |
| 1099 | "src/core/SkEdge.cpp", |
| 1100 | "src/core/SkEdgeBuilder.cpp", |
| 1101 | "src/core/SkEdgeClipper.cpp", |
| 1102 | "src/core/SkGeometry.cpp", |
| 1103 | "src/core/SkLineClipper.cpp", |
| 1104 | "src/core/SkMallocPixelRef.cpp", |
| 1105 | "src/core/SkMath.cpp", |
| 1106 | "src/core/SkMatrix.cpp", |
| 1107 | "src/core/SkOpts.cpp", |
| 1108 | "src/core/SkPaint.cpp", |
| 1109 | "src/core/SkPath.cpp", |
| 1110 | "src/core/SkPathEffect.cpp", |
| 1111 | "src/core/SkPathMeasure.cpp", |
| 1112 | "src/core/SkPathRef.cpp", |
| 1113 | "src/core/SkPoint.cpp", |
| 1114 | "src/core/SkRRect.cpp", |
| 1115 | "src/core/SkRect.cpp", |
| 1116 | "src/core/SkSemaphore.cpp", |
| 1117 | "src/core/SkStream.cpp", |
| 1118 | "src/core/SkString.cpp", |
| 1119 | "src/core/SkStringUtils.cpp", |
| 1120 | "src/core/SkStroke.cpp", |
| 1121 | "src/core/SkStrokeRec.cpp", |
| 1122 | "src/core/SkStrokerPriv.cpp", |
| 1123 | "src/core/SkThreadID.cpp", |
| 1124 | "src/core/SkUtils.cpp", |
| 1125 | "src/effects/SkDashPathEffect.cpp", |
| 1126 | "src/effects/SkTrimPathEffect.cpp", |
| 1127 | "src/ports/SkDebug_stdio.cpp", |
| 1128 | "src/ports/SkMemory_malloc.cpp", |
| 1129 | "src/utils/SkDashPath.cpp", |
| 1130 | "src/utils/SkParse.cpp", |
| 1131 | "src/utils/SkParsePath.cpp", |
| 1132 | "src/utils/SkUTF.cpp", |
| 1133 | ] |
| 1134 | } |
| 1135 | |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 1136 | group("modules") { |
| 1137 | deps = [ |
Kevin Lubick | 9663484 | 2019-03-05 14:09:24 -0500 | [diff] [blame] | 1138 | "modules/particles", |
Kevin Lubick | 1ba9c4d | 2019-02-22 10:04:06 -0500 | [diff] [blame] | 1139 | "modules/skottie", |
| 1140 | "modules/skshaper", |
| 1141 | ] |
| 1142 | } |
| 1143 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1144 | # Targets guarded by skia_enable_tools may use //third_party freely. |
| 1145 | if (skia_enable_tools) { |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 1146 | skia_public_includes = [ |
| 1147 | "include/android", |
| 1148 | "include/atlastext", |
| 1149 | "include/c", |
| 1150 | "include/codec", |
| 1151 | "include/config", |
| 1152 | "include/core", |
| 1153 | "include/docs", |
| 1154 | "include/effects", |
| 1155 | "include/encode", |
| 1156 | "include/gpu", |
| 1157 | "include/pathops", |
| 1158 | "include/ports", |
| 1159 | "include/svg", |
| 1160 | "include/utils", |
| 1161 | "include/utils/mac", |
| 1162 | "modules/sksg/include", |
| 1163 | "modules/skshaper/include", |
| 1164 | "modules/skottie/include", |
| 1165 | ] |
| 1166 | |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 1167 | # Used by gn_to_bp.py to list our public include dirs. |
| 1168 | source_set("public") { |
| 1169 | configs += [ ":skia_public" ] |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 1170 | include_dirs = skia_public_includes |
Mike Klein | 308b5ac | 2016-12-06 16:03:52 -0500 | [diff] [blame] | 1171 | } |
| 1172 | |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1173 | config("skia.h_config") { |
| 1174 | include_dirs = [ "$target_gen_dir" ] |
| 1175 | } |
| 1176 | action("skia.h") { |
| 1177 | public_configs = [ ":skia.h_config" ] |
| 1178 | skia_h = "$target_gen_dir/skia.h" |
| 1179 | script = "gn/find_headers.py" |
Florin Malita | 6e4d95f | 2018-05-30 09:27:32 -0400 | [diff] [blame] | 1180 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 1181 | args = [ rebase_path("//bin/gn") ] + [ rebase_path("//") ] + |
| 1182 | [ rebase_path(skia_h, root_build_dir) ] + |
| 1183 | rebase_path(skia_public_includes) |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1184 | depfile = "$skia_h.deps" |
| 1185 | outputs = [ |
| 1186 | skia_h, |
| 1187 | ] |
| 1188 | } |
| 1189 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1190 | if (target_cpu == "x64") { |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1191 | executable("fiddle") { |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 1192 | check_includes = false |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1193 | libs = [] |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1194 | sources = [ |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1195 | "tools/fiddle/draw.cpp", |
| 1196 | "tools/fiddle/fiddle_main.cpp", |
| 1197 | ] |
Joe Gregorio | a8fabd3 | 2017-05-31 09:45:19 -0400 | [diff] [blame] | 1198 | |
| 1199 | if (skia_use_egl) { |
| 1200 | sources += [ "tools/fiddle/egl_context.cpp" ] |
Joe Gregorio | a8fabd3 | 2017-05-31 09:45:19 -0400 | [diff] [blame] | 1201 | } else { |
| 1202 | sources += [ "tools/fiddle/null_context.cpp" ] |
| 1203 | } |
Joe Gregorio | 1e735c0 | 2017-04-19 14:05:14 -0400 | [diff] [blame] | 1204 | testonly = true |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1205 | deps = [ |
Joe Gregorio | 1e735c0 | 2017-04-19 14:05:14 -0400 | [diff] [blame] | 1206 | ":flags", |
Robert Phillips | 57e0828 | 2017-11-16 14:59:48 -0500 | [diff] [blame] | 1207 | ":gpu_tool_utils", |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1208 | ":skia", |
| 1209 | ":skia.h", |
Florin Malita | 6e4d95f | 2018-05-30 09:27:32 -0400 | [diff] [blame] | 1210 | "modules/skottie", |
Florin Malita | a1dcaae | 2019-03-25 17:38:43 -0400 | [diff] [blame] | 1211 | "modules/skshaper", |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1212 | ] |
| 1213 | } |
| 1214 | } |
| 1215 | |
Mike Klein | 9e25bb9 | 2019-04-29 09:46:36 -0500 | [diff] [blame] | 1216 | config("our_vulkan_headers") { |
| 1217 | # We add this directory to simulate the client already have |
| 1218 | # vulkan/vulkan_core.h on their path. |
| 1219 | include_dirs = [ "include/third_party/vulkan" ] |
| 1220 | } |
| 1221 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1222 | source_set("public_headers_warnings_check") { |
| 1223 | sources = [ |
| 1224 | "tools/public_headers_warnings_check.cpp", |
| 1225 | ] |
| 1226 | configs -= [ "//gn:warnings_except_public_headers" ] |
Mike Klein | 9e25bb9 | 2019-04-29 09:46:36 -0500 | [diff] [blame] | 1227 | configs += [ ":our_vulkan_headers" ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1228 | deps = [ |
| 1229 | ":skia", |
| 1230 | ":skia.h", |
| 1231 | "modules/skottie", |
Florin Malita | a1dcaae | 2019-03-25 17:38:43 -0400 | [diff] [blame] | 1232 | "modules/skshaper", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1233 | ] |
Mike Klein | c36dedf | 2016-11-18 09:35:28 -0500 | [diff] [blame] | 1234 | } |
| 1235 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1236 | template("test_lib") { |
| 1237 | config(target_name + "_config") { |
mtklein | a627b5c | 2016-09-20 13:36:47 -0700 | [diff] [blame] | 1238 | if (defined(invoker.public_defines)) { |
| 1239 | defines = invoker.public_defines |
| 1240 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1241 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1242 | source_set(target_name) { |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 1243 | forward_variables_from(invoker, "*", []) |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 1244 | check_includes = false |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1245 | public_configs = [ |
| 1246 | ":" + target_name + "_config", |
| 1247 | ":skia_private", |
| 1248 | ] |
| 1249 | |
| 1250 | if (!defined(deps)) { |
| 1251 | deps = [] |
| 1252 | } |
| 1253 | deps += [ ":skia" ] |
| 1254 | testonly = true |
| 1255 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1256 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1257 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1258 | template("test_app") { |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1259 | if (is_ios) { |
| 1260 | app_name = target_name |
| 1261 | gen_path = target_gen_dir |
| 1262 | |
| 1263 | action("${app_name}_generate_info_plist") { |
| 1264 | script = "//gn/gen_plist_ios.py" |
| 1265 | outputs = [ |
| 1266 | "$gen_path/${app_name}_Info.plist", |
| 1267 | ] |
| 1268 | args = [ rebase_path("$gen_path/$app_name", root_build_dir) ] |
| 1269 | } |
| 1270 | |
| 1271 | bundle_data("${app_name}_bundle_info_plist") { |
| 1272 | public_deps = [ |
| 1273 | ":${app_name}_generate_info_plist", |
| 1274 | ] |
| 1275 | sources = [ |
| 1276 | "$gen_path/${app_name}_Info.plist", |
| 1277 | ] |
| 1278 | outputs = [ |
| 1279 | "{{bundle_root_dir}}/Info.plist", |
| 1280 | ] |
| 1281 | } |
| 1282 | |
Jim Van Verth | ffacf65 | 2019-04-02 11:59:34 -0400 | [diff] [blame] | 1283 | has_skps = "True" == exec_script("//gn/checkdir.py", |
| 1284 | [ rebase_path("skps", root_build_dir) ], |
| 1285 | "trim string") |
| 1286 | bundle_data("${app_name}_bundle_resources") { |
| 1287 | sources = [ |
| 1288 | "resources", |
| 1289 | ] |
| 1290 | outputs = [ |
| 1291 | # iOS reserves the folders 'Resources' and 'resources' so store one level deeper |
| 1292 | "{{bundle_resources_dir}}/data/resources", |
| 1293 | ] |
| 1294 | } |
| 1295 | if (has_skps) { |
| 1296 | bundle_data("${app_name}_bundle_skps") { |
Jim Van Verth | 329c5a6 | 2017-11-29 11:42:33 -0500 | [diff] [blame] | 1297 | sources = [ |
Jim Van Verth | ffacf65 | 2019-04-02 11:59:34 -0400 | [diff] [blame] | 1298 | "skps", |
Jim Van Verth | 329c5a6 | 2017-11-29 11:42:33 -0500 | [diff] [blame] | 1299 | ] |
| 1300 | outputs = [ |
Jim Van Verth | ffacf65 | 2019-04-02 11:59:34 -0400 | [diff] [blame] | 1301 | # Store in same folder as resources |
| 1302 | "{{bundle_resources_dir}}/data/skps", |
Jim Van Verth | 329c5a6 | 2017-11-29 11:42:33 -0500 | [diff] [blame] | 1303 | ] |
| 1304 | } |
Jim Van Verth | 329c5a6 | 2017-11-29 11:42:33 -0500 | [diff] [blame] | 1305 | } |
| 1306 | |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1307 | executable("${app_name}_generate_executable") { |
| 1308 | forward_variables_from(invoker, |
| 1309 | "*", |
| 1310 | [ |
| 1311 | "output_name", |
| 1312 | "visibility", |
| 1313 | "is_shared_library", |
| 1314 | ]) |
Mike Klein | 154e6da | 2017-07-26 15:13:47 -0400 | [diff] [blame] | 1315 | configs += [ ":skia_private" ] |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1316 | testonly = true |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1317 | output_name = rebase_path("$gen_path/$app_name", root_build_dir) |
| 1318 | } |
| 1319 | |
| 1320 | bundle_data("${app_name}_bundle_executable") { |
| 1321 | public_deps = [ |
| 1322 | ":${app_name}_generate_executable", |
| 1323 | ] |
| 1324 | sources = [ |
| 1325 | "$gen_path/$app_name", |
| 1326 | ] |
| 1327 | outputs = [ |
| 1328 | "{{bundle_executable_dir}}/$app_name", |
| 1329 | ] |
| 1330 | testonly = true |
| 1331 | } |
| 1332 | |
Jim Van Verth | ffacf65 | 2019-04-02 11:59:34 -0400 | [diff] [blame] | 1333 | bundle_data("${app_name}_bundle_symbols") { |
| 1334 | public_deps = [ |
| 1335 | ":${app_name}_generate_executable", |
| 1336 | ] |
| 1337 | sources = [ |
| 1338 | "$gen_path/${app_name}.dSYM", |
| 1339 | ] |
| 1340 | outputs = [ |
| 1341 | "{{bundle_executable_dir}}/${app_name}.dSYM", |
| 1342 | ] |
| 1343 | testonly = true |
| 1344 | } |
| 1345 | |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1346 | create_bundle("$app_name") { |
| 1347 | product_type = "com.apple.product-type.application" |
| 1348 | testonly = true |
| 1349 | |
| 1350 | bundle_root_dir = "${root_build_dir}/${target_name}.app" |
| 1351 | bundle_resources_dir = bundle_root_dir |
| 1352 | bundle_executable_dir = bundle_root_dir |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1353 | |
| 1354 | deps = [ |
| 1355 | ":${app_name}_bundle_executable", |
| 1356 | ":${app_name}_bundle_info_plist", |
Jim Van Verth | ffacf65 | 2019-04-02 11:59:34 -0400 | [diff] [blame] | 1357 | ":${app_name}_bundle_resources", |
| 1358 | ":${app_name}_bundle_symbols", |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1359 | ] |
Jim Van Verth | ffacf65 | 2019-04-02 11:59:34 -0400 | [diff] [blame] | 1360 | if (has_skps) { |
| 1361 | deps += [ ":${app_name}_bundle_skps" ] |
Jim Van Verth | 329c5a6 | 2017-11-29 11:42:33 -0500 | [diff] [blame] | 1362 | } |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1363 | |
| 1364 | # should only code sign when running on a device, not the simulator |
| 1365 | if (target_cpu != "x64") { |
| 1366 | code_signing_script = "//gn/codesign_ios.py" |
| 1367 | code_signing_sources = [ "$target_gen_dir/$app_name" ] |
| 1368 | code_signing_outputs = [ |
| 1369 | "$bundle_root_dir/_CodeSignature/CodeResources", |
| 1370 | "$bundle_root_dir/embedded.mobileprovision", |
| 1371 | ] |
Jim Van Verth | 4e50297 | 2017-12-07 15:16:10 -0500 | [diff] [blame] | 1372 | code_signing_args = [ |
| 1373 | rebase_path("$bundle_root_dir", root_build_dir), |
| 1374 | skia_ios_identity, |
| 1375 | skia_ios_profile, |
| 1376 | ] |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1377 | } |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1378 | } |
| 1379 | } else { |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1380 | # !is_ios |
| 1381 | |
| 1382 | if (defined(invoker.is_shared_library) && invoker.is_shared_library) { |
| 1383 | shared_library("lib" + target_name) { |
| 1384 | forward_variables_from(invoker, "*", [ "is_shared_library" ]) |
| 1385 | configs += [ ":skia_private" ] |
| 1386 | testonly = true |
| 1387 | } |
| 1388 | } else { |
| 1389 | _executable = target_name |
| 1390 | executable(_executable) { |
Hal Canary | c25f4e9 | 2019-02-26 11:54:25 -0500 | [diff] [blame] | 1391 | check_includes = false |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1392 | forward_variables_from(invoker, "*", [ "is_shared_library" ]) |
| 1393 | configs += [ ":skia_private" ] |
| 1394 | testonly = true |
| 1395 | } |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1396 | } |
Jim Van Verth | 443a913 | 2017-11-28 09:45:26 -0500 | [diff] [blame] | 1397 | if (is_android && skia_android_serial != "" && defined(_executable)) { |
| 1398 | action("push_" + target_name) { |
| 1399 | script = "gn/push_to_android.py" |
| 1400 | deps = [ |
| 1401 | ":" + _executable, |
| 1402 | ] |
| 1403 | _stamp = "$target_gen_dir/$_executable.pushed_$skia_android_serial" |
| 1404 | outputs = [ |
| 1405 | _stamp, |
| 1406 | ] |
| 1407 | args = [ |
| 1408 | rebase_path("$root_build_dir/$_executable"), |
| 1409 | skia_android_serial, |
| 1410 | rebase_path(_stamp), |
| 1411 | ] |
| 1412 | testonly = true |
| 1413 | } |
Mike Klein | 7d92103 | 2017-01-05 12:20:41 -0500 | [diff] [blame] | 1414 | } |
| 1415 | } |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1416 | } |
| 1417 | |
Greg Daniel | da16cce | 2018-08-01 09:23:57 -0400 | [diff] [blame] | 1418 | config("moltenvk_config") { |
| 1419 | if (defined(skia_moltenvk_path) && skia_moltenvk_path != "") { |
| 1420 | if (is_ios) { |
| 1421 | moltenvk_framework_path = "$skia_moltenvk_path/MoltenVK/iOS" |
| 1422 | } else { |
| 1423 | moltenvk_framework_path = "$skia_moltenvk_path/MoltenVK/macOS" |
| 1424 | } |
| 1425 | cflags = [ "-F$moltenvk_framework_path" ] |
| 1426 | ldflags = [ "-F$moltenvk_framework_path" ] |
| 1427 | libs = [ |
| 1428 | "MoltenVK.framework", |
| 1429 | "Metal.framework", |
| 1430 | "IOSurface.framework", |
| 1431 | "QuartzCore.framework", |
| 1432 | "Foundation.framework", |
| 1433 | ] |
| 1434 | if (is_ios) { |
| 1435 | libs += [ "UIKit.framework" ] |
| 1436 | } else { |
| 1437 | libs += [ "IOKit.framework" ] |
| 1438 | } |
| 1439 | defines = [ "SK_MOLTENVK" ] |
| 1440 | } |
| 1441 | } |
| 1442 | |
| 1443 | source_set("moltenvk") { |
| 1444 | public_configs = [ ":moltenvk_config" ] |
| 1445 | } |
| 1446 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1447 | test_lib("gpu_tool_utils") { |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1448 | public_defines = [] |
mtklein | d68f9b0 | 2016-09-23 13:18:41 -0700 | [diff] [blame] | 1449 | |
Mike Klein | 9e25bb9 | 2019-04-29 09:46:36 -0500 | [diff] [blame] | 1450 | # Bots and even devs may not have Vulkan headers, so put |
| 1451 | # include/third_party/vulkan on our path so they're always available. |
| 1452 | all_dependent_configs = [ ":our_vulkan_headers" ] |
| 1453 | |
Mike Klein | 333fb45 | 2019-04-24 08:48:11 -0500 | [diff] [blame] | 1454 | defines = [] |
| 1455 | if (skia_enable_discrete_gpu) { |
| 1456 | defines += [ "SK_ENABLE_DISCRETE_GPU" ] |
| 1457 | } |
| 1458 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1459 | deps = [] |
Greg Daniel | da16cce | 2018-08-01 09:23:57 -0400 | [diff] [blame] | 1460 | public_deps = [] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1461 | sources = [ |
| 1462 | "tools/gpu/GrContextFactory.cpp", |
| 1463 | "tools/gpu/GrTest.cpp", |
Brian Salomon | 00a5eb8 | 2018-07-11 15:32:05 -0400 | [diff] [blame] | 1464 | "tools/gpu/MemoryCache.cpp", |
| 1465 | "tools/gpu/MemoryCache.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1466 | "tools/gpu/ProxyUtils.cpp", |
| 1467 | "tools/gpu/TestContext.cpp", |
Michael Ludwig | d9958f8 | 2019-03-21 13:08:36 -0400 | [diff] [blame] | 1468 | "tools/gpu/YUVUtils.cpp", |
| 1469 | "tools/gpu/YUVUtils.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1470 | "tools/gpu/atlastext/GLTestAtlasTextRenderer.cpp", |
| 1471 | "tools/gpu/gl/GLTestContext.cpp", |
| 1472 | "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1473 | "tools/gpu/mock/MockTestContext.cpp", |
| 1474 | ] |
| 1475 | libs = [] |
| 1476 | |
| 1477 | if (is_android || skia_use_egl) { |
| 1478 | sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ] |
| 1479 | } else if (is_ios) { |
| 1480 | sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ] |
| 1481 | libs += [ "OpenGLES.framework" ] |
| 1482 | } else if (is_linux) { |
| 1483 | sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ] |
Mike Klein | a27f269 | 2018-06-20 11:06:39 -0400 | [diff] [blame] | 1484 | libs += [ |
| 1485 | "GLU", |
| 1486 | "X11", |
| 1487 | ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1488 | } else if (is_mac) { |
| 1489 | sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ] |
| 1490 | } else if (is_win) { |
| 1491 | sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ] |
Brian Osman | 0c75727 | 2018-12-10 10:27:26 -0500 | [diff] [blame] | 1492 | libs += [ "Gdi32.lib" ] |
| 1493 | if (target_cpu != "arm64") { |
| 1494 | libs += [ "OpenGL32.lib" ] |
| 1495 | } |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1496 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1497 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1498 | cflags_objcc = [ "-fobjc-arc" ] |
mtklein | 6ef6999 | 2016-09-14 06:12:09 -0700 | [diff] [blame] | 1499 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1500 | if (skia_use_angle) { |
| 1501 | deps += [ "//third_party/angle2" ] |
| 1502 | sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ] |
| 1503 | } |
Greg Daniel | 54200e4 | 2018-12-11 17:03:39 -0500 | [diff] [blame] | 1504 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1505 | if (skia_use_vulkan) { |
| 1506 | sources += [ "tools/gpu/vk/VkTestContext.cpp" ] |
| 1507 | sources += [ "tools/gpu/vk/VkTestUtils.cpp" ] |
Greg Daniel | da16cce | 2018-08-01 09:23:57 -0400 | [diff] [blame] | 1508 | if (defined(skia_moltenvk_path) && skia_moltenvk_path != "") { |
| 1509 | public_deps += [ ":moltenvk" ] |
| 1510 | } |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1511 | } |
| 1512 | if (skia_use_metal) { |
| 1513 | sources += [ "tools/gpu/mtl/MtlTestContext.mm" ] |
mtklein | a627b5c | 2016-09-20 13:36:47 -0700 | [diff] [blame] | 1514 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1515 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1516 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1517 | test_lib("flags") { |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1518 | sources = [ |
Mike Klein | 88544fb | 2019-03-20 10:50:33 -0500 | [diff] [blame] | 1519 | "tools/flags/CommandLineFlags.cpp", |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1520 | ] |
| 1521 | } |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1522 | |
| 1523 | test_lib("common_flags_config") { |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1524 | sources = [ |
Mike Klein | 88544fb | 2019-03-20 10:50:33 -0500 | [diff] [blame] | 1525 | "tools/flags/CommonFlagsConfig.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1526 | ] |
| 1527 | deps = [ |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1528 | ":flags", |
Greg Daniel | da16cce | 2018-08-01 09:23:57 -0400 | [diff] [blame] | 1529 | ] |
| 1530 | public_deps = [ |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1531 | ":gpu_tool_utils", |
| 1532 | ] |
| 1533 | } |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1534 | test_lib("common_flags_gpu") { |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1535 | sources = [ |
| 1536 | "tools/flags/CommonFlagsGpu.cpp", |
| 1537 | ] |
| 1538 | deps = [ |
| 1539 | ":flags", |
| 1540 | ] |
| 1541 | public_deps = [ |
| 1542 | ":gpu_tool_utils", |
| 1543 | ] |
| 1544 | } |
| 1545 | test_lib("common_flags_images") { |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1546 | sources = [ |
| 1547 | "tools/flags/CommonFlagsImages.cpp", |
| 1548 | ] |
| 1549 | deps = [ |
| 1550 | ":flags", |
| 1551 | ] |
| 1552 | } |
| 1553 | test_lib("common_flags_aa") { |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1554 | sources = [ |
| 1555 | "tools/flags/CommonFlagsAA.cpp", |
| 1556 | ] |
| 1557 | deps = [ |
| 1558 | ":flags", |
| 1559 | ] |
| 1560 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1561 | |
Mike Klein | 499f0ac | 2019-03-25 13:00:12 -0500 | [diff] [blame] | 1562 | test_lib("trace") { |
Mike Klein | 499f0ac | 2019-03-25 13:00:12 -0500 | [diff] [blame] | 1563 | deps = [ |
| 1564 | ":flags", |
| 1565 | ] |
| 1566 | sources = [ |
| 1567 | "tools/trace/ChromeTracingTracer.cpp", |
| 1568 | "tools/trace/ChromeTracingTracer.h", |
| 1569 | "tools/trace/EventTracingPriv.cpp", |
| 1570 | "tools/trace/EventTracingPriv.h", |
| 1571 | "tools/trace/SkDebugfTracer.cpp", |
| 1572 | "tools/trace/SkDebugfTracer.h", |
| 1573 | ] |
| 1574 | } |
| 1575 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1576 | test_lib("tool_utils") { |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1577 | sources = [ |
mtklein | b37c034 | 2016-09-09 11:07:45 -0700 | [diff] [blame] | 1578 | "tools/AndroidSkDebugToStdOut.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1579 | "tools/CrashHandler.cpp", |
Robert Phillips | 9660108 | 2018-05-29 16:13:26 -0400 | [diff] [blame] | 1580 | "tools/DDLPromiseImageHelper.cpp", |
| 1581 | "tools/DDLTileHelper.cpp", |
mtklein | 0590fa5 | 2016-09-01 07:06:54 -0700 | [diff] [blame] | 1582 | "tools/LsanSuppressions.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1583 | "tools/ProcStats.cpp", |
| 1584 | "tools/Resources.cpp", |
Mike Klein | ea3f014 | 2019-03-20 11:12:10 -0500 | [diff] [blame] | 1585 | "tools/ToolUtils.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1586 | "tools/UrlDataManager.cpp", |
Mike Klein | 8f4e224 | 2019-03-20 11:59:00 -0500 | [diff] [blame] | 1587 | "tools/debugger/DebugCanvas.cpp", |
| 1588 | "tools/debugger/DrawCommand.cpp", |
| 1589 | "tools/debugger/JsonWriteBuffer.cpp", |
Mike Klein | 0cffcbf9 | 2019-03-20 11:08:46 -0500 | [diff] [blame] | 1590 | "tools/fonts/RandomScalerContext.cpp", |
| 1591 | "tools/fonts/TestEmptyTypeface.h", |
| 1592 | "tools/fonts/TestFontMgr.cpp", |
| 1593 | "tools/fonts/TestFontMgr.h", |
| 1594 | "tools/fonts/TestSVGTypeface.cpp", |
| 1595 | "tools/fonts/TestSVGTypeface.h", |
| 1596 | "tools/fonts/TestTypeface.cpp", |
| 1597 | "tools/fonts/TestTypeface.h", |
Mike Klein | ea3f014 | 2019-03-20 11:12:10 -0500 | [diff] [blame] | 1598 | "tools/fonts/ToolUtilsFont.cpp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1599 | "tools/random_parse_path.cpp", |
Mike Klein | cd5104e | 2019-03-20 11:55:08 -0500 | [diff] [blame] | 1600 | "tools/timer/AnimTimer.h", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1601 | "tools/timer/Timer.cpp", |
| 1602 | ] |
Mike Klein | adacaef | 2017-02-06 09:26:14 -0500 | [diff] [blame] | 1603 | libs = [] |
| 1604 | if (is_ios) { |
| 1605 | sources += [ "tools/ios_utils.m" ] |
| 1606 | libs += [ "Foundation.framework" ] |
Mike Klein | bf15b66 | 2019-04-15 11:32:16 -0500 | [diff] [blame] | 1607 | } else if (is_win) { |
| 1608 | libs += [ "DbgHelp.lib" ] |
Mike Klein | adacaef | 2017-02-06 09:26:14 -0500 | [diff] [blame] | 1609 | } |
Mike Klein | bf15b66 | 2019-04-15 11:32:16 -0500 | [diff] [blame] | 1610 | |
Hal Canary | fd9bcab | 2018-04-24 11:47:23 -0400 | [diff] [blame] | 1611 | defines = [] |
| 1612 | if (skia_tools_require_resources) { |
| 1613 | defines += [ "SK_TOOLS_REQUIRE_RESOURCES" ] |
| 1614 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1615 | deps = [ |
Ben Wagner | 97182cc | 2018-02-15 10:20:04 -0500 | [diff] [blame] | 1616 | ":experimental_svg_model", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1617 | ":flags", |
Mike Klein | e4ad58a | 2019-03-26 09:05:52 -0500 | [diff] [blame] | 1618 | ] |
| 1619 | public_deps = [ |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1620 | ":gpu_tool_utils", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1621 | ] |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1622 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1623 | |
Mike Klein | e11e5c1 | 2019-04-24 12:46:06 -0500 | [diff] [blame] | 1624 | test_lib("etc1") { |
| 1625 | sources = [ |
| 1626 | "third_party/etc1/etc1.cpp", |
| 1627 | ] |
| 1628 | } |
| 1629 | |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1630 | import("gn/gm.gni") |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1631 | test_lib("gm") { |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1632 | sources = gm_sources |
| 1633 | deps = [ |
Mike Klein | e11e5c1 | 2019-04-24 12:46:06 -0500 | [diff] [blame] | 1634 | ":etc1", |
scroggo | 19b9153 | 2016-10-24 09:03:26 -0700 | [diff] [blame] | 1635 | ":flags", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1636 | ":skia", |
| 1637 | ":tool_utils", |
Mike Reed | 2f0edd5 | 2018-05-31 14:22:30 -0400 | [diff] [blame] | 1638 | "modules/skottie", |
Florin Malita | 2687072 | 2018-09-20 14:35:30 -0400 | [diff] [blame] | 1639 | "modules/skottie:gm", |
Florin Malita | 3b526b0 | 2018-05-25 12:43:51 -0400 | [diff] [blame] | 1640 | "modules/sksg", |
Brian Osman | c725e8f | 2019-04-10 14:08:44 -0400 | [diff] [blame] | 1641 | "modules/skshaper", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1642 | ] |
Greg Daniel | da16cce | 2018-08-01 09:23:57 -0400 | [diff] [blame] | 1643 | public_deps = [ |
| 1644 | ":gpu_tool_utils", |
| 1645 | ] |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1646 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 1647 | |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1648 | import("gn/tests.gni") |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1649 | test_lib("tests") { |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1650 | sources = tests_sources + pathops_tests_sources |
Leon Scroggins III | be85c19 | 2018-11-13 13:50:12 -0500 | [diff] [blame] | 1651 | if (!skia_enable_fontmgr_android) { |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1652 | sources -= [ "//tests/FontMgrAndroidParserTest.cpp" ] |
mtklein | a45be61 | 2016-08-29 15:22:10 -0700 | [diff] [blame] | 1653 | } |
Ben Wagner | 37a06c0 | 2018-06-22 21:11:00 +0000 | [diff] [blame] | 1654 | if (!(skia_use_freetype && skia_use_fontconfig)) { |
| 1655 | sources -= [ "//tests/FontMgrFontConfigTest.cpp" ] |
| 1656 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1657 | deps = [ |
Hal Canary | 0f66681 | 2018-03-22 15:21:12 -0400 | [diff] [blame] | 1658 | ":experimental_svg_model", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1659 | ":flags", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1660 | ":skia", |
| 1661 | ":tool_utils", |
Florin Malita | 94d4d3e | 2018-06-18 13:10:51 -0400 | [diff] [blame] | 1662 | "modules/skottie:tests", |
Brian Osman | ccb8752 | 2018-06-01 19:20:00 +0000 | [diff] [blame] | 1663 | "modules/sksg:tests", |
Brian Osman | c725e8f | 2019-04-10 14:08:44 -0400 | [diff] [blame] | 1664 | "modules/skshaper", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1665 | "//third_party/libpng", |
Leon Scroggins III | 194580d | 2019-02-22 12:32:16 -0500 | [diff] [blame] | 1666 | "//third_party/libwebp", |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1667 | "//third_party/zlib", |
| 1668 | ] |
Mike Klein | d63442d | 2017-03-27 14:16:04 -0400 | [diff] [blame] | 1669 | public_deps = [ |
| 1670 | ":gpu_tool_utils", # Test.h #includes headers from this target. |
| 1671 | ] |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1672 | } |
mtklein | 2f3416d | 2016-08-02 16:02:05 -0700 | [diff] [blame] | 1673 | |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 1674 | import("gn/bench.gni") |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1675 | test_lib("bench") { |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1676 | sources = bench_sources |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1677 | deps = [ |
| 1678 | ":flags", |
| 1679 | ":gm", |
| 1680 | ":gpu_tool_utils", |
| 1681 | ":skia", |
| 1682 | ":tool_utils", |
| 1683 | ] |
| 1684 | } |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 1685 | |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1686 | test_lib("experimental_svg_model") { |
Hal Canary | 0f66681 | 2018-03-22 15:21:12 -0400 | [diff] [blame] | 1687 | if (skia_use_expat) { |
Hal Canary | 0f66681 | 2018-03-22 15:21:12 -0400 | [diff] [blame] | 1688 | sources = [ |
| 1689 | "experimental/svg/model/SkSVGAttribute.cpp", |
| 1690 | "experimental/svg/model/SkSVGAttributeParser.cpp", |
| 1691 | "experimental/svg/model/SkSVGCircle.cpp", |
| 1692 | "experimental/svg/model/SkSVGClipPath.cpp", |
| 1693 | "experimental/svg/model/SkSVGContainer.cpp", |
| 1694 | "experimental/svg/model/SkSVGDOM.cpp", |
| 1695 | "experimental/svg/model/SkSVGEllipse.cpp", |
| 1696 | "experimental/svg/model/SkSVGGradient.cpp", |
| 1697 | "experimental/svg/model/SkSVGLine.cpp", |
| 1698 | "experimental/svg/model/SkSVGLinearGradient.cpp", |
| 1699 | "experimental/svg/model/SkSVGNode.cpp", |
| 1700 | "experimental/svg/model/SkSVGPath.cpp", |
| 1701 | "experimental/svg/model/SkSVGPattern.cpp", |
| 1702 | "experimental/svg/model/SkSVGPoly.cpp", |
| 1703 | "experimental/svg/model/SkSVGRadialGradient.cpp", |
| 1704 | "experimental/svg/model/SkSVGRect.cpp", |
| 1705 | "experimental/svg/model/SkSVGRenderContext.cpp", |
| 1706 | "experimental/svg/model/SkSVGSVG.cpp", |
| 1707 | "experimental/svg/model/SkSVGShape.cpp", |
| 1708 | "experimental/svg/model/SkSVGStop.cpp", |
| 1709 | "experimental/svg/model/SkSVGTransformableNode.cpp", |
| 1710 | "experimental/svg/model/SkSVGUse.cpp", |
| 1711 | "experimental/svg/model/SkSVGValue.cpp", |
| 1712 | ] |
| 1713 | deps = [ |
| 1714 | ":skia", |
| 1715 | ":xml", |
| 1716 | ] |
| 1717 | } |
mtklein | c095df5 | 2016-08-24 12:23:52 -0700 | [diff] [blame] | 1718 | } |
fmalita | a2b9fdf | 2016-08-03 19:53:36 -0700 | [diff] [blame] | 1719 | |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1720 | if (skia_use_lua) { |
| 1721 | test_lib("lua") { |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1722 | sources = [ |
| 1723 | "src/utils/SkLua.cpp", |
| 1724 | "src/utils/SkLuaCanvas.cpp", |
| 1725 | ] |
| 1726 | deps = [ |
Herb Derby | 264182c | 2018-05-29 15:53:40 -0400 | [diff] [blame] | 1727 | "modules/skshaper", |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1728 | "//third_party/lua", |
| 1729 | ] |
| 1730 | } |
| 1731 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1732 | test_app("lua_app") { |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1733 | sources = [ |
| 1734 | "tools/lua/lua_app.cpp", |
| 1735 | ] |
| 1736 | deps = [ |
| 1737 | ":lua", |
| 1738 | ":skia", |
| 1739 | "//third_party/lua", |
| 1740 | ] |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1741 | } |
| 1742 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1743 | test_app("lua_pictures") { |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1744 | sources = [ |
| 1745 | "tools/lua/lua_pictures.cpp", |
| 1746 | ] |
| 1747 | deps = [ |
| 1748 | ":flags", |
| 1749 | ":lua", |
| 1750 | ":skia", |
| 1751 | ":tool_utils", |
| 1752 | "//third_party/lua", |
| 1753 | ] |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1754 | } |
| 1755 | } |
| 1756 | |
Florin Malita | bfe876a | 2018-09-02 12:33:59 -0400 | [diff] [blame] | 1757 | if (is_linux || is_mac) { |
Florin Malita | 79725d3 | 2018-06-05 16:16:57 -0400 | [diff] [blame] | 1758 | test_app("skottie_tool") { |
| 1759 | deps = [ |
| 1760 | "modules/skottie:tool", |
| 1761 | ] |
| 1762 | } |
| 1763 | } |
| 1764 | |
Hal Canary | 5b39dc8 | 2019-04-17 13:29:46 -0400 | [diff] [blame] | 1765 | test_app("make_skqp_model") { |
| 1766 | sources = [ |
| 1767 | "tools/skqp/make_skqp_model.cpp", |
| 1768 | ] |
| 1769 | deps = [ |
| 1770 | ":skia", |
| 1771 | ] |
| 1772 | } |
| 1773 | |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1774 | if (target_cpu != "wasm") { |
| 1775 | import("gn/samples.gni") |
| 1776 | test_lib("samples") { |
Yuqian Li | 56a4a09 | 2018-02-12 14:47:34 +0800 | [diff] [blame] | 1777 | sources = samples_sources |
Ben Wagner | b2c4ea6 | 2018-08-08 11:36:17 -0400 | [diff] [blame] | 1778 | public_deps = [ |
| 1779 | ":tool_utils", |
| 1780 | ] |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1781 | deps = [ |
| 1782 | ":experimental_svg_model", |
| 1783 | ":flags", |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1784 | ":gpu_tool_utils", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1785 | ":xml", |
Mike Reed | ec80d90 | 2019-02-12 11:31:27 -0500 | [diff] [blame] | 1786 | "modules/sksg", |
Herb Derby | 264182c | 2018-05-29 15:53:40 -0400 | [diff] [blame] | 1787 | "modules/skshaper", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1788 | ] |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1789 | |
Ruiqi Mao | f510149 | 2018-06-29 14:32:21 -0400 | [diff] [blame] | 1790 | # NIMA does not build on Windows clang |
| 1791 | if (!is_win || !is_clang) { |
Kevin Lubick | d969932 | 2018-10-30 15:08:53 -0400 | [diff] [blame] | 1792 | sources += [ "experimental/nima/NimaActor.cpp" ] |
Ruiqi Mao | f510149 | 2018-06-29 14:32:21 -0400 | [diff] [blame] | 1793 | deps += [ "//third_party/Nima-Cpp" ] |
| 1794 | } |
| 1795 | |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1796 | if (skia_use_lua) { |
| 1797 | sources += [ "samplecode/SampleLua.cpp" ] |
| 1798 | deps += [ |
| 1799 | ":lua", |
| 1800 | "//third_party/lua", |
| 1801 | ] |
| 1802 | } |
| 1803 | } |
Mike Klein | 7af351a | 2018-07-27 09:54:43 -0400 | [diff] [blame] | 1804 | test_app("imgcvt") { |
| 1805 | sources = [ |
| 1806 | "tools/imgcvt.cpp", |
| 1807 | ] |
| 1808 | deps = [ |
| 1809 | ":skcms", |
| 1810 | ":skia", |
| 1811 | ] |
| 1812 | } |
Mike Klein | 735c7ba | 2019-03-25 12:57:58 -0500 | [diff] [blame] | 1813 | test_lib("hash_and_encode") { |
Mike Klein | 735c7ba | 2019-03-25 12:57:58 -0500 | [diff] [blame] | 1814 | sources = [ |
| 1815 | "tools/HashAndEncode.cpp", |
| 1816 | "tools/HashAndEncode.h", |
| 1817 | ] |
| 1818 | deps = [ |
| 1819 | ":flags", |
| 1820 | ":skia", |
| 1821 | "//third_party/libpng", |
| 1822 | ] |
| 1823 | } |
| 1824 | test_app("fm") { |
| 1825 | sources = [ |
| 1826 | "tools/fm/fm.cpp", |
| 1827 | ] |
| 1828 | deps = [ |
| 1829 | ":common_flags_aa", |
| 1830 | ":common_flags_gpu", |
Mike Klein | 6253d90 | 2019-03-27 15:09:12 -0500 | [diff] [blame] | 1831 | ":experimental_svg_model", |
Mike Klein | 735c7ba | 2019-03-25 12:57:58 -0500 | [diff] [blame] | 1832 | ":flags", |
| 1833 | ":gm", |
| 1834 | ":gpu_tool_utils", |
| 1835 | ":hash_and_encode", |
| 1836 | ":skia", |
| 1837 | ":tool_utils", |
| 1838 | ":trace", |
Mike Klein | 2292426 | 2019-04-02 14:14:56 -0400 | [diff] [blame] | 1839 | "modules/skottie", |
| 1840 | "modules/skottie:utils", |
Mike Klein | 735c7ba | 2019-03-25 12:57:58 -0500 | [diff] [blame] | 1841 | ] |
| 1842 | } |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1843 | test_app("dm") { |
| 1844 | sources = [ |
| 1845 | "dm/DM.cpp", |
Hal Canary | b6c5e5b | 2017-10-09 16:13:02 -0400 | [diff] [blame] | 1846 | "dm/DMGpuTestProcs.cpp", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1847 | "dm/DMJsonWriter.cpp", |
| 1848 | "dm/DMSrcSink.cpp", |
| 1849 | ] |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1850 | deps = [ |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1851 | ":common_flags_aa", |
| 1852 | ":common_flags_config", |
| 1853 | ":common_flags_gpu", |
| 1854 | ":common_flags_images", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1855 | ":experimental_svg_model", |
| 1856 | ":flags", |
| 1857 | ":gm", |
| 1858 | ":gpu_tool_utils", |
Mike Klein | 735c7ba | 2019-03-25 12:57:58 -0500 | [diff] [blame] | 1859 | ":hash_and_encode", |
Kevin Lubick | ebf648e | 2017-09-21 13:45:16 -0400 | [diff] [blame] | 1860 | ":skia", |
| 1861 | ":tests", |
| 1862 | ":tool_utils", |
Mike Klein | 499f0ac | 2019-03-25 13:00:12 -0500 | [diff] [blame] | 1863 | ":trace", |
Florin Malita | 3d856bd | 2018-05-26 09:49:28 -0400 | [diff] [blame] | 1864 | "modules/skottie", |
Florin Malita | a831655 | 2018-11-09 16:19:44 -0500 | [diff] [blame] | 1865 | "modules/skottie:utils", |
Florin Malita | 3b526b0 | 2018-05-25 12:43:51 -0400 | [diff] [blame] | 1866 | "modules/sksg", |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1867 | ] |
Ruiqi Mao | f510149 | 2018-06-29 14:32:21 -0400 | [diff] [blame] | 1868 | |
| 1869 | # NIMA does not build on Windows clang |
| 1870 | if (!is_win || !is_clang) { |
| 1871 | deps += [ "//third_party/Nima-Cpp" ] |
| 1872 | } |
Mike Klein | 38af943 | 2016-11-11 11:39:44 -0500 | [diff] [blame] | 1873 | } |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 1874 | } |
| 1875 | |
Mike Klein | a8a51ce | 2018-01-09 12:34:11 -0500 | [diff] [blame] | 1876 | if (!is_win) { |
| 1877 | test_app("remote_demo") { |
| 1878 | sources = [ |
| 1879 | "tools/remote_demo.cpp", |
| 1880 | ] |
| 1881 | deps = [ |
| 1882 | ":skia", |
| 1883 | ] |
| 1884 | } |
| 1885 | } |
| 1886 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1887 | test_app("nanobench") { |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 1888 | sources = [ |
| 1889 | "bench/nanobench.cpp", |
| 1890 | ] |
| 1891 | deps = [ |
| 1892 | ":bench", |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1893 | ":common_flags_aa", |
| 1894 | ":common_flags_config", |
| 1895 | ":common_flags_gpu", |
| 1896 | ":common_flags_images", |
fmalita | 6519c21 | 2016-09-14 08:05:17 -0700 | [diff] [blame] | 1897 | ":experimental_svg_model", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 1898 | ":flags", |
| 1899 | ":gm", |
| 1900 | ":gpu_tool_utils", |
| 1901 | ":skia", |
| 1902 | ":tool_utils", |
Mike Klein | 499f0ac | 2019-03-25 13:00:12 -0500 | [diff] [blame] | 1903 | ":trace", |
Florin Malita | 3b526b0 | 2018-05-25 12:43:51 -0400 | [diff] [blame] | 1904 | "modules/sksg", |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 1905 | ] |
mtklein | 2b6870c | 2016-07-28 14:17:33 -0700 | [diff] [blame] | 1906 | } |
halcanary | 19a9720 | 2016-08-03 15:08:04 -0700 | [diff] [blame] | 1907 | |
Ravi Mistry | 10d36c5 | 2017-01-31 09:49:18 -0500 | [diff] [blame] | 1908 | test_app("skpinfo") { |
| 1909 | sources = [ |
| 1910 | "tools/skpinfo.cpp", |
| 1911 | ] |
| 1912 | deps = [ |
| 1913 | ":flags", |
| 1914 | ":skia", |
| 1915 | ] |
| 1916 | } |
| 1917 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1918 | test_app("skpbench") { |
| 1919 | sources = [ |
| 1920 | "tools/skpbench/skpbench.cpp", |
| 1921 | ] |
| 1922 | deps = [ |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 1923 | ":common_flags_config", |
| 1924 | ":common_flags_gpu", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 1925 | ":flags", |
| 1926 | ":gpu_tool_utils", |
| 1927 | ":skia", |
| 1928 | ":tool_utils", |
| 1929 | ] |
csmartdalton | 4b5179b | 2016-09-19 11:03:58 -0700 | [diff] [blame] | 1930 | } |
| 1931 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1932 | test_app("sktexttopdf") { |
halcanary | 3eee9d9 | 2016-09-10 07:01:53 -0700 | [diff] [blame] | 1933 | sources = [ |
Herb Derby | 264182c | 2018-05-29 15:53:40 -0400 | [diff] [blame] | 1934 | "tools/using_skia_and_harfbuzz.cpp", |
halcanary | 3eee9d9 | 2016-09-10 07:01:53 -0700 | [diff] [blame] | 1935 | ] |
| 1936 | deps = [ |
| 1937 | ":skia", |
Herb Derby | 264182c | 2018-05-29 15:53:40 -0400 | [diff] [blame] | 1938 | "modules/skshaper", |
halcanary | 3eee9d9 | 2016-09-10 07:01:53 -0700 | [diff] [blame] | 1939 | ] |
halcanary | 3eee9d9 | 2016-09-10 07:01:53 -0700 | [diff] [blame] | 1940 | } |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1941 | |
Ben Wagner | 219f362 | 2017-07-17 15:32:25 -0400 | [diff] [blame] | 1942 | test_app("create_test_font") { |
| 1943 | sources = [ |
Ben Wagner | 483c772 | 2018-02-20 17:06:07 -0500 | [diff] [blame] | 1944 | "tools/fonts/create_test_font.cpp", |
Ben Wagner | 219f362 | 2017-07-17 15:32:25 -0400 | [diff] [blame] | 1945 | ] |
| 1946 | deps = [ |
| 1947 | ":skia", |
| 1948 | ] |
| 1949 | assert_no_deps = [ |
| 1950 | # tool_utils requires the output of this app. |
| 1951 | ":tool_utils", |
| 1952 | ] |
| 1953 | } |
| 1954 | |
Florin Malita | 5d3ff43 | 2018-07-31 16:38:43 -0400 | [diff] [blame] | 1955 | if (skia_use_expat) { |
| 1956 | test_app("create_test_font_color") { |
| 1957 | sources = [ |
| 1958 | "tools/fonts/create_test_font_color.cpp", |
| 1959 | ] |
| 1960 | deps = [ |
| 1961 | ":flags", |
| 1962 | ":skia", |
| 1963 | ":tool_utils", |
| 1964 | ] |
| 1965 | } |
Ben Wagner | 97182cc | 2018-02-15 10:20:04 -0500 | [diff] [blame] | 1966 | } |
| 1967 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1968 | test_app("get_images_from_skps") { |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1969 | sources = [ |
| 1970 | "tools/get_images_from_skps.cpp", |
| 1971 | ] |
| 1972 | deps = [ |
| 1973 | ":flags", |
| 1974 | ":skia", |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1975 | ] |
mtklein | 046cb56 | 2016-09-16 10:23:12 -0700 | [diff] [blame] | 1976 | } |
mtklein | ecbc526 | 2016-09-22 11:51:24 -0700 | [diff] [blame] | 1977 | |
Brian Osman | 6788a54 | 2018-12-10 11:56:01 -0500 | [diff] [blame] | 1978 | if (!is_ios && target_cpu != "wasm" && !(is_win && target_cpu == "arm64")) { |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 1979 | test_app("skiaserve") { |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1980 | sources = [ |
| 1981 | "tools/skiaserve/Request.cpp", |
| 1982 | "tools/skiaserve/Response.cpp", |
| 1983 | "tools/skiaserve/skiaserve.cpp", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1984 | "tools/skiaserve/urlhandlers/BreakHandler.cpp", |
| 1985 | "tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp", |
| 1986 | "tools/skiaserve/urlhandlers/CmdHandler.cpp", |
| 1987 | "tools/skiaserve/urlhandlers/ColorModeHandler.cpp", |
| 1988 | "tools/skiaserve/urlhandlers/DataHandler.cpp", |
| 1989 | "tools/skiaserve/urlhandlers/DownloadHandler.cpp", |
| 1990 | "tools/skiaserve/urlhandlers/EnableGPUHandler.cpp", |
| 1991 | "tools/skiaserve/urlhandlers/ImgHandler.cpp", |
| 1992 | "tools/skiaserve/urlhandlers/InfoHandler.cpp", |
Brian Salomon | 144a5c5 | 2016-12-20 16:48:59 -0500 | [diff] [blame] | 1993 | "tools/skiaserve/urlhandlers/OpBoundsHandler.cpp", |
| 1994 | "tools/skiaserve/urlhandlers/OpsHandler.cpp", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 1995 | "tools/skiaserve/urlhandlers/OverdrawHandler.cpp", |
| 1996 | "tools/skiaserve/urlhandlers/PostHandler.cpp", |
| 1997 | "tools/skiaserve/urlhandlers/QuitHandler.cpp", |
| 1998 | "tools/skiaserve/urlhandlers/RootHandler.cpp", |
| 1999 | ] |
| 2000 | deps = [ |
| 2001 | ":flags", |
| 2002 | ":gpu_tool_utils", |
| 2003 | ":skia", |
| 2004 | ":tool_utils", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 2005 | "//third_party/libmicrohttpd", |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 2006 | ] |
Mike Klein | 7d30288 | 2016-11-03 14:06:31 -0400 | [diff] [blame] | 2007 | } |
mtklein | ecbc526 | 2016-09-22 11:51:24 -0700 | [diff] [blame] | 2008 | } |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2009 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2010 | test_app("fuzz") { |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2011 | sources = [ |
Kevin Lubick | bc9a1a8 | 2018-09-17 14:46:57 -0400 | [diff] [blame] | 2012 | "fuzz/Fuzz.cpp", |
Hal Canary | 24ac42b | 2017-02-14 13:35:14 -0500 | [diff] [blame] | 2013 | "fuzz/FuzzCanvas.cpp", |
Cary Clark | 91390c8 | 2018-03-09 14:02:46 -0500 | [diff] [blame] | 2014 | "fuzz/FuzzCommon.cpp", |
Kevin Lubick | fec1dea | 2016-11-22 13:57:18 -0500 | [diff] [blame] | 2015 | "fuzz/FuzzDrawFunctions.cpp", |
Kevin Lubick | e4be55d | 2018-03-30 15:05:13 -0400 | [diff] [blame] | 2016 | "fuzz/FuzzEncoders.cpp", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2017 | "fuzz/FuzzGradients.cpp", |
Kevin Lubick | bc9a1a8 | 2018-09-17 14:46:57 -0400 | [diff] [blame] | 2018 | "fuzz/FuzzMain.cpp", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2019 | "fuzz/FuzzParsePath.cpp", |
Cary Clark | 91390c8 | 2018-03-09 14:02:46 -0500 | [diff] [blame] | 2020 | "fuzz/FuzzPathMeasure.cpp", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2021 | "fuzz/FuzzPathop.cpp", |
Jim Van Verth | 061cc21 | 2018-07-11 14:09:09 -0400 | [diff] [blame] | 2022 | "fuzz/FuzzPolyUtils.cpp", |
Hal Canary | 13872dd | 2018-04-06 10:25:12 -0400 | [diff] [blame] | 2023 | "fuzz/FuzzRegionOp.cpp", |
Leon Scroggins III | 0b8fcbc | 2018-10-16 15:52:17 -0400 | [diff] [blame] | 2024 | "fuzz/oss_fuzz/FuzzAndroidCodec.cpp", |
Kevin Lubick | 2416f96 | 2018-02-12 08:26:39 -0500 | [diff] [blame] | 2025 | "fuzz/oss_fuzz/FuzzAnimatedImage.cpp", |
| 2026 | "fuzz/oss_fuzz/FuzzImage.cpp", |
Kevin Lubick | f034d11 | 2018-02-08 14:31:24 -0500 | [diff] [blame] | 2027 | "fuzz/oss_fuzz/FuzzImageFilterDeserialize.cpp", |
Leon Scroggins III | 0b8fcbc | 2018-10-16 15:52:17 -0400 | [diff] [blame] | 2028 | "fuzz/oss_fuzz/FuzzIncrementalImage.cpp", |
Florin Malita | 80452be | 2018-06-19 11:27:20 -0400 | [diff] [blame] | 2029 | "fuzz/oss_fuzz/FuzzJSON.cpp", |
Kevin Lubick | f034d11 | 2018-02-08 14:31:24 -0500 | [diff] [blame] | 2030 | "fuzz/oss_fuzz/FuzzPathDeserialize.cpp", |
Kevin Lubick | 2541edf | 2018-01-11 10:27:14 -0500 | [diff] [blame] | 2031 | "fuzz/oss_fuzz/FuzzRegionDeserialize.cpp", |
| 2032 | "fuzz/oss_fuzz/FuzzRegionSetPath.cpp", |
Kevin Lubick | e9c1ce8 | 2019-03-11 11:09:40 -0400 | [diff] [blame] | 2033 | "fuzz/oss_fuzz/FuzzSKSL2GLSL.cpp", |
| 2034 | "fuzz/oss_fuzz/FuzzSKSL2Metal.cpp", |
Kevin Lubick | 0f0a710 | 2019-03-18 16:20:55 -0400 | [diff] [blame] | 2035 | "fuzz/oss_fuzz/FuzzSKSL2Pipeline.cpp", |
Kevin Lubick | e9c1ce8 | 2019-03-11 11:09:40 -0400 | [diff] [blame] | 2036 | "fuzz/oss_fuzz/FuzzSKSL2SPIRV.cpp", |
Kevin Lubick | f034d11 | 2018-02-08 14:31:24 -0500 | [diff] [blame] | 2037 | "fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp", |
Kevin Lubick | 9ff5dc9 | 2018-01-09 12:47:33 -0500 | [diff] [blame] | 2038 | "tools/UrlDataManager.cpp", |
Mike Klein | 8f4e224 | 2019-03-20 11:59:00 -0500 | [diff] [blame] | 2039 | "tools/debugger/DebugCanvas.cpp", |
| 2040 | "tools/debugger/DrawCommand.cpp", |
| 2041 | "tools/debugger/JsonWriteBuffer.cpp", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2042 | ] |
| 2043 | deps = [ |
| 2044 | ":flags", |
Hal Canary | 44801ca | 2017-03-15 11:39:06 -0400 | [diff] [blame] | 2045 | ":gpu_tool_utils", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2046 | ":skia", |
Florin Malita | 3d856bd | 2018-05-26 09:49:28 -0400 | [diff] [blame] | 2047 | "modules/skottie:fuzz", |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2048 | ] |
kjlubick | 14f984b | 2016-10-03 11:49:45 -0700 | [diff] [blame] | 2049 | } |
Mike Klein | 3831242 | 2016-10-05 15:41:01 -0400 | [diff] [blame] | 2050 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2051 | test_app("pathops_unittest") { |
Mike Klein | 6e74412 | 2016-10-27 12:21:40 -0400 | [diff] [blame] | 2052 | sources = pathops_tests_sources + [ |
Mike Klein | 6e55fef | 2016-10-26 11:41:47 -0400 | [diff] [blame] | 2053 | rebase_path("tests/skia_test.cpp"), |
| 2054 | rebase_path("tests/Test.cpp"), |
| 2055 | ] |
caryclark | 9feb632 | 2016-10-25 08:58:26 -0700 | [diff] [blame] | 2056 | deps = [ |
| 2057 | ":flags", |
| 2058 | ":gpu_tool_utils", |
| 2059 | ":skia", |
| 2060 | ":tool_utils", |
| 2061 | ] |
caryclark | 9feb632 | 2016-10-25 08:58:26 -0700 | [diff] [blame] | 2062 | } |
| 2063 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2064 | test_app("dump_record") { |
Mike Klein | 3831242 | 2016-10-05 15:41:01 -0400 | [diff] [blame] | 2065 | sources = [ |
| 2066 | "tools/DumpRecord.cpp", |
| 2067 | "tools/dump_record.cpp", |
| 2068 | ] |
| 2069 | deps = [ |
| 2070 | ":flags", |
| 2071 | ":skia", |
| 2072 | ] |
Mike Klein | 3831242 | 2016-10-05 15:41:01 -0400 | [diff] [blame] | 2073 | } |
bungeman | fe91727 | 2016-10-13 17:36:40 -0400 | [diff] [blame] | 2074 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2075 | test_app("skdiff") { |
bungeman | fe91727 | 2016-10-13 17:36:40 -0400 | [diff] [blame] | 2076 | sources = [ |
| 2077 | "tools/skdiff/skdiff.cpp", |
| 2078 | "tools/skdiff/skdiff_html.cpp", |
| 2079 | "tools/skdiff/skdiff_main.cpp", |
| 2080 | "tools/skdiff/skdiff_utils.cpp", |
| 2081 | ] |
| 2082 | deps = [ |
| 2083 | ":skia", |
| 2084 | ":tool_utils", |
| 2085 | ] |
bungeman | fe91727 | 2016-10-13 17:36:40 -0400 | [diff] [blame] | 2086 | } |
halcanary | a73d76a | 2016-10-17 13:19:02 -0700 | [diff] [blame] | 2087 | |
Mike Klein | e6682eb | 2017-01-05 10:54:57 -0500 | [diff] [blame] | 2088 | test_app("skp_parser") { |
halcanary | a73d76a | 2016-10-17 13:19:02 -0700 | [diff] [blame] | 2089 | sources = [ |
| 2090 | "tools/skp_parser.cpp", |
| 2091 | ] |
| 2092 | deps = [ |
| 2093 | ":skia", |
| 2094 | ":tool_utils", |
halcanary | a73d76a | 2016-10-17 13:19:02 -0700 | [diff] [blame] | 2095 | ] |
halcanary | a73d76a | 2016-10-17 13:19:02 -0700 | [diff] [blame] | 2096 | } |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 2097 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2098 | if (!is_win) { |
Hal Canary | d7b3845 | 2017-12-11 17:46:26 -0500 | [diff] [blame] | 2099 | test_lib("skqp_lib") { |
Hal Canary | 0e07ad7 | 2018-02-08 13:06:56 -0500 | [diff] [blame] | 2100 | defines = |
| 2101 | [ "SK_SKQP_GLOBAL_ERROR_TOLERANCE=$skia_skqp_global_error_tolerance" ] |
Hal Canary | 7542713 | 2017-10-11 16:00:31 -0400 | [diff] [blame] | 2102 | sources = [ |
| 2103 | "dm/DMGpuTestProcs.cpp", |
Hal Canary | ac7f23c | 2018-11-26 14:07:41 -0500 | [diff] [blame] | 2104 | "tools/skqp/src/skqp.cpp", |
| 2105 | "tools/skqp/src/skqp_model.cpp", |
Hal Canary | 7542713 | 2017-10-11 16:00:31 -0400 | [diff] [blame] | 2106 | ] |
| 2107 | deps = [ |
| 2108 | ":gm", |
| 2109 | ":gpu_tool_utils", |
| 2110 | ":skia", |
| 2111 | ":tests", |
Hal Canary | d7b3845 | 2017-12-11 17:46:26 -0500 | [diff] [blame] | 2112 | ":tool_utils", |
| 2113 | ] |
| 2114 | } |
| 2115 | test_app("skqp") { |
| 2116 | sources = [ |
Hal Canary | ac7f23c | 2018-11-26 14:07:41 -0500 | [diff] [blame] | 2117 | "tools/skqp/src/skqp_main.cpp", |
Hal Canary | d7b3845 | 2017-12-11 17:46:26 -0500 | [diff] [blame] | 2118 | ] |
| 2119 | deps = [ |
| 2120 | ":skia", |
| 2121 | ":skqp_lib", |
Hal Canary | 537d9c0 | 2018-01-30 11:30:48 -0500 | [diff] [blame] | 2122 | ":tool_utils", |
Hal Canary | ac7f23c | 2018-11-26 14:07:41 -0500 | [diff] [blame] | 2123 | ] |
| 2124 | } |
| 2125 | test_app("jitter_gms") { |
| 2126 | sources = [ |
| 2127 | "tools/skqp/jitter_gms.cpp", |
| 2128 | ] |
| 2129 | deps = [ |
| 2130 | ":gm", |
| 2131 | ":skia", |
| 2132 | ":skqp_lib", |
Hal Canary | 7542713 | 2017-10-11 16:00:31 -0400 | [diff] [blame] | 2133 | ] |
| 2134 | } |
| 2135 | } |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2136 | if (is_android) { |
Hal Canary | 28f8938 | 2017-12-12 09:42:14 -0500 | [diff] [blame] | 2137 | test_app("skqp_app") { |
| 2138 | is_shared_library = true |
| 2139 | sources = [ |
Hal Canary | ac7f23c | 2018-11-26 14:07:41 -0500 | [diff] [blame] | 2140 | "tools/skqp/src/jni_skqp.cpp", |
Hal Canary | 28f8938 | 2017-12-12 09:42:14 -0500 | [diff] [blame] | 2141 | ] |
| 2142 | deps = [ |
| 2143 | ":skia", |
| 2144 | ":skqp_lib", |
Hal Canary | b4d01a9 | 2018-01-29 13:10:08 -0500 | [diff] [blame] | 2145 | ":tool_utils", |
Hal Canary | 28f8938 | 2017-12-12 09:42:14 -0500 | [diff] [blame] | 2146 | ] |
| 2147 | libs = [ "android" ] |
| 2148 | } |
| 2149 | } |
Stan Iliev | 9315172 | 2018-08-02 11:10:52 -0400 | [diff] [blame] | 2150 | if (is_android && skia_enable_gpu) { |
| 2151 | test_app("skottie_android") { |
| 2152 | is_shared_library = true |
| 2153 | |
| 2154 | sources = [ |
| 2155 | "platform_tools/android/apps/skottie/src/main/cpp/JavaInputStreamAdaptor.cpp", |
| 2156 | "platform_tools/android/apps/skottie/src/main/cpp/native-lib.cpp", |
| 2157 | ] |
| 2158 | libs = [] |
| 2159 | |
Stan Iliev | 9315172 | 2018-08-02 11:10:52 -0400 | [diff] [blame] | 2160 | deps = [ |
| 2161 | ":skia", |
| 2162 | "modules/skottie", |
Stan Iliev | a7a52b9 | 2018-10-01 15:36:32 -0400 | [diff] [blame] | 2163 | "modules/sksg:samples", |
Stan Iliev | 9315172 | 2018-08-02 11:10:52 -0400 | [diff] [blame] | 2164 | ] |
| 2165 | } |
| 2166 | } |
Hal Canary | 7542713 | 2017-10-11 16:00:31 -0400 | [diff] [blame] | 2167 | |
Hal Canary | a9de760 | 2018-01-19 13:08:23 -0500 | [diff] [blame] | 2168 | test_app("list_gms") { |
| 2169 | sources = [ |
| 2170 | "tools/list_gms.cpp", |
| 2171 | ] |
| 2172 | deps = [ |
| 2173 | ":gm", |
| 2174 | ":skia", |
| 2175 | ] |
| 2176 | } |
| 2177 | test_app("list_gpu_unit_tests") { |
| 2178 | sources = [ |
| 2179 | "dm/DMGpuTestProcs.cpp", |
| 2180 | "tools/list_gpu_unit_tests.cpp", |
| 2181 | ] |
| 2182 | deps = [ |
| 2183 | ":skia", |
| 2184 | ":tests", |
| 2185 | ] |
| 2186 | } |
| 2187 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2188 | test_lib("sk_app") { |
Hal Canary | 378be8d | 2019-04-26 08:20:14 -0400 | [diff] [blame] | 2189 | public_deps = [ |
Hal Canary | 378be8d | 2019-04-26 08:20:14 -0400 | [diff] [blame] | 2190 | ":gpu_tool_utils", |
Hal Canary | 0569447 | 2019-05-03 17:14:21 -0400 | [diff] [blame] | 2191 | ":skia", |
Hal Canary | 378be8d | 2019-04-26 08:20:14 -0400 | [diff] [blame] | 2192 | ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2193 | sources = [ |
| 2194 | "tools/sk_app/CommandSet.cpp", |
| 2195 | "tools/sk_app/GLWindowContext.cpp", |
| 2196 | "tools/sk_app/Window.cpp", |
| 2197 | ] |
| 2198 | libs = [] |
| 2199 | |
| 2200 | if (is_android) { |
| 2201 | sources += [ |
| 2202 | "tools/sk_app/android/GLWindowContext_android.cpp", |
| 2203 | "tools/sk_app/android/RasterWindowContext_android.cpp", |
| 2204 | "tools/sk_app/android/Window_android.cpp", |
| 2205 | "tools/sk_app/android/main_android.cpp", |
| 2206 | "tools/sk_app/android/surface_glue_android.cpp", |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 2207 | ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2208 | libs += [ "android" ] |
| 2209 | } else if (is_linux) { |
| 2210 | sources += [ |
| 2211 | "tools/sk_app/unix/GLWindowContext_unix.cpp", |
| 2212 | "tools/sk_app/unix/RasterWindowContext_unix.cpp", |
| 2213 | "tools/sk_app/unix/Window_unix.cpp", |
| 2214 | "tools/sk_app/unix/keysym2ucs.c", |
| 2215 | "tools/sk_app/unix/main_unix.cpp", |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 2216 | ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2217 | libs += [ |
| 2218 | "GL", |
| 2219 | "X11", |
| 2220 | ] |
| 2221 | } else if (is_win) { |
| 2222 | sources += [ |
| 2223 | "tools/sk_app/win/GLWindowContext_win.cpp", |
| 2224 | "tools/sk_app/win/RasterWindowContext_win.cpp", |
| 2225 | "tools/sk_app/win/Window_win.cpp", |
| 2226 | "tools/sk_app/win/main_win.cpp", |
| 2227 | ] |
Brian Salomon | 194db17 | 2017-08-17 14:37:06 -0400 | [diff] [blame] | 2228 | if (skia_use_angle) { |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2229 | sources += [ "tools/sk_app/win/ANGLEWindowContext_win.cpp" ] |
Brian Salomon | 194db17 | 2017-08-17 14:37:06 -0400 | [diff] [blame] | 2230 | } |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2231 | } else if (is_mac) { |
| 2232 | sources += [ |
Jim Van Verth | 1f086ca | 2019-01-28 14:46:04 -0500 | [diff] [blame] | 2233 | "tools/sk_app/mac/GLWindowContext_mac.mm", |
| 2234 | "tools/sk_app/mac/RasterWindowContext_mac.mm", |
| 2235 | "tools/sk_app/mac/Window_mac.mm", |
| 2236 | "tools/sk_app/mac/main_mac.mm", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2237 | ] |
| 2238 | libs += [ |
| 2239 | "QuartzCore.framework", |
| 2240 | "Cocoa.framework", |
| 2241 | "Foundation.framework", |
| 2242 | ] |
| 2243 | } else if (is_ios) { |
| 2244 | sources += [ |
| 2245 | "tools/sk_app/ios/GLWindowContext_ios.cpp", |
| 2246 | "tools/sk_app/ios/RasterWindowContext_ios.cpp", |
| 2247 | "tools/sk_app/ios/Window_ios.cpp", |
| 2248 | "tools/sk_app/ios/main_ios.cpp", |
| 2249 | ] |
| 2250 | } |
| 2251 | |
| 2252 | if (skia_use_vulkan) { |
| 2253 | sources += [ "tools/sk_app/VulkanWindowContext.cpp" ] |
| 2254 | if (is_android) { |
| 2255 | sources += [ "tools/sk_app/android/VulkanWindowContext_android.cpp" ] |
| 2256 | } else if (is_linux) { |
| 2257 | sources += [ "tools/sk_app/unix/VulkanWindowContext_unix.cpp" ] |
| 2258 | libs += [ "X11-xcb" ] |
| 2259 | } else if (is_win) { |
| 2260 | sources += [ "tools/sk_app/win/VulkanWindowContext_win.cpp" ] |
Jim Van Verth | ce51c14 | 2019-02-14 14:07:46 -0500 | [diff] [blame] | 2261 | } else if (is_mac) { |
| 2262 | sources += [ "tools/sk_app/mac/VulkanWindowContext_mac.mm" ] |
| 2263 | libs += [ "MetalKit.framework" ] |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2264 | } |
| 2265 | } |
| 2266 | |
Jim Van Verth | be39f71 | 2019-02-08 15:36:14 -0500 | [diff] [blame] | 2267 | if (skia_use_metal) { |
| 2268 | sources += [ "tools/sk_app/MetalWindowContext.mm" ] |
| 2269 | if (is_mac) { |
| 2270 | sources += [ "tools/sk_app/mac/MetalWindowContext_mac.mm" ] |
| 2271 | } |
| 2272 | libs += [ "MetalKit.framework" ] |
| 2273 | } |
| 2274 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2275 | deps = [ |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2276 | ":tool_utils", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2277 | ] |
| 2278 | if (is_android) { |
| 2279 | deps += [ "//third_party/native_app_glue" ] |
Jim Van Verth | 1f086ca | 2019-01-28 14:46:04 -0500 | [diff] [blame] | 2280 | } else if (is_ios) { |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2281 | deps += [ "//third_party/libsdl" ] |
| 2282 | } |
| 2283 | if (skia_use_angle) { |
| 2284 | deps += [ "//third_party/angle2" ] |
Mike Klein | a92c383 | 2016-12-08 09:49:39 -0500 | [diff] [blame] | 2285 | } |
Brian Osman | 16adfa3 | 2016-10-18 14:42:44 -0400 | [diff] [blame] | 2286 | } |
Ethan Nicholas | 4f3985c | 2016-11-14 11:16:37 -0500 | [diff] [blame] | 2287 | |
Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 2288 | if (!skia_use_vulkan && (is_mac || is_linux || is_win)) { |
| 2289 | test_app("fiddle_examples") { |
| 2290 | sources = [ |
Brian Osman | c725e8f | 2019-04-10 14:08:44 -0400 | [diff] [blame] | 2291 | "tools/fiddle/all_examples.cpp", |
Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 2292 | "tools/fiddle/examples.cpp", |
Brian Osman | 72ef2d5 | 2019-03-17 11:09:17 -0400 | [diff] [blame] | 2293 | "tools/fiddle/examples.h", |
Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 2294 | ] |
Brian Osman | 72ef2d5 | 2019-03-17 11:09:17 -0400 | [diff] [blame] | 2295 | if (is_win) { |
| 2296 | cflags = [ "/wd4756" ] # Overflow in constant arithmetic |
| 2297 | } |
Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 2298 | deps = [ |
| 2299 | ":skia", |
| 2300 | ":skia.h", |
| 2301 | "modules/skottie", |
Florin Malita | a1dcaae | 2019-03-25 17:38:43 -0400 | [diff] [blame] | 2302 | "modules/skshaper", |
Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 2303 | ] |
| 2304 | } |
| 2305 | } |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2306 | test_app("viewer") { |
| 2307 | is_shared_library = is_android |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2308 | sources = [ |
| 2309 | "tools/viewer/BisectSlide.cpp", |
| 2310 | "tools/viewer/GMSlide.cpp", |
| 2311 | "tools/viewer/ImGuiLayer.cpp", |
| 2312 | "tools/viewer/ImageSlide.cpp", |
Brian Osman | 7c979f5 | 2019-02-12 13:27:51 -0500 | [diff] [blame] | 2313 | "tools/viewer/ParticlesSlide.cpp", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2314 | "tools/viewer/SKPSlide.cpp", |
| 2315 | "tools/viewer/SampleSlide.cpp", |
| 2316 | "tools/viewer/SkottieSlide.cpp", |
| 2317 | "tools/viewer/SlideDir.cpp", |
| 2318 | "tools/viewer/StatsLayer.cpp", |
| 2319 | "tools/viewer/SvgSlide.cpp", |
Ben Wagner | b2c4ea6 | 2018-08-08 11:36:17 -0400 | [diff] [blame] | 2320 | "tools/viewer/TouchGesture.cpp", |
Leon Scroggins III | 81886e8 | 2018-08-22 11:18:08 -0400 | [diff] [blame] | 2321 | "tools/viewer/TouchGesture.h", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2322 | "tools/viewer/Viewer.cpp", |
| 2323 | ] |
| 2324 | libs = [] |
| 2325 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2326 | deps = [ |
Mike Klein | c6142d8 | 2019-03-25 10:54:59 -0500 | [diff] [blame] | 2327 | ":common_flags_gpu", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2328 | ":experimental_svg_model", |
| 2329 | ":flags", |
| 2330 | ":gm", |
| 2331 | ":gpu_tool_utils", |
| 2332 | ":samples", |
| 2333 | ":sk_app", |
| 2334 | ":skia", |
| 2335 | ":tool_utils", |
Mike Klein | 499f0ac | 2019-03-25 13:00:12 -0500 | [diff] [blame] | 2336 | ":trace", |
Brian Osman | 7c979f5 | 2019-02-12 13:27:51 -0500 | [diff] [blame] | 2337 | "modules/particles", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2338 | "modules/skottie", |
Florin Malita | a831655 | 2018-11-09 16:19:44 -0500 | [diff] [blame] | 2339 | "modules/skottie:utils", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2340 | "modules/sksg", |
Ben Wagner | b2c4ea6 | 2018-08-08 11:36:17 -0400 | [diff] [blame] | 2341 | "modules/sksg:samples", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2342 | "//third_party/imgui", |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2343 | ] |
Ruiqi Mao | f510149 | 2018-06-29 14:32:21 -0400 | [diff] [blame] | 2344 | |
| 2345 | # NIMA does not build on Windows clang |
| 2346 | if (!is_win || !is_clang) { |
| 2347 | sources += [ "tools/viewer/NIMASlide.cpp" ] |
| 2348 | deps += [ "//third_party/Nima-Cpp" ] |
| 2349 | } |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2350 | } |
| 2351 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2352 | if (!skia_use_angle && (is_linux || is_win || is_mac)) { |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2353 | test_app("HelloWorld") { |
| 2354 | sources = [ |
| 2355 | "example/HelloWorld.cpp", |
| 2356 | ] |
| 2357 | libs = [] |
| 2358 | |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2359 | deps = [ |
| 2360 | ":flags", |
| 2361 | ":gpu_tool_utils", |
| 2362 | ":sk_app", |
| 2363 | ":skia", |
| 2364 | ":tool_utils", |
Brian Osman | eff04b5 | 2017-11-21 13:18:02 -0500 | [diff] [blame] | 2365 | ] |
| 2366 | } |
| 2367 | } |
| 2368 | |
Brian Osman | c9a4247 | 2018-05-31 13:17:12 -0400 | [diff] [blame] | 2369 | if (is_linux || is_mac || is_ios) { |
Jim Van Verth | 4c70c75 | 2017-07-11 12:03:01 -0400 | [diff] [blame] | 2370 | test_app("SkiaSDLExample") { |
| 2371 | sources = [ |
| 2372 | "example/SkiaSDLExample.cpp", |
| 2373 | ] |
| 2374 | libs = [] |
Jim Van Verth | 4c70c75 | 2017-07-11 12:03:01 -0400 | [diff] [blame] | 2375 | deps = [ |
| 2376 | ":gpu_tool_utils", |
| 2377 | ":skia", |
| 2378 | "//third_party/libsdl", |
| 2379 | ] |
| 2380 | } |
| 2381 | } |
| 2382 | |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2383 | if (skia_qt_path != "" && (is_win || is_linux || is_mac)) { |
| 2384 | action_foreach("generate_mocs") { |
| 2385 | script = "gn/call.py" |
| 2386 | sources = [ |
| 2387 | "tools/mdbviz/MainWindow.h", |
| 2388 | ] |
| 2389 | outputs = [ |
| 2390 | "$target_gen_dir/mdbviz/{{source_name_part}}_moc.cpp", |
| 2391 | ] |
| 2392 | args = [ |
| 2393 | "$skia_qt_path" + "/bin/moc", |
| 2394 | "{{source}}", |
| 2395 | "-o", |
| 2396 | "gen/mdbviz/{{source_name_part}}_moc.cpp", |
| 2397 | ] |
| 2398 | } |
| 2399 | action_foreach("generate_resources") { |
| 2400 | script = "gn/call.py" |
| 2401 | sources = [ |
| 2402 | "tools/mdbviz/resources.qrc", |
| 2403 | ] |
| 2404 | outputs = [ |
| 2405 | "$target_gen_dir/mdbviz/{{source_name_part}}_res.cpp", |
| 2406 | ] |
| 2407 | args = [ |
| 2408 | "$skia_qt_path" + "/bin/rcc", |
| 2409 | "{{source}}", |
| 2410 | "-o", |
| 2411 | "gen/mdbviz/{{source_name_part}}_res.cpp", |
| 2412 | ] |
| 2413 | } |
| 2414 | test_app("mdbviz") { |
| 2415 | if (is_win) { |
| 2416 | # on Windows we need to disable some exception handling warnings due to the Qt headers |
| 2417 | cflags = [ "/Wv:18" ] # 18 -> VS2013, 19 -> VS2015, 1910 -> VS2017 |
| 2418 | } |
| 2419 | sources = [ |
Robert Phillips | 5fccf9d | 2017-09-05 15:10:12 -0400 | [diff] [blame] | 2420 | "tools/UrlDataManager.cpp", |
Mike Klein | 8f4e224 | 2019-03-20 11:59:00 -0500 | [diff] [blame] | 2421 | "tools/debugger/DebugCanvas.cpp", |
| 2422 | "tools/debugger/DrawCommand.cpp", |
| 2423 | "tools/debugger/JsonWriteBuffer.cpp", |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2424 | "tools/mdbviz/MainWindow.cpp", |
Robert Phillips | deaf568 | 2017-09-06 13:07:21 -0400 | [diff] [blame] | 2425 | "tools/mdbviz/Model.cpp", |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2426 | "tools/mdbviz/main.cpp", |
| 2427 | |
| 2428 | # generated files |
| 2429 | "$target_gen_dir/mdbviz/MainWindow_moc.cpp", |
| 2430 | "$target_gen_dir/mdbviz/resources_res.cpp", |
| 2431 | ] |
| 2432 | lib_dirs = [ "$skia_qt_path/lib" ] |
| 2433 | libs = [ |
| 2434 | "Qt5Core.lib", |
| 2435 | "Qt5Gui.lib", |
| 2436 | "Qt5Widgets.lib", |
| 2437 | ] |
| 2438 | include_dirs = [ |
| 2439 | "$skia_qt_path/include", |
Robert Phillips | 276066b | 2017-09-06 17:17:44 -0400 | [diff] [blame] | 2440 | "$skia_qt_path/include/QtCore", |
Robert Phillips | a6d2d70 | 2017-09-01 12:17:03 -0400 | [diff] [blame] | 2441 | "$skia_qt_path/include/QtWidgets", |
| 2442 | ] |
| 2443 | deps = [ |
| 2444 | ":generate_mocs", |
| 2445 | ":generate_resources", |
| 2446 | ":skia", |
| 2447 | ] |
| 2448 | } |
| 2449 | } |
| 2450 | |
Mike Klein | e459afd | 2017-03-03 09:21:30 -0500 | [diff] [blame] | 2451 | if (is_android && defined(ndk) && ndk != "") { |
Derek Sollenberger | 70120c7 | 2017-01-05 11:39:04 -0500 | [diff] [blame] | 2452 | copy("gdbserver") { |
| 2453 | sources = [ |
| 2454 | "$ndk/$ndk_gdbserver", |
| 2455 | ] |
| 2456 | outputs = [ |
| 2457 | "$root_out_dir/gdbserver", |
| 2458 | ] |
| 2459 | } |
Derek Sollenberger | 70120c7 | 2017-01-05 11:39:04 -0500 | [diff] [blame] | 2460 | } |
Mike Klein | f9ae670 | 2018-06-20 14:05:05 -0400 | [diff] [blame] | 2461 | |
| 2462 | if (skia_use_opencl) { |
| 2463 | test_app("hello-opencl") { |
| 2464 | sources = [ |
Mike Klein | f9ae670 | 2018-06-20 14:05:05 -0400 | [diff] [blame] | 2465 | "tools/hello-opencl.cpp", |
| 2466 | ] |
Mike Klein | 8a1f15d | 2019-02-11 11:59:41 -0500 | [diff] [blame] | 2467 | deps = [ |
| 2468 | "//third_party/opencl", |
| 2469 | ] |
Mike Klein | f9ae670 | 2018-06-20 14:05:05 -0400 | [diff] [blame] | 2470 | } |
| 2471 | } |
Hal Canary | b8f81af | 2019-04-24 13:56:16 -0400 | [diff] [blame] | 2472 | |
| 2473 | test_app("editor") { |
| 2474 | is_shared_library = is_android |
| 2475 | sources = [ |
Hal Canary | 50d650d | 2019-04-28 14:40:45 -0400 | [diff] [blame] | 2476 | "experimental/editor/editor.cpp", |
| 2477 | "experimental/editor/editor.h", |
Hal Canary | 0569447 | 2019-05-03 17:14:21 -0400 | [diff] [blame] | 2478 | "experimental/editor/editor_application.cpp", |
Hal Canary | 7b300a4 | 2019-04-30 12:38:28 -0400 | [diff] [blame] | 2479 | "experimental/editor/run_handler.cpp", |
| 2480 | "experimental/editor/run_handler.h", |
Hal Canary | 0569447 | 2019-05-03 17:14:21 -0400 | [diff] [blame] | 2481 | "experimental/editor/stringslice.cpp", |
| 2482 | "experimental/editor/stringslice.h", |
Hal Canary | b8f81af | 2019-04-24 13:56:16 -0400 | [diff] [blame] | 2483 | ] |
| 2484 | deps = [ |
| 2485 | ":sk_app", |
| 2486 | ":skia", |
| 2487 | "modules/skshaper", |
| 2488 | ] |
| 2489 | } |
mtklein | 25c81d4 | 2016-07-27 13:55:26 -0700 | [diff] [blame] | 2490 | } |