Chromium Code Reviews| Index: skia/skia.gyp |
| =================================================================== |
| --- skia/skia.gyp (revision 212946) |
| +++ skia/skia.gyp (working copy) |
| @@ -5,8 +5,100 @@ |
| { |
| 'targets': [ |
| { |
| + 'target_name': 'skia_configuration', |
|
djsollen
2013/07/25 15:30:18
your going to need to rebase this change on the ne
|
| + 'type': 'none', |
| + |
| + 'direct_dependent_settings': { |
| + 'defines': [ |
| + 'SK_BUILD_NO_IMAGE_ENCODE', |
| + 'GR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"', |
| + 'GR_STATIC_RECT_VB=1', |
| + 'GR_AGGRESSIVE_SHADER_OPTS=1', |
| + 'SK_DEFERRED_CANVAS_USES_GPIPE=1', |
| + 'SK_ENABLE_INST_COUNT=0', |
| + |
| + # These are set conditionally below. |
| + #'SK_GAMMA_SRGB', |
| + #'SK_GAMMA_APPLY_TO_A8', |
| + |
| + # this flag can be removed entirely once this has baked for a while |
| + 'SK_ALLOW_OVER_32K_BITMAPS', |
| + |
| + # skia uses static initializers to initialize the serialization logic |
| + # of its "pictures" library. This is currently not used in chrome; if |
| + # it ever gets used the processes that use it need to call |
| + # SkGraphics::Init(). |
| + 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0', |
| + |
| + # Disable this check because it is too strict for some Chromium |
| + # specific subclasses of SkPixelRef. See bug: crbug.com/171776. |
| + 'SK_DISABLE_PIXELREF_LOCKCOUNT_BALANCE_CHECK', |
| + |
| + 'IGNORE_ROT_AA_RECT_OPT', |
| + ], |
| + |
| + 'conditions': [ |
| + # Settings for atomics and mutexes |
| + [ 'OS == "win"', { |
| + 'defines': [ |
| + 'SK_ATOMICS_PLATFORM_H="skia/ext/SkAtomics_chrome.h"', |
| + 'SK_MUTEX_PLATFORM_H="third_party/skia/src/ports/SkMutex_win.h"', |
| + ], |
| + }], |
| + [ 'OS in ["linux", "freebsd", "openbsd", "netbsd", "solaris", |
| + "android", "mac", "ios"]', { |
| + # For POSIX platforms, prefer the Mutex implementation provided by |
| + # Skia since it does not generate static initializers. |
| + 'defines': [ |
| + 'SK_USE_POSIX_THREADS', |
| + 'SK_ATOMICS_PLATFORM_H="skia/ext/SkAtomics_chromium.h"', |
| + 'SK_MUTEX_PLATFORM_H="third_party/skia/src/ports/SkMutex_pthread.h"', |
| + ], |
| + }], |
| + |
| + #Settings for text blitting, chosen to approximate the system browser. |
| + [ 'OS == "linux"', { |
| + 'defines': [ |
| + 'SK_GAMMA_EXPONENT=1.2', |
| + 'SK_GAMMA_CONTRAST=0.2', |
| + ], |
| + }], |
| + ['OS == "android"', { |
| + 'defines': [ |
| + 'SK_GAMMA_APPLY_TO_A8', |
| + 'SK_GAMMA_EXPONENT=1.4', |
| + 'SK_GAMMA_CONTRAST=0.0', |
| + ], |
| + }], |
| + ['OS == "win"', { |
| + 'defines': [ |
| + 'SK_GAMMA_SRGB', |
| + 'SK_GAMMA_CONTRAST=0.5', |
| + ], |
| + }], |
| + ['OS == "mac"', { |
| + 'defines': [ |
| + 'SK_GAMMA_SRGB', |
| + 'SK_GAMMA_CONTRAST=0.0', |
| + ], |
| + }], |
| + ], |
| + }, |
| + }, |
| + { |
| 'target_name': 'skia', |
| 'type': '<(component)', |
| + 'dependencies': [ |
| + 'skia_configuration', |
| + 'skia_opts', |
| + '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
| + '../third_party/sfntly/sfntly.gyp:sfntly', |
| + '../third_party/zlib/zlib.gyp:zlib', |
| + ], |
| + 'export_dependent_settings': [ |
| + 'skia_configuration', |
| + ], |
| + |
| 'variables': { |
| 'conditions': [ |
| ['OS== "ios"', { |
| @@ -185,7 +277,7 @@ |
| 'ext/lazy_pixel_ref.h', |
| 'ext/lazy_pixel_ref_utils.cc', |
| 'ext/lazy_pixel_ref_utils.h', |
| - 'ext/SkThread_chrome.cc', |
| + #'ext/SkThread_chrome.cc', |
| 'ext/paint_simplifier.cc', |
| 'ext/paint_simplifier.h', |
| 'ext/platform_canvas.cc', |
| @@ -235,31 +327,7 @@ |
| '../third_party/skia/src/lazy', |
| ], |
| 'msvs_disabled_warnings': [4244, 4267, 4341, 4345, 4390, 4554, 4748, 4800], |
| - 'defines': [ |
| - #'SK_GAMMA_SRGB', |
| - #'SK_GAMMA_APPLY_TO_A8', |
| - 'SK_BUILD_NO_IMAGE_ENCODE', |
| - 'GR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"', |
| - 'GR_STATIC_RECT_VB=1', |
| - 'GR_AGGRESSIVE_SHADER_OPTS=1', |
| - 'SK_DEFERRED_CANVAS_USES_GPIPE=1', |
| - 'SK_ENABLE_INST_COUNT=0', |
| - # this flag can be removed entirely once this has baked for a while |
| - 'SK_ALLOW_OVER_32K_BITMAPS', |
| - |
| - # skia uses static initializers to initialize the serialization logic |
| - # of its "pictures" library. This is currently not used in chrome; if |
| - # it ever gets used the processes that use it need to call |
| - # SkGraphics::Init(). |
| - 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0', |
| - |
| - # Disable this check because it is too strict for some Chromium-specific |
| - # subclasses of SkPixelRef. See bug: crbug.com/171776. |
| - 'SK_DISABLE_PIXELREF_LOCKCOUNT_BALANCE_CHECK', |
| - |
| - 'IGNORE_ROT_AA_RECT_OPT', |
| - ], |
| 'sources!': [ |
| '../third_party/skia/include/core/SkTypes.h', |
| ], |
| @@ -281,48 +349,7 @@ |
| 'SK_SUPPORT_GPU=0', |
| ], |
| }], |
| - #Settings for text blitting, chosen to approximate the system browser. |
| - [ 'OS == "linux"', { |
| - 'defines': [ |
| - 'SK_GAMMA_EXPONENT=1.2', |
| - 'SK_GAMMA_CONTRAST=0.2', |
| - ], |
| - }], |
| - ['OS == "android"', { |
| - 'defines': [ |
| - 'SK_GAMMA_APPLY_TO_A8', |
| - 'SK_GAMMA_EXPONENT=1.4', |
| - 'SK_GAMMA_CONTRAST=0.0', |
| - ], |
| - }], |
| - ['OS == "win"', { |
| - 'defines': [ |
| - 'SK_GAMMA_SRGB', |
| - 'SK_GAMMA_CONTRAST=0.5', |
| - ], |
| - }], |
| - ['OS == "mac"', { |
| - 'defines': [ |
| - 'SK_GAMMA_SRGB', |
| - 'SK_GAMMA_CONTRAST=0.0', |
| - ], |
| - }], |
| - # For POSIX platforms, prefer the Mutex implementation provided by Skia |
| - # since it does not generate static initializers. |
| - [ 'OS == "android" or OS == "linux" or OS == "mac" or OS == "ios"', { |
| - 'defines+': [ |
| - 'SK_USE_POSIX_THREADS', |
| - ], |
| - 'direct_dependent_settings': { |
| - 'defines': [ |
| - 'SK_USE_POSIX_THREADS', |
| - ], |
| - }, |
| - 'sources!': [ |
| - 'ext/SkThread_chrome.cc', |
| - ], |
| - }], |
| [ 'OS != "android"', { |
| 'sources/': [ |
| ['exclude', '_android\\.(cc|cpp)$'], |
| @@ -390,9 +417,6 @@ |
| '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp', |
| '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp', |
| ], |
| - 'defines': [ |
| -# 'SK_USE_COLOR_LUMINANCE', |
| - ], |
| }], |
| [ 'use_glib == 0 and OS != "android"', { |
| 'sources/': [ ['exclude', '_linux\\.(cc|cpp)$'] ], |
| @@ -465,7 +489,6 @@ |
| [ 'OS == "ios"', { |
| 'defines': [ |
| 'SK_BUILD_FOR_IOS', |
| - 'SK_USE_MAC_CORE_TEXT', |
| ], |
| 'include_dirs': [ |
| '../third_party/skia/include/utils/ios', |
| @@ -498,8 +521,6 @@ |
| [ 'OS == "mac"', { |
| 'defines': [ |
| 'SK_BUILD_FOR_MAC', |
| - 'SK_USE_MAC_CORE_TEXT', |
| -# 'SK_USE_COLOR_LUMINANCE', |
| ], |
| 'include_dirs': [ |
| '../third_party/skia/include/utils/mac', |
| @@ -519,7 +540,6 @@ |
| '../third_party/skia/src/ports/SkThread_pthread.cpp', |
| '../third_party/skia/src/ports/SkTLS_pthread.cpp', |
| '../third_party/skia/src/ports/SkTime_Unix.cpp', |
| - 'ext/SkThread_chrome.cc', |
| ], |
| 'include_dirs': [ |
| 'config/win', |
| @@ -560,12 +580,6 @@ |
| ], |
| }], |
| ], |
| - 'dependencies': [ |
| - 'skia_opts', |
| - '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
| - '../third_party/sfntly/sfntly.gyp:sfntly', |
| - '../third_party/zlib/zlib.gyp:zlib', |
| - ], |
| 'direct_dependent_settings': { |
| 'include_dirs': [ |
| 'config', |
| @@ -586,13 +600,6 @@ |
| '../third_party/skia/include/utils', |
| 'ext', |
| ], |
| - 'defines': [ |
| - 'SK_BUILD_NO_IMAGE_ENCODE', |
| - 'SK_DEFERRED_CANVAS_USES_GPIPE=1', |
| - 'GR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"', |
| - 'GR_AGGRESSIVE_SHADER_OPTS=1', |
| - 'SK_ENABLE_INST_COUNT=0', |
| - ], |
| 'conditions': [ |
| ['OS=="android"', { |
| 'dependencies!': [ |
| @@ -652,6 +659,9 @@ |
| { |
| 'target_name': 'skia_opts', |
| 'type': 'static_library', |
| + 'dependencies': [ |
| + 'skia_configuration', |
| + ], |
| 'variables': { |
| 'optimize': 'max', |
| }, |
| @@ -698,6 +708,9 @@ |
| ], |
| }], |
| [ 'target_arch == "arm"', { |
| + 'dependencies': [ |
| + 'skia_configuration', |
| + ], |
| 'conditions': [ |
| [ 'arm_version >= 7 and arm_neon == 1', { |
| 'defines': [ |
| @@ -776,6 +789,9 @@ |
| { |
| 'target_name': 'skia_opts_ssse3', |
| 'type': 'static_library', |
| + 'dependencies': [ |
| + 'skia_configuration', |
| + ], |
| 'variables': { |
| 'optimize': 'max', |
| }, |
| @@ -822,6 +838,9 @@ |
| { |
| 'target_name': 'skia_opts_neon', |
| 'type': 'static_library', |
| + 'dependencies': [ |
| + 'skia_configuration', |
| + ], |
| 'include_dirs': [ |
| '..', |
| 'config', |
| @@ -874,6 +893,7 @@ |
| 'dependencies': [ |
| '../base/base.gyp:base', |
| 'skia', |
| + 'skia_configuration', |
| ], |
| 'include_dirs': [ |
| '..', |
| @@ -894,6 +914,9 @@ |
| { |
| 'target_name': 'skia_opts_ios', |
| 'type': 'static_library', |
| + 'dependencies': [ |
| + 'skia_configuration', |
| + ], |
| 'include_dirs': [ |
| '..', |
| 'config', |