benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 1 | ################################################################################ |
| 2 | # Skylark macros |
| 3 | ################################################################################ |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 4 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 5 | is_bazel = not hasattr(native, "genmpm") |
| 6 | |
| 7 | def portable_select(select_dict, bazel_condition, default_condition): |
| 8 | """Replaces select() with a Bazel-friendly wrapper. |
| 9 | |
| 10 | Args: |
| 11 | select_dict: Dictionary in the same format as select(). |
| 12 | Returns: |
| 13 | If Blaze platform, returns select() using select_dict. |
| 14 | If Bazel platform, returns dependencies for condition |
| 15 | bazel_condition, or empty list if none specified. |
| 16 | """ |
| 17 | if is_bazel: |
| 18 | return select_dict.get(bazel_condition, select_dict[default_condition]) |
| 19 | else: |
| 20 | return select(select_dict) |
| 21 | |
| 22 | def skia_select(conditions, results): |
| 23 | """Replaces select() for conditions [UNIX, ANDROID, IOS] |
| 24 | |
| 25 | Args: |
| 26 | conditions: [CONDITION_UNIX, CONDITION_ANDROID, CONDITION_IOS] |
| 27 | results: [RESULT_UNIX, RESULT_ANDROID, RESULT_IOS] |
| 28 | Returns: |
| 29 | The result matching the platform condition. |
| 30 | """ |
| 31 | if len(conditions) != 3 or len(results) != 3: |
| 32 | fail("Must provide exactly 3 conditions and 3 results") |
| 33 | |
| 34 | selector = {} |
| 35 | for i in range(3): |
| 36 | selector[conditions[i]] = results[i] |
| 37 | return portable_select(selector, conditions[2], conditions[0]) |
| 38 | |
| 39 | def skia_glob(srcs): |
| 40 | """Replaces glob() with a version that accepts a struct. |
| 41 | |
| 42 | Args: |
| 43 | srcs: struct(include=[], exclude=[]) |
| 44 | Returns: |
| 45 | Equivalent of glob(srcs.include, exclude=srcs.exclude) |
| 46 | """ |
| 47 | if hasattr(srcs, 'include'): |
| 48 | if hasattr(srcs, 'exclude'): |
| 49 | return native.glob(srcs.include, exclude=srcs.exclude) |
| 50 | else: |
| 51 | return native.glob(srcs.include) |
| 52 | return [] |
| 53 | |
| 54 | ################################################################################ |
iroth | 849b175 | 2016-04-11 13:45:51 -0700 | [diff] [blame] | 55 | ## PRIVATE_HDRS |
| 56 | ################################################################################ |
| 57 | |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 58 | PRIVATE_HDRS_INCLUDE_LIST = [ |
| 59 | "include/private/**/*.h", |
| 60 | "src/**/*.inc", |
iroth | 849b175 | 2016-04-11 13:45:51 -0700 | [diff] [blame] | 61 | ] |
| 62 | |
| 63 | PRIVATE_HDRS = struct( |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 64 | include = PRIVATE_HDRS_INCLUDE_LIST, |
| 65 | ) |
| 66 | |
| 67 | ALL_HDRS = struct( |
| 68 | include = [ |
| 69 | "src/**/*.h", |
| 70 | "include/**/*.h", |
| 71 | ], |
iroth | 849b175 | 2016-04-11 13:45:51 -0700 | [diff] [blame] | 72 | ) |
| 73 | |
| 74 | ################################################################################ |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 75 | ## BASE_SRCS |
| 76 | ################################################################################ |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 77 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 78 | # All platform-independent SRCS. |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 79 | BASE_SRCS_ALL = struct( |
| 80 | include = [ |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 81 | "src/**/*.h", |
| 82 | "src/**/*.cpp", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 83 | |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 84 | # Third Party |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 85 | "third_party/etc1/*.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 86 | "third_party/etc1/*.h", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 87 | "third_party/ktx/*.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 88 | "third_party/ktx/*.h", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 89 | ], |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 90 | # Note: PRIVATE_HDRS_INCLUDE_LIST is excluded from BASE_SRCS_ALL here |
| 91 | # because they are required to appear in srcs for some rules but hdrs for |
| 92 | # other rules. See internal cl/119566959. |
| 93 | exclude = PRIVATE_HDRS_INCLUDE_LIST + [ |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 94 | # Exclude platform-dependent files. |
iroth | d2ccc77 | 2016-01-25 11:24:57 -0800 | [diff] [blame] | 95 | "src/android/*", |
iroth | 76a1225 | 2016-01-07 07:11:39 -0800 | [diff] [blame] | 96 | "src/codec/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 97 | "src/device/xps/*", # Windows-only. Move to ports? |
| 98 | "src/doc/*_XPS.cpp", # Windows-only. Move to ports? |
| 99 | "src/gpu/gl/android/*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 100 | "src/gpu/gl/egl/*", |
benjaminwagner | af3b35e | 2016-03-28 13:27:28 -0700 | [diff] [blame] | 101 | "src/gpu/gl/glfw/*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 102 | "src/gpu/gl/glx/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 103 | "src/gpu/gl/iOS/*", |
| 104 | "src/gpu/gl/mac/*", |
| 105 | "src/gpu/gl/win/*", |
iroth | 76a1225 | 2016-01-07 07:11:39 -0800 | [diff] [blame] | 106 | "src/images/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 107 | "src/opts/**/*", |
| 108 | "src/ports/**/*", |
| 109 | "src/utils/android/**/*", |
| 110 | "src/utils/mac/**/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 111 | "src/utils/SkThreadUtils_win.cpp", # Windows-only. Move to ports? |
| 112 | "src/utils/win/**/*", |
| 113 | "src/views/sdl/*", |
| 114 | "src/views/win/*", |
| 115 | "src/views/unix/*", |
| 116 | |
| 117 | # Exclude multiple definitions. |
| 118 | # TODO(mtklein): Move to opts? |
benjaminwagner | ca26a18 | 2016-03-14 15:21:12 -0700 | [diff] [blame] | 119 | "src/pdf/SkDocument_PDF_None.cpp", # We use src/pdf/SkPDFDocument.cpp. |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 120 | "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", |
| 121 | "src/gpu/gl/GrGLDefaultInterface_native.cpp", |
iroth | 5f0de06 | 2016-02-17 12:47:27 -0800 | [diff] [blame] | 122 | "src/gpu/gl/GrGLDefaultInterface_none.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 123 | |
| 124 | # Exclude files that don't compile with the current DEFINES. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 125 | "src/gpu/gl/mesa/*", # Requires SK_MESA define. |
benjaminwagner | 921e48b | 2016-07-15 11:27:27 -0700 | [diff] [blame] | 126 | "src/svg/**/*", # Depends on XML. |
| 127 | "src/xml/**/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 128 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 129 | # Conflicting dependencies among Lua versions. See cl/107087297. |
| 130 | "src/utils/SkLua*", |
| 131 | |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 132 | # Not used. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 133 | "src/views/**/*", |
egdaniel | 32119f1 | 2016-02-22 10:07:54 -0800 | [diff] [blame] | 134 | |
| 135 | # Currently exclude all vulkan specific files |
| 136 | "src/gpu/vk/*", |
benjaminwagner | 2214de4 | 2016-07-02 05:12:46 -0700 | [diff] [blame] | 137 | "src/sksl/**/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 138 | ], |
| 139 | ) |
| 140 | |
| 141 | # Platform-dependent SRCS for google3-default platform. |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 142 | BASE_SRCS_UNIX = struct( |
| 143 | include = [ |
iroth | d2ccc77 | 2016-01-25 11:24:57 -0800 | [diff] [blame] | 144 | "src/android/*", |
iroth | 76a1225 | 2016-01-07 07:11:39 -0800 | [diff] [blame] | 145 | "src/codec/*", |
iroth | 5f0de06 | 2016-02-17 12:47:27 -0800 | [diff] [blame] | 146 | "src/gpu/gl/GrGLDefaultInterface_none.cpp", |
iroth | 76a1225 | 2016-01-07 07:11:39 -0800 | [diff] [blame] | 147 | "src/images/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 148 | "src/opts/**/*.cpp", |
| 149 | "src/opts/**/*.h", |
| 150 | "src/ports/**/*.cpp", |
| 151 | "src/ports/**/*.h", |
| 152 | ], |
| 153 | exclude = [ |
| 154 | "src/opts/*arm*", |
| 155 | "src/opts/*mips*", |
| 156 | "src/opts/*NEON*", |
| 157 | "src/opts/*neon*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 158 | # Included in :opts_ssse3 library. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 159 | "src/opts/*SSSE3*", |
| 160 | "src/opts/*ssse3*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 161 | # Included in :opts_sse4 library. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 162 | "src/opts/*SSE4*", |
| 163 | "src/opts/*sse4*", |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 164 | # Included in :opts_avx or :opts_avx2 |
| 165 | "src/opts/*avx*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 166 | "src/opts/SkBitmapProcState_opts_none.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 167 | "src/opts/SkBlitMask_opts_none.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 168 | "src/opts/SkBlitRow_opts_none.cpp", |
msarett | 6b4985c | 2016-03-10 07:15:59 -0800 | [diff] [blame] | 169 | "src/ports/*CG*", |
msarett | fc0b6d1 | 2016-03-17 13:50:17 -0700 | [diff] [blame] | 170 | "src/ports/*WIC*", |
mtklein | 3f193a9 | 2016-03-10 08:52:05 -0800 | [diff] [blame] | 171 | "src/ports/*android*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 172 | "src/ports/*chromium*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 173 | "src/ports/*mac*", |
| 174 | "src/ports/*mozalloc*", |
| 175 | "src/ports/*nacl*", |
| 176 | "src/ports/*win*", |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 177 | "src/ports/SkFontConfigInterface_direct_factory.cpp", |
| 178 | "src/ports/SkFontMgr_custom_directory_factory.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 179 | "src/ports/SkFontMgr_custom_embedded_factory.cpp", |
benjaminwagner | d9dd581 | 2016-03-21 10:45:01 -0700 | [diff] [blame] | 180 | "src/ports/SkFontMgr_custom_empty_factory.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 181 | "src/ports/SkFontMgr_empty_factory.cpp", |
benjaminwagner | 404816e | 2015-12-03 05:04:03 -0800 | [diff] [blame] | 182 | "src/ports/SkFontMgr_fontconfig.cpp", |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 183 | "src/ports/SkFontMgr_fontconfig_factory.cpp", |
msarett | c1d0312 | 2016-03-25 08:58:55 -0700 | [diff] [blame] | 184 | "src/ports/SkImageEncoder_none.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 185 | "src/ports/SkImageGenerator_none.cpp", |
| 186 | "src/ports/SkTLS_none.cpp", |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 187 | ], |
| 188 | ) |
| 189 | |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 190 | # Platform-dependent SRCS for google3-default Android. |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 191 | BASE_SRCS_ANDROID = struct( |
| 192 | include = [ |
iroth | d2ccc77 | 2016-01-25 11:24:57 -0800 | [diff] [blame] | 193 | "src/android/*", |
iroth | 76a1225 | 2016-01-07 07:11:39 -0800 | [diff] [blame] | 194 | "src/codec/*", |
iroth | 5f0de06 | 2016-02-17 12:47:27 -0800 | [diff] [blame] | 195 | "src/gpu/gl/GrGLDefaultInterface_none.cpp", |
iroth | 76a1225 | 2016-01-07 07:11:39 -0800 | [diff] [blame] | 196 | "src/images/*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 197 | # TODO(benjaminwagner): Figure out how to compile with EGL. |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 198 | "src/opts/**/*.cpp", |
| 199 | "src/opts/**/*.h", |
| 200 | "src/ports/**/*.cpp", |
| 201 | "src/ports/**/*.h", |
| 202 | ], |
| 203 | exclude = [ |
| 204 | "src/opts/*mips*", |
| 205 | "src/opts/*SSE2*", |
| 206 | "src/opts/*SSSE3*", |
| 207 | "src/opts/*ssse3*", |
| 208 | "src/opts/*SSE4*", |
| 209 | "src/opts/*sse4*", |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 210 | "src/opts/*avx*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 211 | "src/opts/*x86*", |
| 212 | "src/opts/SkBitmapProcState_opts_none.cpp", |
| 213 | "src/opts/SkBlitMask_opts_none.cpp", |
| 214 | "src/opts/SkBlitRow_opts_none.cpp", |
msarett | 6b4985c | 2016-03-10 07:15:59 -0800 | [diff] [blame] | 215 | "src/ports/*CG*", |
mtklein | 3f193a9 | 2016-03-10 08:52:05 -0800 | [diff] [blame] | 216 | "src/ports/*FontConfig*", |
msarett | fc0b6d1 | 2016-03-17 13:50:17 -0700 | [diff] [blame] | 217 | "src/ports/*WIC*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 218 | "src/ports/*chromium*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 219 | "src/ports/*fontconfig*", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 220 | "src/ports/*mac*", |
| 221 | "src/ports/*mozalloc*", |
| 222 | "src/ports/*nacl*", |
| 223 | "src/ports/*win*", |
| 224 | "src/ports/SkDebug_stdio.cpp", |
| 225 | "src/ports/SkFontMgr_custom_directory_factory.cpp", |
| 226 | "src/ports/SkFontMgr_custom_embedded_factory.cpp", |
benjaminwagner | d9dd581 | 2016-03-21 10:45:01 -0700 | [diff] [blame] | 227 | "src/ports/SkFontMgr_custom_empty_factory.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 228 | "src/ports/SkFontMgr_empty_factory.cpp", |
msarett | c1d0312 | 2016-03-25 08:58:55 -0700 | [diff] [blame] | 229 | "src/ports/SkImageEncoder_none.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 230 | "src/ports/SkImageGenerator_none.cpp", |
| 231 | "src/ports/SkTLS_none.cpp", |
| 232 | ], |
| 233 | ) |
| 234 | |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 235 | # Platform-dependent SRCS for google3-default iOS. |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 236 | BASE_SRCS_IOS = struct( |
| 237 | include = [ |
msarett | 2775cf5 | 2016-02-17 14:14:25 -0800 | [diff] [blame] | 238 | "src/android/*", |
| 239 | "src/codec/*", |
iroth | 5f0de06 | 2016-02-17 12:47:27 -0800 | [diff] [blame] | 240 | "src/gpu/gl/GrGLDefaultInterface_native.cpp", |
| 241 | "src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 242 | "src/opts/**/*.cpp", |
| 243 | "src/opts/**/*.h", |
| 244 | "src/ports/**/*.cpp", |
| 245 | "src/ports/**/*.h", |
iroth | ab669de | 2016-02-16 19:17:01 -0800 | [diff] [blame] | 246 | "src/utils/mac/*.cpp", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 247 | ], |
| 248 | exclude = [ |
msarett | 2775cf5 | 2016-02-17 14:14:25 -0800 | [diff] [blame] | 249 | "src/codec/*Gif*.cpp", |
| 250 | "src/codec/*Ico*.cpp", |
| 251 | "src/codec/*Jpeg*.cpp", |
| 252 | "src/codec/*Webp*.cpp", |
| 253 | "src/codec/*Png*", |
| 254 | "src/codec/*Raw*.cpp", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 255 | "src/opts/*mips*", |
| 256 | "src/opts/*NEON*", |
| 257 | "src/opts/*neon*", |
| 258 | "src/opts/*SSE2*", |
| 259 | "src/opts/*SSSE3*", |
| 260 | "src/opts/*ssse3*", |
| 261 | "src/opts/*SSE4*", |
| 262 | "src/opts/*sse4*", |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 263 | "src/opts/*avx*", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 264 | "src/opts/*x86*", |
| 265 | "src/opts/SkBitmapProcState_opts_none.cpp", |
iroth | d2ccc77 | 2016-01-25 11:24:57 -0800 | [diff] [blame] | 266 | "src/opts/SkBlitMask_opts_arm*.cpp", |
| 267 | "src/opts/SkBlitRow_opts_arm*.cpp", |
mtklein | 3f193a9 | 2016-03-10 08:52:05 -0800 | [diff] [blame] | 268 | "src/ports/*CG*", |
| 269 | "src/ports/*FontConfig*", |
| 270 | "src/ports/*FreeType*", |
msarett | fc0b6d1 | 2016-03-17 13:50:17 -0700 | [diff] [blame] | 271 | "src/ports/*WIC*", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 272 | "src/ports/*android*", |
| 273 | "src/ports/*chromium*", |
| 274 | "src/ports/*fontconfig*", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 275 | "src/ports/*mozalloc*", |
| 276 | "src/ports/*nacl*", |
| 277 | "src/ports/*win*", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 278 | "src/ports/SkFontMgr_custom.cpp", |
| 279 | "src/ports/SkFontMgr_custom_directory_factory.cpp", |
| 280 | "src/ports/SkFontMgr_custom_embedded_factory.cpp", |
benjaminwagner | d9dd581 | 2016-03-21 10:45:01 -0700 | [diff] [blame] | 281 | "src/ports/SkFontMgr_custom_empty_factory.cpp", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 282 | "src/ports/SkFontMgr_empty_factory.cpp", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 283 | "src/ports/SkImageGenerator_none.cpp", |
| 284 | "src/ports/SkTLS_none.cpp", |
| 285 | ], |
| 286 | ) |
| 287 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 288 | ################################################################################ |
| 289 | ## SSSE3/SSE4/AVX/AVX2 SRCS |
| 290 | ################################################################################ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 291 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 292 | SSSE3_SRCS = struct( |
| 293 | include = [ |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 294 | "src/opts/*SSSE3*.cpp", |
| 295 | "src/opts/*ssse3*.cpp", |
benjaminwagner | 89061ed | 2016-01-25 09:29:08 -0800 | [diff] [blame] | 296 | ], |
| 297 | ) |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 298 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 299 | SSE4_SRCS = struct( |
| 300 | include = [ |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 301 | "src/opts/*SSE4*.cpp", |
| 302 | "src/opts/*sse4*.cpp", |
benjaminwagner | 89061ed | 2016-01-25 09:29:08 -0800 | [diff] [blame] | 303 | ], |
| 304 | ) |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 305 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 306 | AVX_SRCS = struct( |
| 307 | include = [ |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 308 | "src/opts/*_avx.cpp", |
benjaminwagner | 89061ed | 2016-01-25 09:29:08 -0800 | [diff] [blame] | 309 | ], |
| 310 | ) |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 311 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 312 | AVX2_SRCS = struct( |
| 313 | include = [ |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 314 | "src/opts/*_avx2.cpp", |
benjaminwagner | 89061ed | 2016-01-25 09:29:08 -0800 | [diff] [blame] | 315 | ], |
| 316 | ) |
mtklein | f6d8d28 | 2015-12-17 10:18:04 -0800 | [diff] [blame] | 317 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 318 | ################################################################################ |
| 319 | ## BASE_HDRS |
| 320 | ################################################################################ |
| 321 | |
| 322 | BASE_HDRS = struct( |
| 323 | include = [ |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 324 | "include/**/*.h", |
| 325 | ], |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 326 | exclude = PRIVATE_HDRS_INCLUDE_LIST + [ |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 327 | # Not used. |
| 328 | "include/animator/**/*", |
| 329 | "include/views/**/*", |
benjaminwagner | 89061ed | 2016-01-25 09:29:08 -0800 | [diff] [blame] | 330 | ], |
| 331 | ) |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 332 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 333 | ################################################################################ |
| 334 | ## BASE_DEPS |
| 335 | ################################################################################ |
| 336 | |
| 337 | BASE_DEPS_ALL = [] |
| 338 | |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 339 | BASE_DEPS_UNIX = [ |
iroth | 330043c | 2016-01-12 14:22:24 -0800 | [diff] [blame] | 340 | ":opts_ssse3", |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 341 | ":opts_sse4", |
| 342 | ":opts_avx", |
| 343 | ":opts_avx2", |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 344 | ] |
| 345 | |
| 346 | BASE_DEPS_ANDROID = [] |
| 347 | |
| 348 | BASE_DEPS_IOS = [] |
| 349 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 350 | ################################################################################ |
| 351 | ## INCLUDES |
| 352 | ################################################################################ |
benjaminwagner | 39e7aa4 | 2015-11-18 13:26:10 -0800 | [diff] [blame] | 353 | |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 354 | # Includes needed by Skia implementation. Not public includes. |
| 355 | INCLUDES = [ |
benjaminwagner | fa7e1a0 | 2015-11-13 12:27:08 -0800 | [diff] [blame] | 356 | "include/android", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 357 | "include/c", |
robertphillips | 188d44c | 2016-02-01 04:54:14 -0800 | [diff] [blame] | 358 | "include/client/android", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 359 | "include/codec", |
| 360 | "include/config", |
| 361 | "include/core", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 362 | "include/effects", |
| 363 | "include/gpu", |
| 364 | "include/images", |
| 365 | "include/pathops", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 366 | "include/pipe", |
| 367 | "include/ports", |
| 368 | "include/private", |
| 369 | "include/utils", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 370 | "include/utils/mac", |
| 371 | "include/utils/win", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 372 | "include/svg", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 373 | "include/xml", |
benjaminwagner | fa7e1a0 | 2015-11-13 12:27:08 -0800 | [diff] [blame] | 374 | "src/codec", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 375 | "src/core", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 376 | "src/gpu", |
| 377 | "src/image", |
| 378 | "src/lazy", |
| 379 | "src/opts", |
benjaminwagner | 2211a7b | 2015-12-01 11:12:05 -0800 | [diff] [blame] | 380 | "src/ports", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 381 | "src/pdf", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 382 | "src/sfnt", |
| 383 | "src/utils", |
| 384 | "third_party/etc1", |
| 385 | "third_party/ktx", |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 386 | ] |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 387 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 388 | ################################################################################ |
| 389 | ## DM_SRCS |
| 390 | ################################################################################ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 391 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 392 | DM_SRCS_ALL = struct( |
| 393 | include = [ |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 394 | "dm/*.cpp", |
| 395 | "dm/*.h", |
| 396 | "gm/*.c", |
| 397 | "gm/*.cpp", |
| 398 | "gm/*.h", |
| 399 | "tests/*.cpp", |
| 400 | "tests/*.h", |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 401 | "tools/BigPathBench.inc", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 402 | "tools/CrashHandler.cpp", |
| 403 | "tools/CrashHandler.h", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 404 | "tools/ProcStats.cpp", |
| 405 | "tools/ProcStats.h", |
| 406 | "tools/Resources.cpp", |
| 407 | "tools/Resources.h", |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 408 | "tools/SkJSONCPP.h", |
| 409 | "tools/UrlDataManager.cpp", |
| 410 | "tools/UrlDataManager.h", |
| 411 | "tools/debugger/*.cpp", |
| 412 | "tools/debugger/*.h", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 413 | "tools/flags/*.cpp", |
| 414 | "tools/flags/*.h", |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 415 | "tools/gpu/**/*.cpp", |
| 416 | "tools/gpu/**/*.h", |
brianosman | 6d3119c | 2016-04-19 19:41:54 -0700 | [diff] [blame] | 417 | "tools/picture_utils.cpp", |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 418 | "tools/picture_utils.h", |
mtklein | e1fc452 | 2016-02-09 12:32:52 -0800 | [diff] [blame] | 419 | "tools/random_parse_path.cpp", |
| 420 | "tools/random_parse_path.h", |
benjaminwagner | 3288514 | 2015-10-24 07:55:31 -0700 | [diff] [blame] | 421 | "tools/sk_tool_utils.cpp", |
| 422 | "tools/sk_tool_utils.h", |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 423 | "tools/sk_tool_utils_flags.h", |
benjaminwagner | 3288514 | 2015-10-24 07:55:31 -0700 | [diff] [blame] | 424 | "tools/sk_tool_utils_font.cpp", |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 425 | "tools/test_font_monospace.inc", |
| 426 | "tools/test_font_sans_serif.inc", |
| 427 | "tools/test_font_serif.inc", |
| 428 | "tools/test_font_index.inc", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 429 | "tools/timer/*.cpp", |
| 430 | "tools/timer/*.h", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 431 | ], |
| 432 | exclude = [ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 433 | "dm/DMSrcSinkAndroid.cpp", # Android-only. |
| 434 | "tests/FontMgrAndroidParserTest.cpp", # Android-only. |
| 435 | "tests/PathOpsSkpClipTest.cpp", # Alternate main. |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 436 | "tests/skia_test.cpp", # Old main. |
| 437 | "tests/SkpSkGrTest.cpp", # Alternate main. |
ethannicholas | f789b38 | 2016-08-03 12:43:36 -0700 | [diff] [blame] | 438 | "tests/SkSL*.cpp", # Excluded along with Vulkan. |
benjaminwagner | 921e48b | 2016-07-15 11:27:27 -0700 | [diff] [blame] | 439 | "tests/SVGDeviceTest.cpp", |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 440 | "tools/gpu/gl/angle/*", |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 441 | "tools/gpu/gl/egl/*", |
| 442 | "tools/gpu/gl/glx/*", |
| 443 | "tools/gpu/gl/iOS/*", |
| 444 | "tools/gpu/gl/mac/*", |
| 445 | "tools/gpu/gl/mesa/*", |
| 446 | "tools/gpu/gl/win/*", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 447 | "tools/timer/SysTimer_mach.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 448 | "tools/timer/SysTimer_windows.cpp", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 449 | ], |
| 450 | ) |
| 451 | |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 452 | DM_SRCS_UNIX = struct( |
| 453 | include = [ |
| 454 | "tools/gpu/gl/CreatePlatformGLContext_none.cpp", |
| 455 | ], |
| 456 | ) |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 457 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 458 | DM_SRCS_ANDROID = struct( |
| 459 | include = [ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 460 | # Depends on Android HWUI library that is not available in google3. |
| 461 | #"dm/DMSrcSinkAndroid.cpp", |
| 462 | "tests/FontMgrAndroidParserTest.cpp", |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 463 | # TODO(benjaminwagner): Figure out how to compile with EGL. |
| 464 | "tools/gpu/gl/CreatePlatformGLContext_none.cpp", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 465 | ], |
| 466 | ) |
| 467 | |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 468 | DM_SRCS_IOS = struct( |
| 469 | include = [ |
| 470 | "tools/gpu/iOS/CreatePlatformGLContext_iOS.cpp", |
| 471 | ], |
| 472 | ) |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 473 | |
| 474 | ################################################################################ |
| 475 | ## DM_INCLUDES |
| 476 | ################################################################################ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 477 | |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 478 | DM_INCLUDES = [ |
benjaminwagner | b1fe8f6 | 2016-02-01 09:05:08 -0800 | [diff] [blame] | 479 | "dm", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 480 | "gm", |
| 481 | "src/codec", |
| 482 | "src/effects", |
benjaminwagner | bc9a9b4 | 2016-02-22 13:30:39 -0800 | [diff] [blame] | 483 | "src/effects/gradients", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 484 | "src/fonts", |
| 485 | "src/pathops", |
| 486 | "src/pipe/utils", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 487 | "src/ports", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 488 | "tests", |
| 489 | "tools", |
benjaminwagner | 99fb670 | 2016-07-28 15:12:21 -0700 | [diff] [blame] | 490 | "tools/debugger", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 491 | "tools/flags", |
benjaminwagner | 38d68bc | 2016-04-01 05:00:51 -0700 | [diff] [blame] | 492 | "tools/gpu", |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 493 | "tools/timer", |
| 494 | ] |
| 495 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 496 | ################################################################################ |
| 497 | ## DM_ARGS |
| 498 | ################################################################################ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 499 | |
benjaminwagner | 83906ae | 2016-05-01 15:02:25 -0700 | [diff] [blame] | 500 | def DM_ARGS(base_dir, asan): |
| 501 | source = ["tests", "gm", "image"] |
| 502 | # TODO(benjaminwagner): f16 and serialize-8888 fail. |
| 503 | config = ["565", "8888", "pdf", "srgb", "tiles_rt", "pic"] |
| 504 | # TODO(mtklein): maybe investigate why these fail? |
| 505 | match = [ |
| 506 | "~Canvas", |
| 507 | "~Codec", |
| 508 | "~Codec_Dimensions", |
| 509 | "~Codec_stripes", |
| 510 | "~FontMgr", |
| 511 | "~PaintBreakText", |
| 512 | "~RecordDraw_TextBounds", |
| 513 | "~Scalar", |
| 514 | "~skps", |
| 515 | "~Stream", |
| 516 | ] |
| 517 | if asan: |
| 518 | # Running all sources and configs under ASAN causes the test to exceed |
| 519 | # "large" size and time out. |
| 520 | source = ["tests", "gm"] |
| 521 | config = ["8888"] |
| 522 | match += [ |
| 523 | "~clippedcubic2", |
| 524 | "~conicpaths", |
| 525 | "~gradients_2pt_conical", |
| 526 | "~Math", |
| 527 | "~Matrix", |
| 528 | "~PathOpsCubic", |
benjaminwagner | b518862 | 2016-06-29 10:26:44 -0700 | [diff] [blame] | 529 | "~PathOpsFailOp", |
caryclark | 523e76d | 2016-07-19 12:27:32 -0700 | [diff] [blame] | 530 | "~PathOpsOpCubicsThreaded", |
benjaminwagner | 83906ae | 2016-05-01 15:02:25 -0700 | [diff] [blame] | 531 | "~PathOpsOpLoopsThreaded", |
| 532 | "~PathOpsSimplify", |
| 533 | "~PathOpsTightBoundsQuads", |
| 534 | "~Point", |
benjaminwagner | 1d35231 | 2016-07-25 06:32:13 -0700 | [diff] [blame] | 535 | "~sk_linear_to_srgb", |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 536 | ] |
benjaminwagner | 83906ae | 2016-05-01 15:02:25 -0700 | [diff] [blame] | 537 | return [ |
| 538 | "--src %s" % " ".join(source), |
| 539 | "--config %s" % " ".join(config), |
| 540 | "--verbose", |
| 541 | "--match %s" % " ".join(match), |
| 542 | "--resourcePath %s/resources" % base_dir, |
| 543 | "--images %s/resources" % base_dir, |
| 544 | ] |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 545 | |
| 546 | ################################################################################ |
| 547 | ## COPTS |
| 548 | ################################################################################ |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 549 | |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 550 | COPTS_UNIX = [ |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 551 | "-Wno-implicit-fallthrough", # Some intentional fallthrough. |
benjaminwagner | 7d974f5 | 2015-10-19 13:55:55 -0700 | [diff] [blame] | 552 | "-Wno-deprecated-declarations", # Internal use of deprecated methods. :( |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 553 | ] |
| 554 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 555 | COPTS_ANDROID = ["-mfpu=neon"] |
| 556 | |
| 557 | COPTS_IOS = [] |
| 558 | |
| 559 | COPTS_ALL = [] |
| 560 | |
| 561 | ################################################################################ |
| 562 | ## DEFINES |
| 563 | ################################################################################ |
| 564 | |
| 565 | DEFINES_UNIX = [ |
scroggo | 7732c0c | 2016-06-22 07:25:16 -0700 | [diff] [blame] | 566 | "PNG_SKIP_SETJMP_CHECK", |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 567 | "SK_BUILD_FOR_UNIX", |
| 568 | "SK_SAMPLES_FOR_X", |
halcanary | 650e20d | 2016-08-25 09:07:02 -0700 | [diff] [blame] | 569 | "SK_PDF_USE_SFNTLY", |
benjaminwagner | 186e0b9 | 2016-02-11 16:00:24 -0800 | [diff] [blame] | 570 | "SK_CODEC_DECODES_RAW", |
msarett | ad3a5c6 | 2016-05-06 07:21:26 -0700 | [diff] [blame] | 571 | "SK_HAS_GIF_LIBRARY", |
| 572 | "SK_HAS_JPEG_LIBRARY", |
scroggo | e6939c1 | 2016-06-21 14:13:40 -0700 | [diff] [blame] | 573 | "SK_HAS_PNG_LIBRARY", |
scroggo | 7732c0c | 2016-06-22 07:25:16 -0700 | [diff] [blame] | 574 | "SK_HAS_WEBP_LIBRARY", |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 575 | ] |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 576 | |
| 577 | DEFINES_ANDROID = [ |
| 578 | "SK_BUILD_FOR_ANDROID", |
benjaminwagner | 186e0b9 | 2016-02-11 16:00:24 -0800 | [diff] [blame] | 579 | "SK_CODEC_DECODES_RAW", |
msarett | ad3a5c6 | 2016-05-06 07:21:26 -0700 | [diff] [blame] | 580 | "SK_HAS_GIF_LIBRARY", |
| 581 | "SK_HAS_JPEG_LIBRARY", |
scroggo | e6939c1 | 2016-06-21 14:13:40 -0700 | [diff] [blame] | 582 | "SK_HAS_PNG_LIBRARY", |
scroggo | 7732c0c | 2016-06-22 07:25:16 -0700 | [diff] [blame] | 583 | "SK_HAS_WEBP_LIBRARY", |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 584 | ] |
| 585 | |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 586 | DEFINES_IOS = [ |
| 587 | "SK_BUILD_FOR_IOS", |
sdefresne | e3fa811 | 2016-06-01 07:08:56 -0700 | [diff] [blame] | 588 | "SK_BUILD_NO_OPTS", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 589 | "SK_IGNORE_ETC1_SUPPORT", |
iroth | d2ccc77 | 2016-01-25 11:24:57 -0800 | [diff] [blame] | 590 | "SKNX_NO_SIMD", |
iroth | 8b99ef4 | 2015-11-02 11:11:21 -0800 | [diff] [blame] | 591 | ] |
| 592 | |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 593 | DEFINES_ALL = [ |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 594 | # Chrome DEFINES. |
| 595 | "SK_USE_FLOATBITS", |
| 596 | "SK_USE_FREETYPE_EMBOLDEN", |
| 597 | # Turn on a few Google3-specific build fixes. |
| 598 | "GOOGLE3", |
reed | d053ce9 | 2016-03-22 10:17:23 -0700 | [diff] [blame] | 599 | # Staging flags for API changes |
benjaminwagner | bddb372 | 2016-07-22 06:19:21 -0700 | [diff] [blame] | 600 | "SK_SUPPORT_LEGACY_ACCESSBITMAP", |
benjaminwagner | b3a3b58 | 2016-09-27 12:28:20 -0700 | [diff] [blame] | 601 | "SK_SUPPORT_LEGACY_ARITHMETICMODE", |
reed | d053ce9 | 2016-03-22 10:17:23 -0700 | [diff] [blame] | 602 | "SK_SUPPORT_LEGACY_COLORFILTER_PTR", |
| 603 | "SK_SUPPORT_LEGACY_CREATESHADER_PTR", |
benjaminwagner | bddb372 | 2016-07-22 06:19:21 -0700 | [diff] [blame] | 604 | "SK_SUPPORT_LEGACY_IMAGEFACTORY", |
benjaminwagner | 31dcc2a | 2016-04-01 06:54:34 -0700 | [diff] [blame] | 605 | "SK_SUPPORT_LEGACY_IMAGEFILTER_PTR", |
benjaminwagner | bddb372 | 2016-07-22 06:19:21 -0700 | [diff] [blame] | 606 | "SK_SUPPORT_LEGACY_MASKFILTER_PTR", |
benjaminwagner | 31dcc2a | 2016-04-01 06:54:34 -0700 | [diff] [blame] | 607 | "SK_SUPPORT_LEGACY_MINOR_EFFECT_PTR", |
robertphillips | 0652baa | 2016-08-08 09:17:20 -0700 | [diff] [blame] | 608 | "SK_SUPPORT_LEGACY_NEW_SURFACE_API", |
benjaminwagner | 31dcc2a | 2016-04-01 06:54:34 -0700 | [diff] [blame] | 609 | "SK_SUPPORT_LEGACY_PATHEFFECT_PTR", |
fmalita | 41c4096 | 2016-03-24 11:05:28 -0700 | [diff] [blame] | 610 | "SK_SUPPORT_LEGACY_PICTURE_PTR", |
bungeman | 13b9c95 | 2016-05-12 10:09:30 -0700 | [diff] [blame] | 611 | "SK_SUPPORT_LEGACY_TYPEFACE_PTR", |
benjaminwagner | bddb372 | 2016-07-22 06:19:21 -0700 | [diff] [blame] | 612 | "SK_SUPPORT_LEGACY_XFERMODE_PTR", |
reed | dfd32b7 | 2016-08-11 05:04:51 -0700 | [diff] [blame] | 613 | "SK_SUPPORT_LEGACY_PICTUREINSTALLPIXELREF", |
reed | 42943c8 | 2016-09-12 12:01:44 -0700 | [diff] [blame] | 614 | "SK_SUPPORT_LEGACY_STREAM_DATA", |
fmalita | 37283c2 | 2016-09-13 10:00:23 -0700 | [diff] [blame] | 615 | "SK_SUPPORT_LEGACY_TEXTBLOB_BUILDER", |
reed | 73603f3 | 2016-09-20 08:42:38 -0700 | [diff] [blame] | 616 | "SK_SUPPORT_LEGACY_CLIP_REGIONOPS", |
Mike Reed | 627778d | 2016-09-28 17:13:38 -0400 | [diff] [blame] | 617 | "SK_SUPPORT_LEGACY_SHADER_ISABITMAP", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 618 | ] |
| 619 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 620 | ################################################################################ |
| 621 | ## LINKOPTS |
| 622 | ################################################################################ |
benjaminwagner | 86ea33e | 2015-10-26 10:46:25 -0700 | [diff] [blame] | 623 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 624 | LINKOPTS_UNIX = [] |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 625 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 626 | LINKOPTS_ANDROID = [ |
| 627 | "-lEGL", |
| 628 | ] |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 629 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 630 | LINKOPTS_IOS = [] |
benjaminwagner | 6f6bef8 | 2015-10-15 08:09:44 -0700 | [diff] [blame] | 631 | |
benjaminwagner | 56f6d06 | 2016-01-13 10:45:19 -0800 | [diff] [blame] | 632 | LINKOPTS_ALL = [ |
| 633 | "-ldl", |
| 634 | ] |