| 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 '../third_party/skia/src/ports/SkTLS_pthread.cpp', |
| 126 '../third_party/skia/src/ports/SkTLS_win.cpp', |
| 127 |
| 128 '../third_party/skia/src/sfnt/SkOTUtils.cpp', |
| 129 '../third_party/skia/src/sfnt/SkOTUtils.h', |
| 130 |
| 131 '../third_party/skia/include/utils/mac/SkCGUtils.h', |
| 132 '../third_party/skia/include/utils/SkDeferredCanvas.h', |
| 133 '../third_party/skia/include/utils/SkMatrix44.h', |
| 134 '../third_party/skia/src/utils/debugger/SkDebugCanvas.cpp', |
| 135 '../third_party/skia/src/utils/debugger/SkDebugCanvas.h', |
| 136 '../third_party/skia/src/utils/debugger/SkDrawCommand.cpp', |
| 137 '../third_party/skia/src/utils/debugger/SkDrawCommand.h', |
| 138 '../third_party/skia/src/utils/debugger/SkObjectParser.cpp', |
| 139 '../third_party/skia/src/utils/debugger/SkObjectParser.h', |
| 140 '../third_party/skia/src/utils/mac/SkCreateCGImageRef.cpp', |
| 141 '../third_party/skia/src/utils/SkBase64.cpp', |
| 142 '../third_party/skia/src/utils/SkBase64.h', |
| 143 '../third_party/skia/src/utils/SkBitSet.cpp', |
| 144 '../third_party/skia/src/utils/SkBitSet.h', |
| 145 '../third_party/skia/src/utils/SkDeferredCanvas.cpp', |
| 146 '../third_party/skia/src/utils/SkMatrix44.cpp', |
| 147 '../third_party/skia/src/utils/SkNullCanvas.cpp', |
| 148 '../third_party/skia/include/utils/SkNWayCanvas.h', |
| 149 '../third_party/skia/src/utils/SkNWayCanvas.cpp', |
| 150 '../third_party/skia/src/utils/SkPictureUtils.cpp', |
| 151 '../third_party/skia/src/utils/SkRTConf.cpp', |
| 152 '../third_party/skia/include/utils/SkRTConf.h', |
| 153 '../third_party/skia/include/pdf/SkPDFDevice.h', |
| 154 '../third_party/skia/include/pdf/SkPDFDocument.h', |
| 155 |
| 156 '../third_party/skia/include/ports/SkTypeface_win.h', |
| 157 |
| 158 '../third_party/skia/include/images/SkImageRef.h', |
| 159 '../third_party/skia/include/images/SkImageRef_GlobalPool.h', |
| 160 '../third_party/skia/include/images/SkMovie.h', |
| 161 '../third_party/skia/include/images/SkPageFlipper.h', |
| 162 |
| 163 '../third_party/skia/include/utils/SkNullCanvas.h', |
| 164 '../third_party/skia/include/utils/SkPictureUtils.h', |
| 165 ], |
| 166 'include_dirs': [ |
| 167 '..', |
| 168 'config', |
| 169 '../third_party/skia/include/config', |
| 170 '../third_party/skia/include/core', |
| 171 '../third_party/skia/include/effects', |
| 172 '../third_party/skia/include/images', |
| 173 '../third_party/skia/include/lazy', |
| 174 '../third_party/skia/include/pathops', |
| 175 '../third_party/skia/include/pdf', |
| 176 '../third_party/skia/include/pipe', |
| 177 '../third_party/skia/include/ports', |
| 178 '../third_party/skia/include/utils', |
| 179 '../third_party/skia/src/core', |
| 180 '../third_party/skia/src/image', |
| 181 '../third_party/skia/src/sfnt', |
| 182 '../third_party/skia/src/utils', |
| 183 '../third_party/skia/src/lazy', |
| 184 ], |
| 185 'conditions': [ |
| 186 ['skia_support_gpu != 0', { |
| 187 'includes': [ |
| 188 '../third_party/skia/gyp/gpu.gypi', |
| 189 ], |
| 190 'sources': [ |
| 191 '<@(skgpu_sources)', |
| 192 ], |
| 193 'include_dirs': [ |
| 194 '../third_party/skia/include/gpu', |
| 195 '../third_party/skia/include/gpu/gl', |
| 196 '../third_party/skia/src/gpu', |
| 197 ], |
| 198 }], |
| 199 ['skia_support_pdf == 0', { |
| 200 'sources/': [ |
| 201 ['exclude', '../third_party/skia/src/pdf/'] |
| 202 ], |
| 203 }], |
| 204 ['skia_support_pdf == 1', { |
| 205 'dependencies': [ |
| 206 '../third_party/sfntly/sfntly.gyp:sfntly', |
| 207 ], |
| 208 }], |
| 209 |
| 210 #Settings for text blitting, chosen to approximate the system browser. |
| 211 [ 'OS == "linux"', { |
| 212 'defines': [ |
| 213 'SK_GAMMA_EXPONENT=1.2', |
| 214 'SK_GAMMA_CONTRAST=0.2', |
| 215 ], |
| 216 }], |
| 217 ['OS == "android"', { |
| 218 'defines': [ |
| 219 'SK_GAMMA_APPLY_TO_A8', |
| 220 'SK_GAMMA_EXPONENT=1.4', |
| 221 'SK_GAMMA_CONTRAST=0.0', |
| 222 ], |
| 223 }], |
| 224 ['OS == "win"', { |
| 225 'defines': [ |
| 226 'SK_GAMMA_SRGB', |
| 227 'SK_GAMMA_CONTRAST=0.5', |
| 228 ], |
| 229 }], |
| 230 ['OS == "mac"', { |
| 231 'defines': [ |
| 232 'SK_GAMMA_SRGB', |
| 233 'SK_GAMMA_CONTRAST=0.0', |
| 234 ], |
| 235 }], |
| 236 |
| 237 # For POSIX platforms, prefer the Mutex implementation provided by Skia |
| 238 # since it does not generate static initializers. |
| 239 [ 'OS == "android" or OS == "linux" or OS == "mac" or OS == "ios"', { |
| 240 'defines+': [ |
| 241 'SK_USE_POSIX_THREADS', |
| 242 ], |
| 243 'direct_dependent_settings': { |
| 244 'defines': [ |
| 245 'SK_USE_POSIX_THREADS', |
| 246 ], |
| 247 }, |
| 248 }], |
| 249 |
| 250 [ 'OS != "android"', { |
| 251 'sources!': [ |
| 252 '../third_party/skia/src/core/SkPaintOptionsAndroid.cpp', |
| 253 ], |
| 254 }], |
| 255 [ 'OS != "ios"', { |
| 256 'dependencies': [ |
| 257 '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/skia_webkit.gyp:skia
_webkit', |
| 258 ], |
| 259 }], |
| 260 [ 'OS != "mac"', { |
| 261 'sources/': [ |
| 262 ['exclude', '/mac/'] |
| 263 ], |
| 264 }], |
| 265 [ 'target_arch == "arm" and arm_version >= 7 and arm_neon == 1', { |
| 266 'defines': [ |
| 267 '__ARM_HAVE_NEON', |
| 268 ], |
| 269 }], |
| 270 [ 'target_arch == "arm" and arm_version >= 7 and arm_neon_optional == 1', { |
| 271 'defines': [ |
| 272 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', |
| 273 ], |
| 274 }], |
| 275 [ 'OS == "android" and target_arch == "arm"', { |
| 276 'sources': [ |
| 277 '../third_party/skia/src/core/SkUtilsArm.cpp', |
| 278 ], |
| 279 'includes': [ |
| 280 '../build/android/cpufeatures.gypi', |
| 281 ], |
| 282 }], |
| 283 [ 'target_arch == "arm" or target_arch == "mipsel"', { |
| 284 'sources!': [ |
| 285 '../third_party/skia/src/opts/opts_check_SSE2.cpp' |
| 286 ], |
| 287 }], |
| 288 [ 'use_glib == 1', { |
| 289 'dependencies': [ |
| 290 '../build/linux/system.gyp:fontconfig', |
| 291 '../build/linux/system.gyp:freetype2', |
| 292 '../build/linux/system.gyp:pangocairo', |
| 293 '../third_party/icu/icu.gyp:icuuc', |
| 294 ], |
| 295 'cflags': [ |
| 296 '-Wno-unused', |
| 297 '-Wno-unused-function', |
| 298 ], |
| 299 }], |
| 300 [ 'use_glib == 0', { |
| 301 'sources!': [ |
| 302 '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp', |
| 303 '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp', |
| 304 ], |
| 305 }], |
| 306 [ 'use_glib == 0 and OS != "android"', { |
| 307 'sources!': [ |
| 308 '../third_party/skia/src/ports/SkFontHost_FreeType.cpp', |
| 309 '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp', |
| 310 '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp', |
| 311 |
| 312 ], |
| 313 }], |
| 314 [ 'OS == "android"', { |
| 315 'dependencies': [ |
| 316 '../third_party/expat/expat.gyp:expat', |
| 317 '../third_party/freetype/freetype.gyp:ft2', |
| 318 ], |
| 319 # This exports a hard dependency because it needs to run its |
| 320 # symlink action in order to expose the skia header files. |
| 321 'hard_dependency': 1, |
| 322 'include_dirs': [ |
| 323 '../third_party/expat/files/lib', |
| 324 ], |
| 325 }], |
| 326 [ 'OS == "ios"', { |
| 327 'defines': [ |
| 328 'SK_BUILD_FOR_IOS', |
| 329 'SK_USE_MAC_CORE_TEXT', |
| 330 ], |
| 331 'include_dirs': [ |
| 332 '../third_party/skia/include/utils/ios', |
| 333 '../third_party/skia/include/utils/mac', |
| 334 ], |
| 335 'link_settings': { |
| 336 'libraries': [ |
| 337 '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework', |
| 338 ], |
| 339 }, |
| 340 'sources': [ |
| 341 # This file is used on both iOS and Mac, so it should be removed |
| 342 # from the ios and mac conditions and moved into the main sources |
| 343 # list. |
| 344 '../third_party/skia/src/utils/mac/SkStream_mac.cpp', |
| 345 ], |
| 346 'sources/': [ |
| 347 ['exclude', 'opts_check_SSE2\\.cpp$'], |
| 348 ], |
| 349 |
| 350 # The main skia_opts target does not currently work on iOS because the |
| 351 # target architecture on iOS is determined at compile time rather than |
| 352 # gyp time (simulator builds are x86, device builds are arm). As a |
| 353 # temporary measure, this is a separate opts target for iOS-only, using |
| 354 # the _none.cpp files to avoid architecture-dependent implementations. |
| 355 'dependencies': [ |
| 356 'skia_library_opts.gyp:skia_opts_none', |
| 357 ], |
| 358 'dependencies!': [ |
| 359 'skia_library_opts.gyp:skia_opts', |
| 360 ], |
| 361 }], |
| 362 [ 'OS == "mac"', { |
| 363 'defines': [ |
| 364 'SK_BUILD_FOR_MAC', |
| 365 'SK_USE_MAC_CORE_TEXT', |
| 366 ], |
| 367 'direct_dependent_settings': { |
| 368 'include_dirs': [ |
| 369 '../third_party/skia/include/utils/mac', |
| 370 ], |
| 371 }, |
| 372 'include_dirs': [ |
| 373 '../third_party/skia/include/utils/mac', |
| 374 ], |
| 375 'link_settings': { |
| 376 'libraries': [ |
| 377 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', |
| 378 ], |
| 379 }, |
| 380 'sources': [ |
| 381 '../third_party/skia/src/utils/mac/SkStream_mac.cpp', |
| 382 ], |
| 383 }], |
| 384 [ 'OS == "win"', { |
| 385 'sources!': [ |
| 386 '../third_party/skia/src/ports/SkOSFile_posix.cpp', |
| 387 '../third_party/skia/src/ports/SkThread_pthread.cpp', |
| 388 '../third_party/skia/src/ports/SkTime_Unix.cpp', |
| 389 '../third_party/skia/src/ports/SkTLS_pthread.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 |