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