| OLD | NEW |
| (Empty) |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 | |
| 6 # This gypi file contains the Skia library. | |
| 7 # In component mode (shared_lib) it is folded into a single shared library with | |
| 8 # the Chrome-specific enhancements but in all other cases it is a separate lib. | |
| 9 { | |
| 10 'dependencies': [ | |
| 11 'skia_library_opts.gyp:skia_opts', | |
| 12 '../third_party/zlib/zlib.gyp:zlib', | |
| 13 ], | |
| 14 | |
| 15 'variables': { | |
| 16 'variables': { | |
| 17 'conditions': [ | |
| 18 ['OS== "ios"', { | |
| 19 'skia_support_gpu': 0, | |
| 20 }, { | |
| 21 'skia_support_gpu': 1, | |
| 22 }], | |
| 23 ['OS=="ios" or OS=="android"', { | |
| 24 'skia_support_pdf': 0, | |
| 25 }, { | |
| 26 'skia_support_pdf': 1, | |
| 27 }], | |
| 28 ], | |
| 29 }, | |
| 30 'skia_support_gpu': '<(skia_support_gpu)', | |
| 31 'skia_support_pdf': '<(skia_support_pdf)', | |
| 32 | |
| 33 # These two set the paths so we can include skia/gyp/core.gypi | |
| 34 'skia_src_path': '../third_party/skia/src', | |
| 35 'skia_include_path': '../third_party/skia/include', | |
| 36 | |
| 37 # This list will contain all defines that also need to be exported to | |
| 38 # dependent components. | |
| 39 'skia_export_defines': [ | |
| 40 'SK_ENABLE_INST_COUNT=0', | |
| 41 'SK_SUPPORT_GPU=<(skia_support_gpu)', | |
| 42 'GR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"', | |
| 43 ], | |
| 44 | |
| 45 'default_font_cache_limit': '(20*1024*1024)', | |
| 46 | |
| 47 'conditions': [ | |
| 48 ['OS== "android"', { | |
| 49 # Android devices are typically more memory constrained, so | |
| 50 # use a smaller glyph cache. | |
| 51 'default_font_cache_limit': '(8*1024*1024)', | |
| 52 'skia_export_defines': [ | |
| 53 'SK_BUILD_FOR_ANDROID', | |
| 54 'USE_CHROMIUM_SKIA', | |
| 55 ], | |
| 56 }], | |
| 57 ], | |
| 58 }, | |
| 59 | |
| 60 'includes': [ | |
| 61 '../third_party/skia/gyp/core.gypi', | |
| 62 '../third_party/skia/gyp/effects.gypi', | |
| 63 ], | |
| 64 | |
| 65 'sources': [ | |
| 66 # this should likely be moved into src/utils in skia | |
| 67 '../third_party/skia/src/core/SkFlate.cpp', | |
| 68 # We don't want to add this to Skia's core.gypi since it is | |
| 69 # Android only. Include it here and remove it for everyone | |
| 70 # but Android later. | |
| 71 '../third_party/skia/src/core/SkPaintOptionsAndroid.cpp', | |
| 72 | |
| 73 '../third_party/skia/src/ports/SkImageDecoder_empty.cpp', | |
| 74 '../third_party/skia/src/images/SkScaledBitmapSampler.cpp', | |
| 75 '../third_party/skia/src/images/SkScaledBitmapSampler.h', | |
| 76 | |
| 77 '../third_party/skia/src/opts/opts_check_SSE2.cpp', | |
| 78 | |
| 79 '../third_party/skia/src/pdf/SkPDFCatalog.cpp', | |
| 80 '../third_party/skia/src/pdf/SkPDFCatalog.h', | |
| 81 '../third_party/skia/src/pdf/SkPDFDevice.cpp', | |
| 82 '../third_party/skia/src/pdf/SkPDFDocument.cpp', | |
| 83 '../third_party/skia/src/pdf/SkPDFFont.cpp', | |
| 84 '../third_party/skia/src/pdf/SkPDFFont.h', | |
| 85 '../third_party/skia/src/pdf/SkPDFFormXObject.cpp', | |
| 86 '../third_party/skia/src/pdf/SkPDFFormXObject.h', | |
| 87 '../third_party/skia/src/pdf/SkPDFGraphicState.cpp', | |
| 88 '../third_party/skia/src/pdf/SkPDFGraphicState.h', | |
| 89 '../third_party/skia/src/pdf/SkPDFImage.cpp', | |
| 90 '../third_party/skia/src/pdf/SkPDFImage.h', | |
| 91 '../third_party/skia/src/pdf/SkPDFImageStream.cpp', | |
| 92 '../third_party/skia/src/pdf/SkPDFImageStream.h', | |
| 93 '../third_party/skia/src/pdf/SkPDFPage.cpp', | |
| 94 '../third_party/skia/src/pdf/SkPDFPage.h', | |
| 95 '../third_party/skia/src/pdf/SkPDFShader.cpp', | |
| 96 '../third_party/skia/src/pdf/SkPDFShader.h', | |
| 97 '../third_party/skia/src/pdf/SkPDFStream.cpp', | |
| 98 '../third_party/skia/src/pdf/SkPDFStream.h', | |
| 99 '../third_party/skia/src/pdf/SkPDFTypes.cpp', | |
| 100 '../third_party/skia/src/pdf/SkPDFTypes.h', | |
| 101 '../third_party/skia/src/pdf/SkPDFUtils.cpp', | |
| 102 '../third_party/skia/src/pdf/SkPDFUtils.h', | |
| 103 | |
| 104 '../third_party/skia/src/ports/SkPurgeableMemoryBlock_none.cpp', | |
| 105 | |
| 106 '../third_party/skia/src/ports/SkFontConfigInterface_android.cpp', | |
| 107 '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp', | |
| 108 | |
| 109 '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp', | |
| 110 '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp', | |
| 111 | |
| 112 '../third_party/skia/src/ports/SkFontHost_FreeType.cpp', | |
| 113 '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp', | |
| 114 '../third_party/skia/src/ports/SkFontHost_FreeType_common.h', | |
| 115 '../third_party/skia/src/ports/SkFontConfigParser_android.cpp', | |
| 116 '../third_party/skia/src/ports/SkFontHost_mac.cpp', | |
| 117 '../third_party/skia/src/ports/SkFontHost_win.cpp', | |
| 118 '../third_party/skia/src/ports/SkGlobalInitialization_chromium.cpp', | |
| 119 '../third_party/skia/src/ports/SkOSFile_posix.cpp', | |
| 120 '../third_party/skia/src/ports/SkOSFile_stdio.cpp', | |
| 121 '../third_party/skia/src/ports/SkOSFile_win.cpp', | |
| 122 '../third_party/skia/src/ports/SkThread_pthread.cpp', | |
| 123 '../third_party/skia/src/ports/SkThread_win.cpp', | |
| 124 '../third_party/skia/src/ports/SkTime_Unix.cpp', | |
| 125 | |
| 126 '../third_party/skia/src/sfnt/SkOTUtils.cpp', | |
| 127 '../third_party/skia/src/sfnt/SkOTUtils.h', | |
| 128 | |
| 129 '../third_party/skia/include/utils/mac/SkCGUtils.h', | |
| 130 '../third_party/skia/include/utils/SkDeferredCanvas.h', | |
| 131 '../third_party/skia/include/utils/SkMatrix44.h', | |
| 132 '../third_party/skia/src/utils/debugger/SkDebugCanvas.cpp', | |
| 133 '../third_party/skia/src/utils/debugger/SkDebugCanvas.h', | |
| 134 '../third_party/skia/src/utils/debugger/SkDrawCommand.cpp', | |
| 135 '../third_party/skia/src/utils/debugger/SkDrawCommand.h', | |
| 136 '../third_party/skia/src/utils/debugger/SkObjectParser.cpp', | |
| 137 '../third_party/skia/src/utils/debugger/SkObjectParser.h', | |
| 138 '../third_party/skia/src/utils/mac/SkCreateCGImageRef.cpp', | |
| 139 '../third_party/skia/src/utils/SkBase64.cpp', | |
| 140 '../third_party/skia/src/utils/SkBase64.h', | |
| 141 '../third_party/skia/src/utils/SkBitSet.cpp', | |
| 142 '../third_party/skia/src/utils/SkBitSet.h', | |
| 143 '../third_party/skia/src/utils/SkDeferredCanvas.cpp', | |
| 144 '../third_party/skia/src/utils/SkMatrix44.cpp', | |
| 145 '../third_party/skia/src/utils/SkNullCanvas.cpp', | |
| 146 '../third_party/skia/include/utils/SkNWayCanvas.h', | |
| 147 '../third_party/skia/src/utils/SkNWayCanvas.cpp', | |
| 148 '../third_party/skia/src/utils/SkPictureUtils.cpp', | |
| 149 '../third_party/skia/src/utils/SkRTConf.cpp', | |
| 150 '../third_party/skia/include/utils/SkRTConf.h', | |
| 151 '../third_party/skia/include/pdf/SkPDFDevice.h', | |
| 152 '../third_party/skia/include/pdf/SkPDFDocument.h', | |
| 153 | |
| 154 '../third_party/skia/include/ports/SkTypeface_win.h', | |
| 155 | |
| 156 '../third_party/skia/include/images/SkImageRef.h', | |
| 157 '../third_party/skia/include/images/SkImageRef_GlobalPool.h', | |
| 158 '../third_party/skia/include/images/SkMovie.h', | |
| 159 '../third_party/skia/include/images/SkPageFlipper.h', | |
| 160 | |
| 161 '../third_party/skia/include/utils/SkNullCanvas.h', | |
| 162 '../third_party/skia/include/utils/SkPictureUtils.h', | |
| 163 ], | |
| 164 'include_dirs': [ | |
| 165 '..', | |
| 166 'config', | |
| 167 '../third_party/skia/include/config', | |
| 168 '../third_party/skia/include/core', | |
| 169 '../third_party/skia/include/effects', | |
| 170 '../third_party/skia/include/images', | |
| 171 '../third_party/skia/include/lazy', | |
| 172 '../third_party/skia/include/pathops', | |
| 173 '../third_party/skia/include/pdf', | |
| 174 '../third_party/skia/include/pipe', | |
| 175 '../third_party/skia/include/ports', | |
| 176 '../third_party/skia/include/utils', | |
| 177 '../third_party/skia/src/core', | |
| 178 '../third_party/skia/src/image', | |
| 179 '../third_party/skia/src/sfnt', | |
| 180 '../third_party/skia/src/utils', | |
| 181 '../third_party/skia/src/lazy', | |
| 182 ], | |
| 183 'conditions': [ | |
| 184 ['skia_support_gpu != 0', { | |
| 185 'includes': [ | |
| 186 '../third_party/skia/gyp/gpu.gypi', | |
| 187 ], | |
| 188 'sources': [ | |
| 189 '<@(skgpu_sources)', | |
| 190 ], | |
| 191 'include_dirs': [ | |
| 192 '../third_party/skia/include/gpu', | |
| 193 '../third_party/skia/include/gpu/gl', | |
| 194 '../third_party/skia/src/gpu', | |
| 195 ], | |
| 196 }], | |
| 197 ['skia_support_pdf == 0', { | |
| 198 'sources/': [ | |
| 199 ['exclude', '../third_party/skia/src/pdf/'] | |
| 200 ], | |
| 201 }], | |
| 202 ['skia_support_pdf == 1', { | |
| 203 'dependencies': [ | |
| 204 '../third_party/sfntly/sfntly.gyp:sfntly', | |
| 205 ], | |
| 206 }], | |
| 207 | |
| 208 #Settings for text blitting, chosen to approximate the system browser. | |
| 209 [ 'OS == "linux"', { | |
| 210 'defines': [ | |
| 211 'SK_GAMMA_EXPONENT=1.2', | |
| 212 'SK_GAMMA_CONTRAST=0.2', | |
| 213 ], | |
| 214 }], | |
| 215 ['OS == "android"', { | |
| 216 'defines': [ | |
| 217 'SK_GAMMA_APPLY_TO_A8', | |
| 218 'SK_GAMMA_EXPONENT=1.4', | |
| 219 'SK_GAMMA_CONTRAST=0.0', | |
| 220 ], | |
| 221 }], | |
| 222 ['OS == "win"', { | |
| 223 'defines': [ | |
| 224 'SK_GAMMA_SRGB', | |
| 225 'SK_GAMMA_CONTRAST=0.5', | |
| 226 ], | |
| 227 }], | |
| 228 ['OS == "mac"', { | |
| 229 'defines': [ | |
| 230 'SK_GAMMA_SRGB', | |
| 231 'SK_GAMMA_CONTRAST=0.0', | |
| 232 ], | |
| 233 }], | |
| 234 | |
| 235 # For POSIX platforms, prefer the Mutex implementation provided by Skia | |
| 236 # since it does not generate static initializers. | |
| 237 [ 'OS == "android" or OS == "linux" or OS == "mac" or OS == "ios"', { | |
| 238 'defines+': [ | |
| 239 'SK_USE_POSIX_THREADS', | |
| 240 ], | |
| 241 'direct_dependent_settings': { | |
| 242 'defines': [ | |
| 243 'SK_USE_POSIX_THREADS', | |
| 244 ], | |
| 245 }, | |
| 246 }], | |
| 247 | |
| 248 [ 'OS != "android"', { | |
| 249 'sources!': [ | |
| 250 '../third_party/skia/src/core/SkPaintOptionsAndroid.cpp', | |
| 251 ], | |
| 252 }], | |
| 253 [ 'OS != "ios"', { | |
| 254 'dependencies': [ | |
| 255 '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/skia_webkit.gyp:skia
_webkit', | |
| 256 ], | |
| 257 }], | |
| 258 [ 'OS != "mac"', { | |
| 259 'sources/': [ | |
| 260 ['exclude', '/mac/'] | |
| 261 ], | |
| 262 }], | |
| 263 [ 'target_arch == "arm" and arm_version >= 7 and arm_neon == 1', { | |
| 264 'defines': [ | |
| 265 '__ARM_HAVE_NEON', | |
| 266 ], | |
| 267 }], | |
| 268 [ 'target_arch == "arm" and arm_version >= 7 and arm_neon_optional == 1', { | |
| 269 'defines': [ | |
| 270 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', | |
| 271 ], | |
| 272 }], | |
| 273 [ 'OS == "android" and target_arch == "arm"', { | |
| 274 'sources': [ | |
| 275 '../third_party/skia/src/core/SkUtilsArm.cpp', | |
| 276 ], | |
| 277 'includes': [ | |
| 278 '../build/android/cpufeatures.gypi', | |
| 279 ], | |
| 280 }], | |
| 281 [ 'target_arch == "arm" or target_arch == "mipsel"', { | |
| 282 'sources!': [ | |
| 283 '../third_party/skia/src/opts/opts_check_SSE2.cpp' | |
| 284 ], | |
| 285 }], | |
| 286 [ 'use_glib == 1', { | |
| 287 'dependencies': [ | |
| 288 '../build/linux/system.gyp:fontconfig', | |
| 289 '../build/linux/system.gyp:freetype2', | |
| 290 '../build/linux/system.gyp:pangocairo', | |
| 291 '../third_party/icu/icu.gyp:icuuc', | |
| 292 ], | |
| 293 'cflags': [ | |
| 294 '-Wno-unused', | |
| 295 '-Wno-unused-function', | |
| 296 ], | |
| 297 }], | |
| 298 [ 'use_glib == 0', { | |
| 299 'sources!': [ | |
| 300 '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp', | |
| 301 '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp', | |
| 302 ], | |
| 303 }], | |
| 304 [ 'use_glib == 0 and OS != "android"', { | |
| 305 'sources!': [ | |
| 306 '../third_party/skia/src/ports/SkFontHost_FreeType.cpp', | |
| 307 '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp', | |
| 308 '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp', | |
| 309 | |
| 310 ], | |
| 311 }], | |
| 312 [ 'OS == "android"', { | |
| 313 'dependencies': [ | |
| 314 '../third_party/expat/expat.gyp:expat', | |
| 315 '../third_party/freetype/freetype.gyp:ft2', | |
| 316 ], | |
| 317 # This exports a hard dependency because it needs to run its | |
| 318 # symlink action in order to expose the skia header files. | |
| 319 'hard_dependency': 1, | |
| 320 'include_dirs': [ | |
| 321 '../third_party/expat/files/lib', | |
| 322 ], | |
| 323 }], | |
| 324 [ 'OS == "ios"', { | |
| 325 'defines': [ | |
| 326 'SK_BUILD_FOR_IOS', | |
| 327 'SK_USE_MAC_CORE_TEXT', | |
| 328 ], | |
| 329 'include_dirs': [ | |
| 330 '../third_party/skia/include/utils/ios', | |
| 331 '../third_party/skia/include/utils/mac', | |
| 332 ], | |
| 333 'link_settings': { | |
| 334 'libraries': [ | |
| 335 '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework', | |
| 336 ], | |
| 337 }, | |
| 338 'sources': [ | |
| 339 # This file is used on both iOS and Mac, so it should be removed | |
| 340 # from the ios and mac conditions and moved into the main sources | |
| 341 # list. | |
| 342 '../third_party/skia/src/utils/mac/SkStream_mac.cpp', | |
| 343 ], | |
| 344 'sources/': [ | |
| 345 ['exclude', 'opts_check_SSE2\\.cpp$'], | |
| 346 ], | |
| 347 | |
| 348 # The main skia_opts target does not currently work on iOS because the | |
| 349 # target architecture on iOS is determined at compile time rather than | |
| 350 # gyp time (simulator builds are x86, device builds are arm). As a | |
| 351 # temporary measure, this is a separate opts target for iOS-only, using | |
| 352 # the _none.cpp files to avoid architecture-dependent implementations. | |
| 353 'dependencies': [ | |
| 354 'skia_library_opts.gyp:skia_opts_none', | |
| 355 ], | |
| 356 'dependencies!': [ | |
| 357 'skia_library_opts.gyp:skia_opts', | |
| 358 ], | |
| 359 }], | |
| 360 [ 'OS == "mac"', { | |
| 361 'defines': [ | |
| 362 'SK_BUILD_FOR_MAC', | |
| 363 'SK_USE_MAC_CORE_TEXT', | |
| 364 ], | |
| 365 'direct_dependent_settings': { | |
| 366 'include_dirs': [ | |
| 367 '../third_party/skia/include/utils/mac', | |
| 368 ], | |
| 369 }, | |
| 370 'include_dirs': [ | |
| 371 '../third_party/skia/include/utils/mac', | |
| 372 ], | |
| 373 'link_settings': { | |
| 374 'libraries': [ | |
| 375 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', | |
| 376 ], | |
| 377 }, | |
| 378 'sources': [ | |
| 379 '../third_party/skia/src/utils/mac/SkStream_mac.cpp', | |
| 380 ], | |
| 381 }], | |
| 382 [ 'OS == "win"', { | |
| 383 'defines': [ | |
| 384 'SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS' | |
| 385 ], | |
| 386 'sources!': [ | |
| 387 '../third_party/skia/src/ports/SkOSFile_posix.cpp', | |
| 388 '../third_party/skia/src/ports/SkThread_pthread.cpp', | |
| 389 '../third_party/skia/src/ports/SkTime_Unix.cpp', | |
| 390 ], | |
| 391 }], | |
| 392 # TODO(scottmg): http://crbug.com/177306 | |
| 393 ['clang==1', { | |
| 394 'xcode_settings': { | |
| 395 'WARNING_CFLAGS!': [ | |
| 396 # Don't warn about string->bool used in asserts. | |
| 397 '-Wstring-conversion', | |
| 398 ], | |
| 399 }, | |
| 400 'cflags!': [ | |
| 401 '-Wstring-conversion', | |
| 402 ], | |
| 403 }], | |
| 404 ], | |
| 405 'target_conditions': [ | |
| 406 # Pull in specific Mac files for iOS (which have been filtered out | |
| 407 # by file name rules). | |
| 408 [ 'OS == "ios"', { | |
| 409 'sources/': [ | |
| 410 ['include', 'SkFontHost_mac\\.cpp$',], | |
| 411 ['include', 'SkStream_mac\\.cpp$',], | |
| 412 ['include', 'SkCreateCGImageRef\\.cpp$',], | |
| 413 ], | |
| 414 }], | |
| 415 ], | |
| 416 | |
| 417 'defines': [ | |
| 418 '<@(skia_export_defines)', | |
| 419 | |
| 420 # this flag can be removed entirely once this has baked for a while | |
| 421 'SK_ALLOW_OVER_32K_BITMAPS', | |
| 422 | |
| 423 # skia uses static initializers to initialize the serialization logic | |
| 424 # of its "pictures" library. This is currently not used in chrome; if | |
| 425 # it ever gets used the processes that use it need to call | |
| 426 # SkGraphics::Init(). | |
| 427 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0', | |
| 428 | |
| 429 # Disable this check because it is too strict for some Chromium-specific | |
| 430 # subclasses of SkPixelRef. See bug: crbug.com/171776. | |
| 431 'SK_DISABLE_PIXELREF_LOCKCOUNT_BALANCE_CHECK', | |
| 432 | |
| 433 'IGNORE_ROT_AA_RECT_OPT', | |
| 434 | |
| 435 'SK_DEFAULT_FONT_CACHE_LIMIT=<(default_font_cache_limit)', | |
| 436 ], | |
| 437 | |
| 438 'direct_dependent_settings': { | |
| 439 'include_dirs': [ | |
| 440 #temporary until we can hide SkFontHost | |
| 441 '../third_party/skia/src/core', | |
| 442 | |
| 443 'config', | |
| 444 '../third_party/skia/include/config', | |
| 445 '../third_party/skia/include/core', | |
| 446 '../third_party/skia/include/effects', | |
| 447 '../third_party/skia/include/pdf', | |
| 448 '../third_party/skia/include/gpu', | |
| 449 '../third_party/skia/include/gpu/gl', | |
| 450 '../third_party/skia/include/lazy', | |
| 451 '../third_party/skia/include/pathops', | |
| 452 '../third_party/skia/include/pipe', | |
| 453 '../third_party/skia/include/ports', | |
| 454 '../third_party/skia/include/utils', | |
| 455 ], | |
| 456 'defines': [ | |
| 457 '<@(skia_export_defines)', | |
| 458 ], | |
| 459 }, | |
| 460 } | |
| OLD | NEW |