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