diff options
Diffstat (limited to 'chromium/skia/skia_library.gypi')
-rw-r--r-- | chromium/skia/skia_library.gypi | 309 |
1 files changed, 117 insertions, 192 deletions
diff --git a/chromium/skia/skia_library.gypi b/chromium/skia/skia_library.gypi index b957fa665b5..531d30b381a 100644 --- a/chromium/skia/skia_library.gypi +++ b/chromium/skia/skia_library.gypi @@ -6,66 +6,23 @@ # This gypi file contains the Skia library. # In component mode (shared_lib) it is folded into a single shared library with # the Chrome-specific enhancements but in all other cases it is a separate lib. + +# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +# variables and defines should go in skia_common.gypi so they can be seen +# by files listed here and in skia_library_opts.gypi. +# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! { 'dependencies': [ 'skia_library_opts.gyp:skia_opts', '../third_party/zlib/zlib.gyp:zlib', ], - 'variables': { - 'variables': { - 'conditions': [ - ['OS== "ios"', { - 'skia_support_gpu': 0, - }, { - 'skia_support_gpu': 1, - }], - ['OS=="ios" or enable_printing == 0', { - 'skia_support_pdf': 0, - }, { - 'skia_support_pdf': 1, - }], - ], - }, - 'skia_support_gpu': '<(skia_support_gpu)', - 'skia_support_pdf': '<(skia_support_pdf)', - - # These two set the paths so we can include skia/gyp/core.gypi - 'skia_src_path': '../third_party/skia/src', - 'skia_include_path': '../third_party/skia/include', - - # This list will contain all defines that also need to be exported to - # dependent components. - 'skia_export_defines': [ - 'SK_ENABLE_INST_COUNT=0', - 'SK_SUPPORT_GPU=<(skia_support_gpu)', - 'GR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"', - 'SK_ENABLE_LEGACY_API_ALIASING=1', - 'SK_ATTR_DEPRECATED=SK_NOTHING_ARG1', - 'SK_SUPPORT_LEGACY_COLORTYPE=1', - 'GR_GL_IGNORE_ES3_MSAA=0', - 'SK_SUPPORT_LEGACY_PIXELREF_CONSTRUCTOR=1' - ], - - 'default_font_cache_limit%': '(20*1024*1024)', - - 'conditions': [ - ['OS== "android"', { - # Android devices are typically more memory constrained, so - # default to a smaller glyph cache (it may be overriden at runtime - # when the renderer starts up, depending on the actual device memory). - 'default_font_cache_limit': '(1*1024*1024)', - 'skia_export_defines': [ - 'SK_BUILD_FOR_ANDROID', - ], - }], - ], - }, - 'includes': [ '../third_party/skia/gyp/core.gypi', '../third_party/skia/gyp/effects.gypi', '../third_party/skia/gyp/pdf.gypi', + '../third_party/skia/gyp/record.gypi', + '../third_party/skia/gyp/utils.gypi', ], 'sources': [ @@ -77,9 +34,7 @@ '../third_party/skia/src/images/SkScaledBitmapSampler.cpp', '../third_party/skia/src/images/SkScaledBitmapSampler.h', - '../third_party/skia/src/opts/opts_check_SSE2.cpp', - - '../third_party/skia/src/ports/SkPurgeableMemoryBlock_none.cpp', + '../third_party/skia/src/opts/opts_check_x86.cpp', '../third_party/skia/src/ports/SkFontConfigInterface_android.cpp', '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp', @@ -87,71 +42,130 @@ '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp', '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp', + '../third_party/skia/src/fonts/SkFontMgr_indirect.cpp', + '../third_party/skia/src/fonts/SkRemotableFontMgr.cpp', + '../third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp', + '../third_party/skia/src/ports/SkFontHost_FreeType.cpp', '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp', '../third_party/skia/src/ports/SkFontHost_FreeType_common.h', '../third_party/skia/src/ports/SkFontConfigParser_android.cpp', '../third_party/skia/src/ports/SkFontHost_mac.cpp', '../third_party/skia/src/ports/SkFontHost_win.cpp', - '../third_party/skia/src/ports/SkFontHost_win_dw.cpp', - '../third_party/skia/src/ports/SkFontMgr_default_gdi.cpp', + '../third_party/skia/src/ports/SkFontMgr_win_dw.cpp', '../third_party/skia/src/ports/SkGlobalInitialization_chromium.cpp', '../third_party/skia/src/ports/SkOSFile_posix.cpp', '../third_party/skia/src/ports/SkOSFile_stdio.cpp', '../third_party/skia/src/ports/SkOSFile_win.cpp', - '../third_party/skia/src/ports/SkThread_pthread.cpp', - '../third_party/skia/src/ports/SkThread_win.cpp', + '../third_party/skia/src/ports/SkScalerContext_win_dw.cpp', + '../third_party/skia/src/ports/SkScalerContext_win_dw.h', '../third_party/skia/src/ports/SkTime_Unix.cpp', '../third_party/skia/src/ports/SkTLS_pthread.cpp', '../third_party/skia/src/ports/SkTLS_win.cpp', + '../third_party/skia/src/ports/SkTypeface_win_dw.cpp', + '../third_party/skia/src/ports/SkTypeface_win_dw.h', '../third_party/skia/src/sfnt/SkOTTable_name.cpp', '../third_party/skia/src/sfnt/SkOTTable_name.h', '../third_party/skia/src/sfnt/SkOTUtils.cpp', '../third_party/skia/src/sfnt/SkOTUtils.h', - '../third_party/skia/include/utils/mac/SkCGUtils.h', - '../third_party/skia/include/utils/SkDeferredCanvas.h', - '../third_party/skia/include/utils/SkMatrix44.h', '../third_party/skia/src/utils/debugger/SkDebugCanvas.cpp', '../third_party/skia/src/utils/debugger/SkDebugCanvas.h', '../third_party/skia/src/utils/debugger/SkDrawCommand.cpp', '../third_party/skia/src/utils/debugger/SkDrawCommand.h', '../third_party/skia/src/utils/debugger/SkObjectParser.cpp', '../third_party/skia/src/utils/debugger/SkObjectParser.h', - '../third_party/skia/src/utils/mac/SkCreateCGImageRef.cpp', - '../third_party/skia/src/utils/SkBase64.cpp', - '../third_party/skia/src/utils/SkBase64.h', - '../third_party/skia/src/utils/SkBitSet.cpp', - '../third_party/skia/src/utils/SkBitSet.h', - '../third_party/skia/src/utils/SkCanvasStack.cpp', - '../third_party/skia/src/utils/SkCanvasStateUtils.cpp', - '../third_party/skia/src/utils/SkDeferredCanvas.cpp', - '../third_party/skia/src/utils/SkMatrix44.cpp', - '../third_party/skia/src/utils/SkNullCanvas.cpp', - '../third_party/skia/include/utils/SkNWayCanvas.h', - '../third_party/skia/src/utils/SkNWayCanvas.cpp', - '../third_party/skia/src/utils/SkPictureUtils.cpp', - '../third_party/skia/src/utils/SkProxyCanvas.cpp', - '../third_party/skia/src/utils/SkRTConf.cpp', - '../third_party/skia/include/utils/SkRTConf.h', - '../third_party/skia/src/utils/win/SkDWriteFontFileStream.cpp', - '../third_party/skia/src/utils/win/SkDWriteFontFileStream.h', - '../third_party/skia/src/utils/win/SkDWriteGeometrySink.cpp', - '../third_party/skia/src/utils/win/SkDWriteGeometrySink.h', - '../third_party/skia/src/utils/win/SkHRESULT.cpp', - - '../third_party/skia/include/ports/SkTypeface_win.h', - '../third_party/skia/include/images/SkImageRef.h', - '../third_party/skia/include/images/SkImageRef_GlobalPool.h', '../third_party/skia/include/images/SkMovie.h', '../third_party/skia/include/images/SkPageFlipper.h', - '../third_party/skia/include/utils/SkNullCanvas.h', - '../third_party/skia/include/utils/SkPictureUtils.h', - '../third_party/skia/include/utils/SkProxyCanvas.h', + '../third_party/skia/include/ports/SkFontConfigInterface.h', + '../third_party/skia/include/ports/SkFontMgr.h', + '../third_party/skia/include/ports/SkFontMgr_indirect.h', + '../third_party/skia/include/ports/SkFontStyle.h', + '../third_party/skia/include/ports/SkRemotableFontMgr.h', + '../third_party/skia/include/ports/SkTypeface_win.h', + ], + + # Exclude all unused files in skia utils.gypi file + 'sources!': [ + '../third_party/skia/include/utils/SkCondVar.h', + '../third_party/skia/include/utils/SkCountdown.h', + '../third_party/skia/include/utils/SkRunnable.h', + '../third_party/skia/include/utils/SkThreadPool.h', + '../third_party/skia/src/utils/SkCondVar.cpp', + '../third_party/skia/src/utils/SkCountdown.cpp', + + '../third_party/skia/include/utils/SkBoundaryPatch.h', + '../third_party/skia/include/utils/SkFrontBufferedStream.h', + '../third_party/skia/include/utils/SkCamera.h', + '../third_party/skia/include/utils/SkCanvasStateUtils.h', + '../third_party/skia/include/utils/SkCubicInterval.h', + '../third_party/skia/include/utils/SkCullPoints.h', + '../third_party/skia/include/utils/SkDebugUtils.h', + '../third_party/skia/include/utils/SkDumpCanvas.h', + '../third_party/skia/include/utils/SkEventTracer.h', + '../third_party/skia/include/utils/SkInterpolator.h', + '../third_party/skia/include/utils/SkLayer.h', + '../third_party/skia/include/utils/SkMeshUtils.h', + '../third_party/skia/include/utils/SkNinePatch.h', + '../third_party/skia/include/utils/SkParse.h', + '../third_party/skia/include/utils/SkParsePaint.h', + '../third_party/skia/include/utils/SkParsePath.h', + '../third_party/skia/include/utils/SkRandom.h', + '../third_party/skia/include/utils/SkWGL.h', + + '../third_party/skia/src/utils/SkBitmapHasher.cpp', + '../third_party/skia/src/utils/SkBitmapHasher.h', + '../third_party/skia/src/utils/SkBoundaryPatch.cpp', + '../third_party/skia/src/utils/SkFrontBufferedStream.cpp', + '../third_party/skia/src/utils/SkCamera.cpp', + '../third_party/skia/src/utils/SkCanvasStack.h', + '../third_party/skia/src/utils/SkCubicInterval.cpp', + '../third_party/skia/src/utils/SkCullPoints.cpp', + '../third_party/skia/src/utils/SkDumpCanvas.cpp', + '../third_party/skia/src/utils/SkFloatUtils.h', + '../third_party/skia/src/utils/SkGatherPixelRefsAndRects.cpp', + '../third_party/skia/src/utils/SkGatherPixelRefsAndRects.h', + '../third_party/skia/src/utils/SkInterpolator.cpp', + '../third_party/skia/src/utils/SkLayer.cpp', + '../third_party/skia/src/utils/SkMD5.cpp', + '../third_party/skia/src/utils/SkMD5.h', + '../third_party/skia/src/utils/SkMeshUtils.cpp', + '../third_party/skia/src/utils/SkNinePatch.cpp', + '../third_party/skia/src/utils/SkOSFile.cpp', + '../third_party/skia/src/utils/SkParse.cpp', + '../third_party/skia/src/utils/SkParseColor.cpp', + '../third_party/skia/src/utils/SkParsePath.cpp', + '../third_party/skia/src/utils/SkPathUtils.cpp', + '../third_party/skia/src/utils/SkSHA1.cpp', + '../third_party/skia/src/utils/SkSHA1.h', + '../third_party/skia/src/utils/SkThreadUtils.h', + '../third_party/skia/src/utils/SkThreadUtils_pthread.cpp', + '../third_party/skia/src/utils/SkThreadUtils_pthread.h', + '../third_party/skia/src/utils/SkThreadUtils_pthread_linux.cpp', + '../third_party/skia/src/utils/SkThreadUtils_pthread_mach.cpp', + '../third_party/skia/src/utils/SkThreadUtils_pthread_other.cpp', + '../third_party/skia/src/utils/SkThreadUtils_win.cpp', + '../third_party/skia/src/utils/SkThreadUtils_win.h', + '../third_party/skia/src/utils/SkTFitsIn.h', + '../third_party/skia/src/utils/SkTLogic.h', + +#windows + '../third_party/skia/include/utils/win/SkAutoCoInitialize.h', + '../third_party/skia/include/utils/win/SkHRESULT.h', + '../third_party/skia/include/utils/win/SkIStream.h', + '../third_party/skia/include/utils/win/SkTScopedComPtr.h', + '../third_party/skia/src/utils/win/SkAutoCoInitialize.cpp', + '../third_party/skia/src/utils/win/SkIStream.cpp', + '../third_party/skia/src/utils/win/SkWGL_win.cpp', + +#testing + '../third_party/skia/src/fonts/SkGScalerContext.cpp', + '../third_party/skia/src/fonts/SkGScalerContext.h', ], + 'include_dirs': [ '../third_party/skia/include/core', '../third_party/skia/include/effects', @@ -161,6 +175,7 @@ '../third_party/skia/include/pdf', '../third_party/skia/include/pipe', '../third_party/skia/include/ports', + '../third_party/skia/include/record', '../third_party/skia/include/utils', '../third_party/skia/src/core', '../third_party/skia/src/opts', @@ -176,6 +191,7 @@ '../third_party/skia/gyp/gpu.gypi', ], 'sources': [ + '<@(skgpu_null_gl_sources)', '<@(skgpu_sources)', ], 'include_dirs': [ @@ -194,46 +210,6 @@ ], }], - #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_posix == 1', { - 'defines+': [ - 'SK_USE_POSIX_THREADS', - ], - 'direct_dependent_settings': { - 'defines': [ - 'SK_USE_POSIX_THREADS', - ], - }, - }], - [ 'OS != "ios"', { 'dependencies': [ '../third_party/WebKit/public/blink_skia_config.gyp:blink_skia_config', @@ -247,16 +223,6 @@ ['exclude', '/mac/'] ], }], - [ 'target_arch == "arm" and arm_version >= 7 and arm_neon == 1', { - 'defines': [ - '__ARM_HAVE_NEON', - ], - }], - [ 'target_arch == "arm" and arm_version >= 7 and arm_neon_optional == 1', { - 'defines': [ - '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', - ], - }], [ 'OS == "android" and target_arch == "arm"', { 'sources': [ '../third_party/skia/src/core/SkUtilsArm.cpp', @@ -265,9 +231,10 @@ '../build/android/cpufeatures.gypi', ], }], - [ 'target_arch == "arm" or target_arch == "mipsel"', { + [ 'target_arch == "arm" or target_arch == "arm64" or \ + target_arch == "mipsel"', { 'sources!': [ - '../third_party/skia/src/opts/opts_check_SSE2.cpp' + '../third_party/skia/src/opts/opts_check_x86.cpp' ], }], [ 'desktop_linux == 1 or chromeos == 1', { @@ -313,9 +280,6 @@ ], }], [ 'OS == "ios"', { - 'defines': [ - 'SK_BUILD_FOR_IOS', - ], 'include_dirs': [ '../third_party/skia/include/utils/ios', '../third_party/skia/include/utils/mac', @@ -332,7 +296,7 @@ '../third_party/skia/src/utils/mac/SkStream_mac.cpp', ], 'sources/': [ - ['exclude', 'opts_check_SSE2\\.cpp$'], + ['exclude', 'opts_check_x86\\.cpp$'], ], # The main skia_opts target does not currently work on iOS because the @@ -348,9 +312,6 @@ ], }], [ 'OS == "mac"', { - 'defines': [ - 'SK_BUILD_FOR_MAC', - ], 'direct_dependent_settings': { 'include_dirs': [ '../third_party/skia/include/utils/mac', @@ -371,7 +332,6 @@ [ 'OS == "win"', { 'sources!': [ '../third_party/skia/src/ports/SkOSFile_posix.cpp', - '../third_party/skia/src/ports/SkThread_pthread.cpp', '../third_party/skia/src/ports/SkTime_Unix.cpp', '../third_party/skia/src/ports/SkTLS_pthread.cpp', ], @@ -381,9 +341,15 @@ ], },{ # not 'OS == "win"' 'sources!': [ - '../third_party/skia/src/ports/SkFontHost_win_dw.cpp', - '../third_party/skia/src/ports/SkFontMgr_default_gdi.cpp', - + '../third_party/skia/src/ports/SkFontMgr_win_dw.cpp', + '../third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp', + '../third_party/skia/src/ports/SkScalerContext_win_dw.cpp', + '../third_party/skia/src/ports/SkScalerContext_win_dw.h', + '../third_party/skia/src/ports/SkTypeface_win_dw.cpp', + '../third_party/skia/src/ports/SkTypeface_win_dw.h', + + '../third_party/skia/src/utils/win/SkDWrite.h', + '../third_party/skia/src/utils/win/SkDWrite.cpp', '../third_party/skia/src/utils/win/SkDWriteFontFileStream.cpp', '../third_party/skia/src/utils/win/SkDWriteFontFileStream.h', '../third_party/skia/src/utils/win/SkDWriteGeometrySink.cpp', @@ -403,15 +369,6 @@ '-Wstring-conversion', ], }], - # On windows, GDI handles are a scarse system-wide resource so we have to keep - # the glyph cache, which holds up to 4 GDI handles per entry, to a fairly small - # size. - # http://crbug.com/314387 - [ 'OS == "win"', { - 'defines': [ - 'SK_DEFAULT_FONT_CACHE_COUNT_LIMIT=256', - ], - }], ], 'target_conditions': [ # Pull in specific Mac files for iOS (which have been filtered out @@ -425,35 +382,6 @@ }], ], - 'defines': [ - '<@(skia_export_defines)', - - # 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', - - # Forcing the unoptimized path for the offset image filter in skia until - # all filters used in Blink support the optimized path properly - 'SK_DISABLE_OFFSETIMAGEFILTER_OPTIMIZATION', - - # 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', - - 'SK_IGNORE_BLURRED_RRECT_OPT', - - 'SK_IGNORE_QUAD_RR_CORNERS_OPT', - - # this flag forces Skia not to use typographic metrics with GDI. - 'SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS', - - 'SK_DEFAULT_FONT_CACHE_LIMIT=<(default_font_cache_limit)', - ], - 'direct_dependent_settings': { 'include_dirs': [ #temporary until we can hide SkFontHost @@ -469,8 +397,5 @@ '../third_party/skia/include/ports', '../third_party/skia/include/utils', ], - 'defines': [ - '<@(skia_export_defines)', - ], }, } |