| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 # This gypi file contains the Skia library. | 6 # This gypi file contains the Skia library. |
| 7 # In component mode (shared_lib) it is folded into a single shared library with | 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. | 8 # the Chrome-specific enhancements but in all other cases it is a separate lib. |
| 9 |
| 10 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 11 # variables and defines should go in skia_common.gypi so they can be seen |
| 12 # by files listed here and in skia_library_opts.gypi. |
| 13 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 9 { | 14 { |
| 10 'dependencies': [ | 15 'dependencies': [ |
| 11 'skia_library_opts.gyp:skia_opts', | 16 'skia_library_opts.gyp:skia_opts', |
| 12 '../third_party/zlib/zlib.gyp:zlib', | 17 '../third_party/zlib/zlib.gyp:zlib', |
| 13 ], | 18 ], |
| 14 | 19 |
| 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 enable_printing == 0', { | |
| 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 'SK_ENABLE_LEGACY_API_ALIASING=1', | |
| 44 'SK_ATTR_DEPRECATED=SK_NOTHING_ARG1', | |
| 45 'SK_SUPPORT_LEGACY_COLORTYPE=1', | |
| 46 'GR_GL_IGNORE_ES3_MSAA=0', | |
| 47 ], | |
| 48 | |
| 49 'default_font_cache_limit%': '(20*1024*1024)', | |
| 50 | |
| 51 'conditions': [ | |
| 52 ['OS== "android"', { | |
| 53 # Android devices are typically more memory constrained, so | |
| 54 # default to a smaller glyph cache (it may be overriden at runtime | |
| 55 # when the renderer starts up, depending on the actual device memory). | |
| 56 'default_font_cache_limit': '(1*1024*1024)', | |
| 57 'skia_export_defines': [ | |
| 58 'SK_BUILD_FOR_ANDROID', | |
| 59 ], | |
| 60 }], | |
| 61 ], | |
| 62 }, | |
| 63 | |
| 64 'includes': [ | 20 'includes': [ |
| 65 '../third_party/skia/gyp/core.gypi', | 21 '../third_party/skia/gyp/core.gypi', |
| 66 '../third_party/skia/gyp/effects.gypi', | 22 '../third_party/skia/gyp/effects.gypi', |
| 67 '../third_party/skia/gyp/pdf.gypi', | 23 '../third_party/skia/gyp/pdf.gypi', |
| 68 ], | 24 ], |
| 69 | 25 |
| 70 'sources': [ | 26 'sources': [ |
| 71 # this should likely be moved into src/utils in skia | 27 # this should likely be moved into src/utils in skia |
| 72 '../third_party/skia/src/core/SkFlate.cpp', | 28 '../third_party/skia/src/core/SkFlate.cpp', |
| 73 '../third_party/skia/src/core/SkPaintOptionsAndroid.cpp', | 29 '../third_party/skia/src/core/SkPaintOptionsAndroid.cpp', |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 'sources/': [ | 142 'sources/': [ |
| 187 ['exclude', '../third_party/skia/src/pdf/'] | 143 ['exclude', '../third_party/skia/src/pdf/'] |
| 188 ], | 144 ], |
| 189 }], | 145 }], |
| 190 ['skia_support_pdf == 1', { | 146 ['skia_support_pdf == 1', { |
| 191 'dependencies': [ | 147 'dependencies': [ |
| 192 '../third_party/sfntly/sfntly.gyp:sfntly', | 148 '../third_party/sfntly/sfntly.gyp:sfntly', |
| 193 ], | 149 ], |
| 194 }], | 150 }], |
| 195 | 151 |
| 196 #Settings for text blitting, chosen to approximate the system browser. | |
| 197 [ 'OS == "linux"', { | |
| 198 'defines': [ | |
| 199 'SK_GAMMA_EXPONENT=1.2', | |
| 200 'SK_GAMMA_CONTRAST=0.2', | |
| 201 ], | |
| 202 }], | |
| 203 ['OS == "android"', { | |
| 204 'defines': [ | |
| 205 'SK_GAMMA_APPLY_TO_A8', | |
| 206 'SK_GAMMA_EXPONENT=1.4', | |
| 207 'SK_GAMMA_CONTRAST=0.0', | |
| 208 ], | |
| 209 }], | |
| 210 ['OS == "win"', { | |
| 211 'defines': [ | |
| 212 'SK_GAMMA_SRGB', | |
| 213 'SK_GAMMA_CONTRAST=0.5', | |
| 214 ], | |
| 215 }], | |
| 216 ['OS == "mac"', { | |
| 217 'defines': [ | |
| 218 'SK_GAMMA_SRGB', | |
| 219 'SK_GAMMA_CONTRAST=0.0', | |
| 220 ], | |
| 221 }], | |
| 222 | |
| 223 # For POSIX platforms, prefer the Mutex implementation provided by Skia | |
| 224 # since it does not generate static initializers. | |
| 225 [ 'os_posix == 1', { | |
| 226 'defines+': [ | |
| 227 'SK_USE_POSIX_THREADS', | |
| 228 ], | |
| 229 'direct_dependent_settings': { | |
| 230 'defines': [ | |
| 231 'SK_USE_POSIX_THREADS', | |
| 232 ], | |
| 233 }, | |
| 234 }], | |
| 235 | |
| 236 [ 'OS != "ios"', { | 152 [ 'OS != "ios"', { |
| 237 'dependencies': [ | 153 'dependencies': [ |
| 238 '../third_party/WebKit/public/blink_skia_config.gyp:blink_skia_config', | 154 '../third_party/WebKit/public/blink_skia_config.gyp:blink_skia_config', |
| 239 ], | 155 ], |
| 240 'export_dependent_settings': [ | 156 'export_dependent_settings': [ |
| 241 '../third_party/WebKit/public/blink_skia_config.gyp:blink_skia_config', | 157 '../third_party/WebKit/public/blink_skia_config.gyp:blink_skia_config', |
| 242 ], | 158 ], |
| 243 }], | 159 }], |
| 244 [ 'OS != "mac"', { | 160 [ 'OS != "mac"', { |
| 245 'sources/': [ | 161 'sources/': [ |
| 246 ['exclude', '/mac/'] | 162 ['exclude', '/mac/'] |
| 247 ], | 163 ], |
| 248 }], | 164 }], |
| 249 [ 'target_arch == "arm" and arm_version >= 7 and arm_neon == 1', { | |
| 250 'defines': [ | |
| 251 '__ARM_HAVE_NEON', | |
| 252 ], | |
| 253 }], | |
| 254 [ 'target_arch == "arm" and arm_version >= 7 and arm_neon_optional == 1', { | |
| 255 'defines': [ | |
| 256 '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', | |
| 257 ], | |
| 258 }], | |
| 259 [ 'OS == "android" and target_arch == "arm"', { | 165 [ 'OS == "android" and target_arch == "arm"', { |
| 260 'sources': [ | 166 'sources': [ |
| 261 '../third_party/skia/src/core/SkUtilsArm.cpp', | 167 '../third_party/skia/src/core/SkUtilsArm.cpp', |
| 262 ], | 168 ], |
| 263 'includes': [ | 169 'includes': [ |
| 264 '../build/android/cpufeatures.gypi', | 170 '../build/android/cpufeatures.gypi', |
| 265 ], | 171 ], |
| 266 }], | 172 }], |
| 267 [ 'target_arch == "arm" or target_arch == "mipsel"', { | 173 [ 'target_arch == "arm" or target_arch == "mipsel"', { |
| 268 'sources!': [ | 174 'sources!': [ |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 '../third_party/freetype/freetype.gyp:ft2', | 211 '../third_party/freetype/freetype.gyp:ft2', |
| 306 ], | 212 ], |
| 307 # This exports a hard dependency because it needs to run its | 213 # This exports a hard dependency because it needs to run its |
| 308 # symlink action in order to expose the skia header files. | 214 # symlink action in order to expose the skia header files. |
| 309 'hard_dependency': 1, | 215 'hard_dependency': 1, |
| 310 'include_dirs': [ | 216 'include_dirs': [ |
| 311 '../third_party/expat/files/lib', | 217 '../third_party/expat/files/lib', |
| 312 ], | 218 ], |
| 313 }], | 219 }], |
| 314 [ 'OS == "ios"', { | 220 [ 'OS == "ios"', { |
| 315 'defines': [ | |
| 316 'SK_BUILD_FOR_IOS', | |
| 317 ], | |
| 318 'include_dirs': [ | 221 'include_dirs': [ |
| 319 '../third_party/skia/include/utils/ios', | 222 '../third_party/skia/include/utils/ios', |
| 320 '../third_party/skia/include/utils/mac', | 223 '../third_party/skia/include/utils/mac', |
| 321 ], | 224 ], |
| 322 'link_settings': { | 225 'link_settings': { |
| 323 'libraries': [ | 226 'libraries': [ |
| 324 '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework', | 227 '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework', |
| 325 ], | 228 ], |
| 326 }, | 229 }, |
| 327 'sources': [ | 230 'sources': [ |
| (...skipping 12 matching lines...) Expand all Loading... |
| 340 # temporary measure, this is a separate opts target for iOS-only, using | 243 # temporary measure, this is a separate opts target for iOS-only, using |
| 341 # the _none.cpp files to avoid architecture-dependent implementations. | 244 # the _none.cpp files to avoid architecture-dependent implementations. |
| 342 'dependencies': [ | 245 'dependencies': [ |
| 343 'skia_library_opts.gyp:skia_opts_none', | 246 'skia_library_opts.gyp:skia_opts_none', |
| 344 ], | 247 ], |
| 345 'dependencies!': [ | 248 'dependencies!': [ |
| 346 'skia_library_opts.gyp:skia_opts', | 249 'skia_library_opts.gyp:skia_opts', |
| 347 ], | 250 ], |
| 348 }], | 251 }], |
| 349 [ 'OS == "mac"', { | 252 [ 'OS == "mac"', { |
| 350 'defines': [ | |
| 351 'SK_BUILD_FOR_MAC', | |
| 352 ], | |
| 353 'direct_dependent_settings': { | 253 'direct_dependent_settings': { |
| 354 'include_dirs': [ | 254 'include_dirs': [ |
| 355 '../third_party/skia/include/utils/mac', | 255 '../third_party/skia/include/utils/mac', |
| 356 ], | 256 ], |
| 357 }, | 257 }, |
| 358 'include_dirs': [ | 258 'include_dirs': [ |
| 359 '../third_party/skia/include/utils/mac', | 259 '../third_party/skia/include/utils/mac', |
| 360 ], | 260 ], |
| 361 'link_settings': { | 261 'link_settings': { |
| 362 'libraries': [ | 262 'libraries': [ |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 'xcode_settings': { | 295 'xcode_settings': { |
| 396 'WARNING_CFLAGS!': [ | 296 'WARNING_CFLAGS!': [ |
| 397 # Don't warn about string->bool used in asserts. | 297 # Don't warn about string->bool used in asserts. |
| 398 '-Wstring-conversion', | 298 '-Wstring-conversion', |
| 399 ], | 299 ], |
| 400 }, | 300 }, |
| 401 'cflags!': [ | 301 'cflags!': [ |
| 402 '-Wstring-conversion', | 302 '-Wstring-conversion', |
| 403 ], | 303 ], |
| 404 }], | 304 }], |
| 405 # On windows, GDI handles are a scarse system-wide resource so we have to ke
ep | |
| 406 # the glyph cache, which holds up to 4 GDI handles per entry, to a fairly sm
all | |
| 407 # size. | |
| 408 # http://crbug.com/314387 | |
| 409 [ 'OS == "win"', { | |
| 410 'defines': [ | |
| 411 'SK_DEFAULT_FONT_CACHE_COUNT_LIMIT=256', | |
| 412 ], | |
| 413 }], | |
| 414 ], | 305 ], |
| 415 'target_conditions': [ | 306 'target_conditions': [ |
| 416 # Pull in specific Mac files for iOS (which have been filtered out | 307 # Pull in specific Mac files for iOS (which have been filtered out |
| 417 # by file name rules). | 308 # by file name rules). |
| 418 [ 'OS == "ios"', { | 309 [ 'OS == "ios"', { |
| 419 'sources/': [ | 310 'sources/': [ |
| 420 ['include', 'SkFontHost_mac\\.cpp$',], | 311 ['include', 'SkFontHost_mac\\.cpp$',], |
| 421 ['include', 'SkStream_mac\\.cpp$',], | 312 ['include', 'SkStream_mac\\.cpp$',], |
| 422 ['include', 'SkCreateCGImageRef\\.cpp$',], | 313 ['include', 'SkCreateCGImageRef\\.cpp$',], |
| 423 ], | 314 ], |
| 424 }], | 315 }], |
| 425 ], | 316 ], |
| 426 | 317 |
| 427 'defines': [ | |
| 428 '<@(skia_export_defines)', | |
| 429 | |
| 430 # skia uses static initializers to initialize the serialization logic | |
| 431 # of its "pictures" library. This is currently not used in chrome; if | |
| 432 # it ever gets used the processes that use it need to call | |
| 433 # SkGraphics::Init(). | |
| 434 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0', | |
| 435 | |
| 436 # Forcing the unoptimized path for the offset image filter in skia until | |
| 437 # all filters used in Blink support the optimized path properly | |
| 438 'SK_DISABLE_OFFSETIMAGEFILTER_OPTIMIZATION', | |
| 439 | |
| 440 # Disable this check because it is too strict for some Chromium-specific | |
| 441 # subclasses of SkPixelRef. See bug: crbug.com/171776. | |
| 442 'SK_DISABLE_PIXELREF_LOCKCOUNT_BALANCE_CHECK', | |
| 443 | |
| 444 'IGNORE_ROT_AA_RECT_OPT', | |
| 445 | |
| 446 'SK_IGNORE_BLURRED_RRECT_OPT', | |
| 447 | |
| 448 'SK_IGNORE_QUAD_RR_CORNERS_OPT', | |
| 449 | |
| 450 # this flag forces Skia not to use typographic metrics with GDI. | |
| 451 'SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS', | |
| 452 | |
| 453 'SK_DEFAULT_FONT_CACHE_LIMIT=<(default_font_cache_limit)', | |
| 454 ], | |
| 455 | |
| 456 'direct_dependent_settings': { | 318 'direct_dependent_settings': { |
| 457 'include_dirs': [ | 319 'include_dirs': [ |
| 458 #temporary until we can hide SkFontHost | 320 #temporary until we can hide SkFontHost |
| 459 '../third_party/skia/src/core', | 321 '../third_party/skia/src/core', |
| 460 | 322 |
| 461 '../third_party/skia/include/core', | 323 '../third_party/skia/include/core', |
| 462 '../third_party/skia/include/effects', | 324 '../third_party/skia/include/effects', |
| 463 '../third_party/skia/include/pdf', | 325 '../third_party/skia/include/pdf', |
| 464 '../third_party/skia/include/gpu', | 326 '../third_party/skia/include/gpu', |
| 465 '../third_party/skia/include/lazy', | 327 '../third_party/skia/include/lazy', |
| 466 '../third_party/skia/include/pathops', | 328 '../third_party/skia/include/pathops', |
| 467 '../third_party/skia/include/pipe', | 329 '../third_party/skia/include/pipe', |
| 468 '../third_party/skia/include/ports', | 330 '../third_party/skia/include/ports', |
| 469 '../third_party/skia/include/utils', | 331 '../third_party/skia/include/utils', |
| 470 ], | 332 ], |
| 471 'defines': [ | |
| 472 '<@(skia_export_defines)', | |
| 473 ], | |
| 474 }, | 333 }, |
| 475 } | 334 } |
| OLD | NEW |