benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 1 | # Description: |
| 2 | # Skia graphics library. |
| 3 | # |
| 4 | # Definitions for Google BUILD file. |
| 5 | |
| 6 | exports_files(["BUILD.public"]) |
| 7 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 8 | # All platform-independent SRCS. |
| 9 | BASE_SRCS = glob( |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 10 | [ |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 11 | "include/private/*.h", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 12 | "src/**/*.h", |
| 13 | "src/**/*.cpp", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 14 | |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 15 | # Third Party |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 16 | "third_party/etc1/*.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 17 | "third_party/etc1/*.h", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 18 | "third_party/ktx/*.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 19 | "third_party/ktx/*.h", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 20 | ], |
| 21 | exclude = [ |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 22 | # Exclude platform-dependent files. |
| 23 | "src/device/xps/*", # Windows-only. Move to ports? |
| 24 | "src/doc/*_XPS.cpp", # Windows-only. Move to ports? |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 25 | "src/fonts/SkFontMgr_fontconfig.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 26 | "src/gpu/gl/android/*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 27 | "src/gpu/gl/egl/*", |
| 28 | "src/gpu/gl/glx/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 29 | "src/gpu/gl/iOS/*", |
| 30 | "src/gpu/gl/mac/*", |
| 31 | "src/gpu/gl/win/*", |
| 32 | "src/opts/**/*", |
| 33 | "src/ports/**/*", |
| 34 | "src/utils/android/**/*", |
| 35 | "src/utils/mac/**/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 36 | "src/utils/SkThreadUtils_win.cpp", # Windows-only. Move to ports? |
| 37 | "src/utils/win/**/*", |
| 38 | "src/views/sdl/*", |
| 39 | "src/views/win/*", |
| 40 | "src/views/unix/*", |
| 41 | |
| 42 | # Exclude multiple definitions. |
| 43 | # TODO(mtklein): Move to opts? |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 44 | "src/doc/SkDocument_PDF_None.cpp", # We use SkDocument_PDF.cpp. |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 45 | "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", |
| 46 | "src/gpu/gl/GrGLDefaultInterface_native.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 47 | |
| 48 | # Exclude files that don't compile with the current DEFINES. |
benjaminwagner | aada3e8 | 2015-10-27 09:14:29 -0700 | [diff] [blame] | 49 | "src/codec/SkJpegCodec.cpp", # libjpeg_turbo version mismatch. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 50 | "src/gpu/gl/angle/*", # Requires SK_ANGLE define. |
| 51 | "src/gpu/gl/command_buffer/*", # unknown type name 'HMODULE' |
| 52 | "src/gpu/gl/mesa/*", # Requires SK_MESA define. |
| 53 | "src/svg/parser/*", # Missing SkSVG.h. |
| 54 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 55 | # Conflicting dependencies among Lua versions. See cl/107087297. |
| 56 | "src/utils/SkLua*", |
| 57 | |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 58 | # Not used. |
| 59 | "src/animator/**/*", |
| 60 | "src/views/**/*", |
| 61 | "src/xml/SkBML_Verbs.h", |
| 62 | "src/xml/SkBML_XMLParser.cpp", |
| 63 | "src/xml/SkXMLPullParser.cpp", |
| 64 | ], |
| 65 | ) |
| 66 | |
| 67 | # Platform-dependent SRCS for google3-default platform. |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 68 | BASE_SRCS_UNIX = glob( |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 69 | [ |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 70 | "src/fonts/SkFontMgr_fontconfig.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 71 | "src/opts/**/*.cpp", |
| 72 | "src/opts/**/*.h", |
| 73 | "src/ports/**/*.cpp", |
| 74 | "src/ports/**/*.h", |
| 75 | ], |
| 76 | exclude = [ |
| 77 | "src/opts/*arm*", |
| 78 | "src/opts/*mips*", |
| 79 | "src/opts/*NEON*", |
| 80 | "src/opts/*neon*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 81 | # Included in :opts_ssse3 library. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 82 | "src/opts/*SSSE3*", |
| 83 | "src/opts/*ssse3*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 84 | # Included in :opts_sse4 library. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 85 | "src/opts/*SSE4*", |
| 86 | "src/opts/*sse4*", |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 87 | # Included in :opts_avx or :opts_avx2 |
| 88 | "src/opts/*avx*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 89 | "src/opts/SkBitmapProcState_opts_none.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 90 | "src/opts/SkBlitMask_opts_none.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 91 | "src/opts/SkBlitRow_opts_none.cpp", |
| 92 | "src/ports/*android*", |
| 93 | "src/ports/*chromium*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 94 | "src/ports/*mac*", |
| 95 | "src/ports/*mozalloc*", |
| 96 | "src/ports/*nacl*", |
| 97 | "src/ports/*win*", |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 98 | "src/ports/SkFontConfigInterface_direct_factory.cpp", |
| 99 | "src/ports/SkFontMgr_custom_directory_factory.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 100 | "src/ports/SkFontMgr_custom_embedded_factory.cpp", |
| 101 | "src/ports/SkFontMgr_empty_factory.cpp", |
benjaminwagner | 404816e | 2015-12-03 05:04:03 -0800 | [diff] [blame] | 102 | "src/ports/SkFontMgr_fontconfig.cpp", |
benjaminwagner | 9dbec09 | 2015-11-02 05:53:38 -0800 | [diff] [blame] | 103 | "src/ports/SkImageDecoder_CG.cpp", |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 104 | "src/ports/SkFontMgr_fontconfig_factory.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 105 | "src/ports/SkImageDecoder_WIC.cpp", |
| 106 | "src/ports/SkImageDecoder_empty.cpp", |
| 107 | "src/ports/SkImageGenerator_none.cpp", |
| 108 | "src/ports/SkTLS_none.cpp", |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 109 | ], |
| 110 | ) |
| 111 | |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 112 | # Platform-dependent SRCS for google3-default Android. |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 113 | BASE_SRCS_ANDROID = glob( |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 114 | [ |
| 115 | # TODO(benjaminwagner): Figure out how to compile with EGL. |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 116 | "src/opts/**/*.cpp", |
| 117 | "src/opts/**/*.h", |
| 118 | "src/ports/**/*.cpp", |
| 119 | "src/ports/**/*.h", |
| 120 | ], |
| 121 | exclude = [ |
| 122 | "src/opts/*mips*", |
| 123 | "src/opts/*SSE2*", |
| 124 | "src/opts/*SSSE3*", |
| 125 | "src/opts/*ssse3*", |
| 126 | "src/opts/*SSE4*", |
| 127 | "src/opts/*sse4*", |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 128 | "src/opts/*avx*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 129 | "src/opts/*x86*", |
| 130 | "src/opts/SkBitmapProcState_opts_none.cpp", |
| 131 | "src/opts/SkBlitMask_opts_none.cpp", |
| 132 | "src/opts/SkBlitRow_opts_none.cpp", |
| 133 | "src/ports/*chromium*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 134 | "src/ports/*fontconfig*", |
| 135 | "src/ports/*FontConfig*", |
| 136 | "src/ports/*mac*", |
| 137 | "src/ports/*mozalloc*", |
| 138 | "src/ports/*nacl*", |
| 139 | "src/ports/*win*", |
| 140 | "src/ports/SkDebug_stdio.cpp", |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 141 | "src/ports/SkFontConfigInterface_direct_factory.cpp", |
| 142 | "src/ports/SkFontConfigInterface_direct_google3_factory.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 143 | "src/ports/SkFontMgr_custom_directory_factory.cpp", |
| 144 | "src/ports/SkFontMgr_custom_embedded_factory.cpp", |
| 145 | "src/ports/SkFontMgr_empty_factory.cpp", |
benjaminwagner | 9dbec09 | 2015-11-02 05:53:38 -0800 | [diff] [blame] | 146 | "src/ports/SkImageDecoder_CG.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 147 | "src/ports/SkImageDecoder_WIC.cpp", |
| 148 | "src/ports/SkImageDecoder_empty.cpp", |
| 149 | "src/ports/SkImageGenerator_none.cpp", |
| 150 | "src/ports/SkTLS_none.cpp", |
| 151 | ], |
| 152 | ) |
| 153 | |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 154 | # Platform-dependent SRCS for google3-default iOS. |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 155 | BASE_SRCS_IOS = glob( |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 156 | [ |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 157 | "src/opts/**/*.cpp", |
| 158 | "src/opts/**/*.h", |
| 159 | "src/ports/**/*.cpp", |
| 160 | "src/ports/**/*.h", |
| 161 | ], |
| 162 | exclude = [ |
| 163 | "src/opts/*mips*", |
| 164 | "src/opts/*NEON*", |
| 165 | "src/opts/*neon*", |
| 166 | "src/opts/*SSE2*", |
| 167 | "src/opts/*SSSE3*", |
| 168 | "src/opts/*ssse3*", |
| 169 | "src/opts/*SSE4*", |
| 170 | "src/opts/*sse4*", |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 171 | "src/opts/*avx*", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 172 | "src/opts/*x86*", |
| 173 | "src/opts/SkBitmapProcState_opts_none.cpp", |
| 174 | "src/opts/SkBlitMask_opts_none.cpp", |
| 175 | "src/opts/SkBlitRow_opts_none.cpp", |
| 176 | "src/ports/*android*", |
| 177 | "src/ports/*chromium*", |
| 178 | "src/ports/*fontconfig*", |
| 179 | "src/ports/*FontConfig*", |
| 180 | "src/ports/*FreeType*", |
| 181 | "src/ports/*mozalloc*", |
| 182 | "src/ports/*nacl*", |
| 183 | "src/ports/*win*", |
| 184 | "src/ports/SkDebug_stdio.cpp", |
| 185 | "src/ports/SkFontMgr_custom.cpp", |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 186 | "src/ports/SkFontConfigInterface_direct_factory.cpp", |
| 187 | "src/ports/SkFontConfigInterface_direct_google3_factory.cpp", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 188 | "src/ports/SkFontMgr_custom_directory_factory.cpp", |
| 189 | "src/ports/SkFontMgr_custom_embedded_factory.cpp", |
| 190 | "src/ports/SkFontMgr_empty_factory.cpp", |
| 191 | "src/ports/SkImageDecoder_CG.cpp", |
| 192 | "src/ports/SkImageDecoder_WIC.cpp", |
| 193 | "src/ports/SkImageDecoder_empty.cpp", |
| 194 | "src/ports/SkImageGenerator_none.cpp", |
| 195 | "src/ports/SkTLS_none.cpp", |
| 196 | ], |
| 197 | ) |
| 198 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 199 | BASE_SRCS_PLATFORM = select({ |
| 200 | CONDITION_ANDROID: BASE_SRCS_ANDROID, |
| 201 | CONDITION_IOS: BASE_SRCS_IOS, |
| 202 | "//conditions:default": BASE_SRCS_UNIX, |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 203 | }) |
| 204 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 205 | SSSE3_SRCS = glob( |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 206 | [ |
| 207 | "src/opts/*SSSE3*.cpp", |
| 208 | "src/opts/*ssse3*.cpp", |
| 209 | ], |
| 210 | ) |
| 211 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 212 | SSE4_SRCS = glob( |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 213 | [ |
| 214 | "src/opts/*SSE4*.cpp", |
| 215 | "src/opts/*sse4*.cpp", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 216 | ], |
| 217 | ) |
| 218 | |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 219 | AVX_SRCS = glob( |
| 220 | [ |
| 221 | "src/opts/*_avx.cpp", |
| 222 | ], |
| 223 | ) |
| 224 | |
| 225 | AVX2_SRCS = glob( |
| 226 | [ |
| 227 | "src/opts/*_avx2.cpp", |
| 228 | ], |
| 229 | ) |
| 230 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 231 | BASE_HDRS = glob( |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 232 | [ |
| 233 | "include/**/*.h", |
| 234 | ], |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 235 | exclude = [ |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 236 | "include/private/**/*", |
| 237 | |
| 238 | # Not used. |
| 239 | "include/animator/**/*", |
| 240 | "include/views/**/*", |
| 241 | "include/xml/SkBML_WXMLParser.h", |
| 242 | "include/xml/SkBML_XMLParser.h", |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 243 | ], |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 244 | ) |
| 245 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 246 | # Dependencies. |
| 247 | BASE_DEPS_UNIX = [ |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 248 | ":opts_avx2", |
| 249 | ":opts_avx", |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 250 | ":opts_sse4", |
| 251 | ":opts_ssse3", |
| 252 | ] |
| 253 | |
| 254 | BASE_DEPS_ANDROID = [] |
| 255 | |
| 256 | BASE_DEPS_IOS = [] |
| 257 | |
| 258 | BASE_DEPS = select({ |
| 259 | CONDITION_ANDROID: BASE_DEPS_ANDROID + BASE_EXTERNAL_DEPS_ANDROID, |
| 260 | CONDITION_IOS: BASE_DEPS_IOS + BASE_EXTERNAL_DEPS_IOS, |
| 261 | "//conditions:default": BASE_DEPS_UNIX + BASE_EXTERNAL_DEPS_UNIX, |
| 262 | }) + EXTERNAL_DEPS_ALL |
| 263 | |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 264 | # Includes needed by Skia implementation. Not public includes. |
| 265 | INCLUDES = [ |
benjaminwagner | fa7e1a0 | 2015-11-13 12:27:08 -0800 | [diff] [blame] | 266 | "include/android", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 267 | "include/c", |
| 268 | "include/codec", |
| 269 | "include/config", |
| 270 | "include/core", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 271 | "include/effects", |
| 272 | "include/gpu", |
| 273 | "include/images", |
| 274 | "include/pathops", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 275 | "include/pipe", |
| 276 | "include/ports", |
| 277 | "include/private", |
| 278 | "include/utils", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 279 | "include/utils/mac", |
| 280 | "include/utils/win", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 281 | "include/svg", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 282 | "include/xml", |
benjaminwagner | fa7e1a0 | 2015-11-13 12:27:08 -0800 | [diff] [blame] | 283 | "src/codec", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 284 | "src/core", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 285 | "src/gpu", |
| 286 | "src/image", |
| 287 | "src/lazy", |
| 288 | "src/opts", |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 289 | "src/ports", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 290 | "src/pdf", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 291 | "src/sfnt", |
| 292 | "src/utils", |
| 293 | "third_party/etc1", |
| 294 | "third_party/ktx", |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 295 | ] + EXTERNAL_INCLUDES |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 296 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 297 | ## :dm |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 298 | |
| 299 | # Platform-independent SRCS for DM. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 300 | DM_SRCS = glob( |
| 301 | [ |
| 302 | "dm/*.cpp", |
| 303 | "dm/*.h", |
| 304 | "gm/*.c", |
| 305 | "gm/*.cpp", |
| 306 | "gm/*.h", |
| 307 | "tests/*.cpp", |
| 308 | "tests/*.h", |
| 309 | "tools/CrashHandler.cpp", |
| 310 | "tools/CrashHandler.h", |
| 311 | "tools/LazyDecodeBitmap.cpp", |
| 312 | "tools/LazyDecodeBitmap.h", |
| 313 | "tools/ProcStats.cpp", |
| 314 | "tools/ProcStats.h", |
| 315 | "tools/Resources.cpp", |
| 316 | "tools/Resources.h", |
benjaminwagner | 3288514 | 2015-10-24 07:55:31 -0700 | [diff] [blame] | 317 | "tools/SkBitmapRegionCanvas.cpp", |
| 318 | "tools/SkBitmapRegionCanvas.h", |
| 319 | "tools/SkBitmapRegionCodec.cpp", |
| 320 | "tools/SkBitmapRegionCodec.h", |
msarett | 5cb4885 | 2015-11-06 08:56:32 -0800 | [diff] [blame] | 321 | "tools/SkBitmapRegionDecoder.cpp", |
| 322 | "tools/SkBitmapRegionDecoder.h", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 323 | "tools/SkBitmapRegionSampler.cpp", |
| 324 | "tools/SkBitmapRegionSampler.h", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 325 | "tools/flags/*.cpp", |
| 326 | "tools/flags/*.h", |
benjaminwagner | 3288514 | 2015-10-24 07:55:31 -0700 | [diff] [blame] | 327 | "tools/sk_tool_utils.cpp", |
| 328 | "tools/sk_tool_utils.h", |
| 329 | "tools/sk_tool_utils_font.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 330 | "tools/timer/*.cpp", |
| 331 | "tools/timer/*.h", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 332 | ], |
| 333 | exclude = [ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 334 | "dm/DMSrcSinkAndroid.cpp", # Android-only. |
| 335 | "tests/FontMgrAndroidParserTest.cpp", # Android-only. |
| 336 | "tests/PathOpsSkpClipTest.cpp", # Alternate main. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 337 | "tests/skia_test.cpp", # Old main. |
| 338 | "tests/SkpSkGrTest.cpp", # Alternate main. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 339 | "tools/timer/SysTimer_mach.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 340 | "tools/timer/SysTimer_windows.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 341 | ], |
| 342 | ) |
| 343 | |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 344 | DM_SRCS_UNIX = [] |
| 345 | |
| 346 | DM_SRCS_ANDROID = glob( |
| 347 | [ |
| 348 | # Depends on Android HWUI library that is not available in google3. |
| 349 | #"dm/DMSrcSinkAndroid.cpp", |
| 350 | "tests/FontMgrAndroidParserTest.cpp", |
| 351 | ], |
| 352 | ) |
| 353 | |
| 354 | DM_PLATFORM_SRCS = select({ |
| 355 | CONDITION_ANDROID: DM_SRCS_ANDROID, |
| 356 | "//conditions:default": DM_SRCS_UNIX, |
| 357 | }) |
| 358 | |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 359 | DM_INCLUDES = [ |
| 360 | "gm", |
| 361 | "src/codec", |
| 362 | "src/effects", |
| 363 | "src/fonts", |
| 364 | "src/pathops", |
| 365 | "src/pipe/utils", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 366 | "src/ports", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 367 | "src/utils/debugger", |
| 368 | "tests", |
| 369 | "tools", |
| 370 | "tools/flags", |
| 371 | "tools/timer", |
| 372 | ] |
| 373 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 374 | COPTS_ANDROID = ["-mfpu=neon"] |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 375 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 376 | COPTS_IOS = [] |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 377 | |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 378 | COPTS_UNIX = [ |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 379 | "-Wno-implicit-fallthrough", # Some intentional fallthrough. |
benjaminwagner | 7d974f5 | 2015-10-19 13:55:55 -0700 | [diff] [blame] | 380 | "-Wno-deprecated-declarations", # Internal use of deprecated methods. :( |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 381 | ] |
| 382 | |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 383 | COPTS = select({ |
| 384 | CONDITION_ANDROID: COPTS_ANDROID, |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 385 | CONDITION_IOS: COPTS_IOS, |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 386 | "//conditions:default": COPTS_UNIX, |
| 387 | }) |
| 388 | |
| 389 | DEFINES_ANDROID = [ |
| 390 | "SK_BUILD_FOR_ANDROID", |
| 391 | # TODO(benjaminwagner): Try to get png library updated? |
| 392 | "SK_PNG_NO_INDEX_SUPPORTED", |
| 393 | ] |
| 394 | |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 395 | DEFINES_IOS = [ |
| 396 | "SK_BUILD_FOR_IOS", |
| 397 | "SK_IGNORE_ETC1_SUPPORT", |
| 398 | ] |
| 399 | |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 400 | DEFINES_UNIX = [ |
| 401 | "SK_BUILD_FOR_UNIX", |
| 402 | "SK_SAMPLES_FOR_X", |
| 403 | ] |
| 404 | |
| 405 | DEFINES_ALL = [ |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 406 | # Chrome DEFINES. |
| 407 | "SK_USE_FLOATBITS", |
| 408 | "SK_USE_FREETYPE_EMBOLDEN", |
| 409 | # Turn on a few Google3-specific build fixes. |
| 410 | "GOOGLE3", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 411 | ] |
| 412 | |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 413 | DEFINES = select({ |
| 414 | CONDITION_ANDROID: DEFINES_ANDROID, |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 415 | CONDITION_IOS: DEFINES_IOS, |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 416 | "//conditions:default": DEFINES_UNIX, |
| 417 | }) + DEFINES_ALL |
| 418 | |
| 419 | LINKOPTS = select({ |
| 420 | CONDITION_ANDROID: [ |
| 421 | "-ldl", |
| 422 | "-lEGL", |
| 423 | ], |
| 424 | "//conditions:default": ["-ldl"], |
| 425 | }) |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 426 | |
| 427 | cc_library( |
| 428 | name = "opts_ssse3", |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 429 | srcs = SSSE3_SRCS, |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 430 | copts = COPTS + ["-mssse3"], |
| 431 | defines = DEFINES, |
| 432 | includes = INCLUDES, |
benjaminwagner | 8a3760f | 2015-10-29 13:40:27 -0700 | [diff] [blame] | 433 | deps = EXTERNAL_DEPS_ALL, |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 434 | ) |
| 435 | |
| 436 | cc_library( |
| 437 | name = "opts_sse4", |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 438 | srcs = SSE4_SRCS, |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 439 | copts = COPTS + ["-msse4"], |
| 440 | defines = DEFINES, |
| 441 | includes = INCLUDES, |
benjaminwagner | 8a3760f | 2015-10-29 13:40:27 -0700 | [diff] [blame] | 442 | deps = EXTERNAL_DEPS_ALL, |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 443 | ) |
| 444 | |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 445 | cc_library( |
| 446 | name = "opts_avx", |
| 447 | srcs = AVX_SRCS, |
| 448 | copts = COPTS + ["-mavx"], |
| 449 | defines = DEFINES, |
| 450 | includes = INCLUDES, |
| 451 | deps = EXTERNAL_DEPS_ALL, |
| 452 | ) |
| 453 | |
| 454 | cc_library( |
| 455 | name = "opts_avx2", |
| 456 | srcs = AVX2_SRCS, |
| 457 | copts = COPTS + ["-mavx2"], |
| 458 | defines = DEFINES, |
| 459 | includes = INCLUDES, |
| 460 | deps = EXTERNAL_DEPS_ALL, |
| 461 | ) |
| 462 | |
benjaminwagner | a445cbc | 2015-11-18 13:48:47 -0800 | [diff] [blame] | 463 | # If you need Ganesh (GPU) support in Skia, please contact skia-team@google.com |
| 464 | # for help. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 465 | cc_library( |
| 466 | name = "skia", |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 467 | srcs = BASE_SRCS + BASE_SRCS_PLATFORM, |
| 468 | hdrs = BASE_HDRS, |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 469 | copts = COPTS, |
| 470 | defines = DEFINES, |
| 471 | includes = INCLUDES, |
| 472 | linkopts = LINKOPTS, |
| 473 | visibility = [":skia_clients"], |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 474 | deps = BASE_DEPS, |
benjaminwagner | 9dbec09 | 2015-11-02 05:53:38 -0800 | [diff] [blame] | 475 | alwayslink = 1, |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 476 | ) |
| 477 | |
| 478 | cc_test( |
| 479 | name = "dm", |
| 480 | size = "large", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 481 | srcs = DM_SRCS + DM_PLATFORM_SRCS, |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 482 | args = [ |
| 483 | "--nogpu", |
| 484 | "--verbose", |
| 485 | # TODO(mtklein): maybe investigate why these fail? |
mtklein | e47f1a7 | 2015-11-20 13:58:18 -0800 | [diff] [blame] | 486 | "--match ~FontMgr ~Scalar ~Canvas ~Codec_stripes ~Codec_Dimensions ~Codec ~Stream ~skps ~RecordDraw_TextBounds", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 487 | "--resourcePath %s/resources" % BASE_DIR, |
| 488 | "--images %s/resources" % BASE_DIR, |
| 489 | ], |
| 490 | copts = COPTS, |
benjaminwagner | 964eeba | 2015-10-20 13:00:48 -0700 | [diff] [blame] | 491 | data = glob(["resources/**/*"]), |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 492 | defines = DEFINES, |
| 493 | includes = DM_INCLUDES, |
| 494 | deps = DM_EXTERNAL_DEPS + [ |
| 495 | ":skia", |
benjaminwagner | 8a3760f | 2015-10-29 13:40:27 -0700 | [diff] [blame] | 496 | ] + EXTERNAL_DEPS_ALL, |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 497 | ) |