Bug 1821512 - Update Skia build scripts. r=jrmuizel

This transitions generate_mozbuild to python3, since the existing script was
bitrotted with python2.

The generated moz.build is also fixed up for the new Skia files.

Differential Revision: https://phabricator.services.mozilla.com/D173323
This commit is contained in:
Lee Salzman 2023-04-11 05:00:04 +00:00
parent 932d77fe8a
commit e716f092b0
2 changed files with 189 additions and 90 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
import locale import locale
import subprocess import subprocess
@ -39,7 +39,6 @@ AllowCompilerWarnings()
FINAL_LIBRARY = 'gkmedias' FINAL_LIBRARY = 'gkmedias'
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'skia', 'skia',
'skia/include/third_party/skcms',
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
@ -54,10 +53,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
if CONFIG['INTEL_ARCHITECTURE']: if CONFIG['INTEL_ARCHITECTURE']:
SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3'] SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3']
SOURCES['skia/src/opts/SkOpts_sse41.cpp'].flags += ['-msse4.1']
SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2'] SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2']
SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx'] SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx']
SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma'] SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma']
SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl']
elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-march=armv8-a+crc'] SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-march=armv8-a+crc']
@ -104,13 +103,11 @@ import json
platforms = ['linux', 'mac', 'android', 'win'] platforms = ['linux', 'mac', 'android', 'win']
def parse_sources(output): def parse_sources(output):
return set(v.replace('//', 'skia/') for v in output.split() if v.endswith('.cpp') or v.endswith('.S')) return set(v.replace('//', 'skia/') for v in output.decode('utf-8').split() if v.endswith('.cpp') or v.endswith('.S'))
def generate_opt_sources(): def generate_opt_sources():
cpus = [('intel', 'x86', [':sse2', ':ssse3', ':sse41', ':sse42', ':avx', ':hsw']), cpus = [('intel', 'x86', [':ssse3', ':sse42', ':avx', ':hsw', ':skx']),
('arm', 'arm', [':armv7']), ('arm64', 'arm64', [':crc32'])]
('arm64', 'arm64', [':arm64', ':crc32']),
('none', 'none', [':none'])]
opt_sources = {} opt_sources = {}
for key, cpu, deps in cpus: for key, cpu, deps in cpus:
@ -122,7 +119,7 @@ def generate_opt_sources():
if output: if output:
opt_sources[key].update(parse_sources(output)) opt_sources[key].update(parse_sources(output))
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
if e.output.find('source_set') < 0: if e.output.find(b'source_set') < 0:
raise raise
return opt_sources return opt_sources
@ -138,7 +135,11 @@ def generate_platform_sources():
if output: if output:
sources[plat] = parse_sources(output) sources[plat] = parse_sources(output)
plat_deps = {':fontmgr_win' : 'win', ':fontmgr_win_gdi' : 'win'} plat_deps = {
':fontmgr_win' : 'win',
':fontmgr_win_gdi' : 'win',
':fontmgr_mac_ct' : 'mac',
}
for dep, key in plat_deps.items(): for dep, key in plat_deps.items():
output = subprocess.check_output('cd skia && bin/gn desc out/{1} {0} sources'.format(dep, key), shell=True) output = subprocess.check_output('cd skia && bin/gn desc out/{1} {0} sources'.format(dep, key), shell=True)
if output: if output:
@ -150,33 +151,26 @@ def generate_platform_sources():
if output: if output:
sources[key] = parse_sources(output) sources[key] = parse_sources(output)
return dict(sources.items() + generate_opt_sources().items()) sources.update(generate_opt_sources())
return sources
def generate_separated_sources(platform_sources): def generate_separated_sources(platform_sources):
ignorelist = [ ignorelist = [
'skia/src/android/', 'skia/src/android/',
'skia/src/atlastext/',
'skia/src/c/',
'skia/src/effects/', 'skia/src/effects/',
'skia/src/fonts/', 'skia/src/fonts/',
'skia/src/ports/SkImageEncoder', 'skia/src/ports/SkImageEncoder',
'skia/src/ports/SkImageGenerator', 'skia/src/ports/SkImageGenerator',
'SkBitmapRegion',
'SkLite',
'SkLight', 'SkLight',
'SkNormal',
'codec', 'codec',
'SkWGL', 'SkWGL',
'SkMemory_malloc', 'SkMemory_malloc',
'third_party', 'third_party',
'Sk3D',
'SkAnimCodecPlayer', 'SkAnimCodecPlayer',
'SkCamera', 'SkCamera',
'SkCanvasStack', 'SkCanvasStack',
'SkCanvasStateUtils', 'SkCanvasStateUtils',
'SkFrontBufferedStream',
'SkInterpolator',
'JSON', 'JSON',
'SkMultiPictureDocument', 'SkMultiPictureDocument',
'SkNullCanvas', 'SkNullCanvas',
@ -184,11 +178,9 @@ def generate_separated_sources(platform_sources):
'SkOverdrawCanvas', 'SkOverdrawCanvas',
'SkPaintFilterCanvas', 'SkPaintFilterCanvas',
'SkParseColor', 'SkParseColor',
'SkWhitelistTypefaces',
'SkXPS', 'SkXPS',
'SkCreateCGImageRef', 'SkCreateCGImageRef',
'skia/src/ports/SkGlobalInitialization', 'skia/src/ports/SkGlobalInitialization',
'skia/src/sksl/SkSLJIT',
] ]
def isignorelisted(value): def isignorelisted(value):
@ -208,11 +200,9 @@ def generate_separated_sources(platform_sources):
'skia/src/ports/SkGlobalInitialization_default.cpp', 'skia/src/ports/SkGlobalInitialization_default.cpp',
'skia/src/ports/SkMemory_mozalloc.cpp', 'skia/src/ports/SkMemory_mozalloc.cpp',
'skia/src/ports/SkImageGenerator_none.cpp', 'skia/src/ports/SkImageGenerator_none.cpp',
'skia/third_party/skcms/skcms.cc', 'skia/modules/skcms/skcms.cc',
'skia/src/core/SkBitmapScaler.cpp',
'skia/src/core/SkGlyphBuffer.cpp',
'skia/src/core/SkConvolver.cpp',
'skia/src/core/SkImageFilterTypes.cpp', 'skia/src/core/SkImageFilterTypes.cpp',
'skia/src/ports/SkFontMgr_empty_factory.cpp',
}, },
'android': { 'android': {
# 'skia/src/ports/SkDebug_android.cpp', # 'skia/src/ports/SkDebug_android.cpp',
@ -285,7 +275,6 @@ def write_cflags(f, values, subsearch, cflag, indent):
opt_allowlist = [ opt_allowlist = [
'SkOpts', 'SkOpts',
'SkBitmapProcState', 'SkBitmapProcState',
'SkBitmapScaler',
'SkBlitRow', 'SkBlitRow',
'SkBlitter', 'SkBlitter',
'SkSpriteBlitter', 'SkSpriteBlitter',
@ -300,26 +289,22 @@ unified_ignorelist = [
'SkBitmapProcState_matrixProcs.cpp', 'SkBitmapProcState_matrixProcs.cpp',
'SkBlitter_A8.cpp', 'SkBlitter_A8.cpp',
'SkBlitter_ARGB32.cpp', 'SkBlitter_ARGB32.cpp',
'SkBlitter_RGB16.cpp',
'SkBlitter_Sprite.cpp', 'SkBlitter_Sprite.cpp',
'SkScan_Antihair.cpp', 'SkScan_Antihair.cpp',
'SkScan_AntiPath.cpp', 'SkScan_AntiPath.cpp',
'SkScan_DAAPath.cpp',
'SkParse.cpp', 'SkParse.cpp',
'SkPDFFont.cpp', 'SkPDFFont.cpp',
'SkPDFDevice.cpp', 'SkPDFDevice.cpp',
'SkPDFType1Font.cpp', 'SkPDFType1Font.cpp',
'SkPictureData.cpp', 'SkPictureData.cpp',
'SkColorSpace', 'SkColorSpace',
'SkPath.cpp',
'SkPathOpsDebug.cpp', 'SkPathOpsDebug.cpp',
'SkParsePath.cpp', 'SkParsePath.cpp',
'SkRecorder.cpp', 'SkRecorder.cpp',
'SkMiniRecorder.cpp',
'SkXfermode', 'SkXfermode',
'SkMatrix44.cpp',
'SkRTree.cpp', 'SkRTree.cpp',
'SkVertices.cpp', 'SkVertices.cpp',
'SkSLHCodeGenerator.cpp',
'SkSLLexer.cpp', 'SkSLLexer.cpp',
] + opt_allowlist ] + opt_allowlist

View File

@ -23,35 +23,55 @@ if CONFIG['MOZ_OPTIMIZE']:
skia_opt_flags += ['-O3'] skia_opt_flags += ['-O3']
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'skia/src/base/SkArenaAlloc.cpp',
'skia/src/base/SkBezierCurves.cpp',
'skia/src/base/SkBlockAllocator.cpp',
'skia/src/base/SkBuffer.cpp',
'skia/src/base/SkContainers.cpp',
'skia/src/base/SkCubics.cpp',
'skia/src/base/SkDeque.cpp',
'skia/src/base/SkFloatingPoint.cpp',
'skia/src/base/SkHalf.cpp',
'skia/src/base/SkMalloc.cpp',
'skia/src/base/SkMathPriv.cpp',
'skia/src/base/SkQuads.cpp',
'skia/src/base/SkSafeMath.cpp',
'skia/src/base/SkSemaphore.cpp',
'skia/src/base/SkTDArray.cpp',
'skia/src/base/SkThreadID.cpp',
'skia/src/base/SkTSearch.cpp',
'skia/src/base/SkUTF.cpp',
'skia/src/base/SkUtils.cpp',
'skia/src/codec/SkMasks.cpp', 'skia/src/codec/SkMasks.cpp',
'skia/src/core/SkAAClip.cpp', 'skia/src/core/SkAAClip.cpp',
'skia/src/core/SkAlphaRuns.cpp', 'skia/src/core/SkAlphaRuns.cpp',
'skia/src/core/SkAnalyticEdge.cpp', 'skia/src/core/SkAnalyticEdge.cpp',
'skia/src/core/SkAnnotation.cpp', 'skia/src/core/SkAnnotation.cpp',
'skia/src/core/SkArenaAlloc.cpp',
'skia/src/core/SkATrace.cpp', 'skia/src/core/SkATrace.cpp',
'skia/src/core/SkAutoPixmapStorage.cpp', 'skia/src/core/SkAutoPixmapStorage.cpp',
'skia/src/core/SkBBHFactory.cpp', 'skia/src/core/SkBBHFactory.cpp',
'skia/src/core/SkBigPicture.cpp', 'skia/src/core/SkBigPicture.cpp',
'skia/src/core/SkBitmap.cpp', 'skia/src/core/SkBitmap.cpp',
'skia/src/core/SkBitmapCache.cpp', 'skia/src/core/SkBitmapCache.cpp',
'skia/src/core/SkBitmapController.cpp',
'skia/src/core/SkBitmapDevice.cpp', 'skia/src/core/SkBitmapDevice.cpp',
'skia/src/core/SkBlendMode.cpp', 'skia/src/core/SkBlendMode.cpp',
'skia/src/core/SkBlendModeBlender.cpp',
'skia/src/core/SkBlurMask.cpp', 'skia/src/core/SkBlurMask.cpp',
'skia/src/core/SkBlurMF.cpp', 'skia/src/core/SkBlurMF.cpp',
'skia/src/core/SkBuffer.cpp',
'skia/src/core/SkCachedData.cpp', 'skia/src/core/SkCachedData.cpp',
'skia/src/core/SkCanvas.cpp', 'skia/src/core/SkCanvas.cpp',
'skia/src/core/SkCanvas_Raster.cpp',
'skia/src/core/SkCanvasPriv.cpp', 'skia/src/core/SkCanvasPriv.cpp',
'skia/src/core/SkCapabilities.cpp',
'skia/src/core/SkChromeRemoteGlyphCache.cpp',
'skia/src/core/SkClipStack.cpp', 'skia/src/core/SkClipStack.cpp',
'skia/src/core/SkClipStackDevice.cpp', 'skia/src/core/SkClipStackDevice.cpp',
'skia/src/core/SkColor.cpp', 'skia/src/core/SkColor.cpp',
'skia/src/core/SkColorFilter.cpp', 'skia/src/core/SkColorFilter.cpp',
'skia/src/core/SkColorFilter_Matrix.cpp', 'skia/src/core/SkColorFilter_Matrix.cpp',
'skia/src/core/SkCompressedDataUtils.cpp',
'skia/src/core/SkContourMeasure.cpp', 'skia/src/core/SkContourMeasure.cpp',
'skia/src/core/SkConvertPixels.cpp', 'skia/src/core/SkConvertPixels.cpp',
'skia/src/core/SkConvolver.cpp',
'skia/src/core/SkCpu.cpp', 'skia/src/core/SkCpu.cpp',
'skia/src/core/SkCubicClipper.cpp', 'skia/src/core/SkCubicClipper.cpp',
'skia/src/core/SkCubicMap.cpp', 'skia/src/core/SkCubicMap.cpp',
@ -60,7 +80,6 @@ UNIFIED_SOURCES += [
'skia/src/core/SkDebug.cpp', 'skia/src/core/SkDebug.cpp',
'skia/src/core/SkDeferredDisplayList.cpp', 'skia/src/core/SkDeferredDisplayList.cpp',
'skia/src/core/SkDeferredDisplayListRecorder.cpp', 'skia/src/core/SkDeferredDisplayListRecorder.cpp',
'skia/src/core/SkDeque.cpp',
'skia/src/core/SkDescriptor.cpp', 'skia/src/core/SkDescriptor.cpp',
'skia/src/core/SkDevice.cpp', 'skia/src/core/SkDevice.cpp',
'skia/src/core/SkDistanceFieldGen.cpp', 'skia/src/core/SkDistanceFieldGen.cpp',
@ -70,6 +89,7 @@ UNIFIED_SOURCES += [
'skia/src/core/SkDraw_text.cpp', 'skia/src/core/SkDraw_text.cpp',
'skia/src/core/SkDraw_vertices.cpp', 'skia/src/core/SkDraw_vertices.cpp',
'skia/src/core/SkDrawable.cpp', 'skia/src/core/SkDrawable.cpp',
'skia/src/core/SkDrawBase.cpp',
'skia/src/core/SkDrawLooper.cpp', 'skia/src/core/SkDrawLooper.cpp',
'skia/src/core/SkDrawShadowInfo.cpp', 'skia/src/core/SkDrawShadowInfo.cpp',
'skia/src/core/SkEdge.cpp', 'skia/src/core/SkEdge.cpp',
@ -78,21 +98,19 @@ UNIFIED_SOURCES += [
'skia/src/core/SkExecutor.cpp', 'skia/src/core/SkExecutor.cpp',
'skia/src/core/SkFlattenable.cpp', 'skia/src/core/SkFlattenable.cpp',
'skia/src/core/SkFont.cpp', 'skia/src/core/SkFont.cpp',
'skia/src/core/SkFont_serial.cpp',
'skia/src/core/SkFontDescriptor.cpp', 'skia/src/core/SkFontDescriptor.cpp',
'skia/src/core/SkFontLCDConfig.cpp', 'skia/src/core/SkFontMetricsPriv.cpp',
'skia/src/core/SkFontMgr.cpp', 'skia/src/core/SkFontMgr.cpp',
'skia/src/core/SkFontStream.cpp', 'skia/src/core/SkFontStream.cpp',
'skia/src/core/SkGaussFilter.cpp', 'skia/src/core/SkGaussFilter.cpp',
'skia/src/core/SkGeometry.cpp', 'skia/src/core/SkGeometry.cpp',
'skia/src/core/SkGlobalInitialization_core.cpp', 'skia/src/core/SkGlobalInitialization_core.cpp',
'skia/src/core/SkGlyph.cpp', 'skia/src/core/SkGlyph.cpp',
'skia/src/core/SkGlyphBuffer.cpp',
'skia/src/core/SkGlyphRun.cpp',
'skia/src/core/SkGlyphRunPainter.cpp', 'skia/src/core/SkGlyphRunPainter.cpp',
'skia/src/core/SkGpuBlurUtils.cpp', 'skia/src/core/SkGpuBlurUtils.cpp',
'skia/src/core/SkGraphics.cpp', 'skia/src/core/SkGraphics.cpp',
'skia/src/core/SkHalf.cpp', 'skia/src/core/SkIDChangeListener.cpp',
'skia/src/core/SkICC.cpp',
'skia/src/core/SkImageFilter.cpp', 'skia/src/core/SkImageFilter.cpp',
'skia/src/core/SkImageFilterCache.cpp', 'skia/src/core/SkImageFilterCache.cpp',
'skia/src/core/SkImageFilterTypes.cpp', 'skia/src/core/SkImageFilterTypes.cpp',
@ -101,25 +119,28 @@ UNIFIED_SOURCES += [
'skia/src/core/SkLatticeIter.cpp', 'skia/src/core/SkLatticeIter.cpp',
'skia/src/core/SkLineClipper.cpp', 'skia/src/core/SkLineClipper.cpp',
'skia/src/core/SkLocalMatrixImageFilter.cpp', 'skia/src/core/SkLocalMatrixImageFilter.cpp',
'skia/src/core/SkM44.cpp',
'skia/src/core/SkMallocPixelRef.cpp', 'skia/src/core/SkMallocPixelRef.cpp',
'skia/src/core/SkMask.cpp', 'skia/src/core/SkMask.cpp',
'skia/src/core/SkMaskBlurFilter.cpp', 'skia/src/core/SkMaskBlurFilter.cpp',
'skia/src/core/SkMaskCache.cpp', 'skia/src/core/SkMaskCache.cpp',
'skia/src/core/SkMaskFilter.cpp', 'skia/src/core/SkMaskFilter.cpp',
'skia/src/core/SkMaskGamma.cpp', 'skia/src/core/SkMaskGamma.cpp',
'skia/src/core/SkMath.cpp', 'skia/src/core/SkMatrixInvert.cpp',
'skia/src/core/SkMatrixImageFilter.cpp',
'skia/src/core/SkMD5.cpp', 'skia/src/core/SkMD5.cpp',
'skia/src/core/SkMipMap.cpp', 'skia/src/core/SkMesh.cpp',
'skia/src/core/SkMipmap.cpp',
'skia/src/core/SkMipmapAccessor.cpp',
'skia/src/core/SkMipmapBuilder.cpp',
'skia/src/core/SkModeColorFilter.cpp', 'skia/src/core/SkModeColorFilter.cpp',
'skia/src/core/SkMultiPictureDraw.cpp',
'skia/src/core/SkPaint.cpp', 'skia/src/core/SkPaint.cpp',
'skia/src/core/SkPaintPriv.cpp', 'skia/src/core/SkPaintPriv.cpp',
'skia/src/core/SkPath.cpp',
'skia/src/core/SkPath_serial.cpp', 'skia/src/core/SkPath_serial.cpp',
'skia/src/core/SkPathBuilder.cpp',
'skia/src/core/SkPathEffect.cpp', 'skia/src/core/SkPathEffect.cpp',
'skia/src/core/SkPathMeasure.cpp', 'skia/src/core/SkPathMeasure.cpp',
'skia/src/core/SkPathRef.cpp', 'skia/src/core/SkPathRef.cpp',
'skia/src/core/SkPathUtils.cpp',
'skia/src/core/SkPicture.cpp', 'skia/src/core/SkPicture.cpp',
'skia/src/core/SkPictureFlat.cpp', 'skia/src/core/SkPictureFlat.cpp',
'skia/src/core/SkPictureImageGenerator.cpp', 'skia/src/core/SkPictureImageGenerator.cpp',
@ -128,6 +149,7 @@ UNIFIED_SOURCES += [
'skia/src/core/SkPictureRecorder.cpp', 'skia/src/core/SkPictureRecorder.cpp',
'skia/src/core/SkPixelRef.cpp', 'skia/src/core/SkPixelRef.cpp',
'skia/src/core/SkPixmap.cpp', 'skia/src/core/SkPixmap.cpp',
'skia/src/core/SkPixmapDraw.cpp',
'skia/src/core/SkPoint.cpp', 'skia/src/core/SkPoint.cpp',
'skia/src/core/SkPoint3.cpp', 'skia/src/core/SkPoint3.cpp',
'skia/src/core/SkPromiseImageTexture.cpp', 'skia/src/core/SkPromiseImageTexture.cpp',
@ -137,6 +159,7 @@ UNIFIED_SOURCES += [
'skia/src/core/SkRasterPipeline.cpp', 'skia/src/core/SkRasterPipeline.cpp',
'skia/src/core/SkRasterPipelineBlitter.cpp', 'skia/src/core/SkRasterPipelineBlitter.cpp',
'skia/src/core/SkReadBuffer.cpp', 'skia/src/core/SkReadBuffer.cpp',
'skia/src/core/SkReadPixelsRec.cpp',
'skia/src/core/SkRecord.cpp', 'skia/src/core/SkRecord.cpp',
'skia/src/core/SkRecordDraw.cpp', 'skia/src/core/SkRecordDraw.cpp',
'skia/src/core/SkRecordedDrawable.cpp', 'skia/src/core/SkRecordedDrawable.cpp',
@ -145,18 +168,19 @@ UNIFIED_SOURCES += [
'skia/src/core/SkRect.cpp', 'skia/src/core/SkRect.cpp',
'skia/src/core/SkRegion.cpp', 'skia/src/core/SkRegion.cpp',
'skia/src/core/SkRegion_path.cpp', 'skia/src/core/SkRegion_path.cpp',
'skia/src/core/SkRemoteGlyphCache.cpp',
'skia/src/core/SkResourceCache.cpp', 'skia/src/core/SkResourceCache.cpp',
'skia/src/core/SkRRect.cpp', 'skia/src/core/SkRRect.cpp',
'skia/src/core/SkRWBuffer.cpp', 'skia/src/core/SkRSXform.cpp',
'skia/src/core/SkRuntimeEffect.cpp',
'skia/src/core/SkScalar.cpp', 'skia/src/core/SkScalar.cpp',
'skia/src/core/SkScalerContext.cpp', 'skia/src/core/SkScalerContext.cpp',
'skia/src/core/SkScan.cpp', 'skia/src/core/SkScan.cpp',
'skia/src/core/SkScan_AAAPath.cpp', 'skia/src/core/SkScan_AAAPath.cpp',
'skia/src/core/SkScan_Hairline.cpp', 'skia/src/core/SkScan_Hairline.cpp',
'skia/src/core/SkScan_Path.cpp', 'skia/src/core/SkScan_Path.cpp',
'skia/src/core/SkSemaphore.cpp', 'skia/src/core/SkScan_SAAPath.cpp',
'skia/src/core/SkSharedMutex.cpp', 'skia/src/core/SkSharedMutex.cpp',
'skia/src/core/SkSLTypeShared.cpp',
'skia/src/core/SkSpecialImage.cpp', 'skia/src/core/SkSpecialImage.cpp',
'skia/src/core/SkSpecialSurface.cpp', 'skia/src/core/SkSpecialSurface.cpp',
'skia/src/core/SkSpinlock.cpp', 'skia/src/core/SkSpinlock.cpp',
@ -173,32 +197,37 @@ UNIFIED_SOURCES += [
'skia/src/core/SkSwizzle.cpp', 'skia/src/core/SkSwizzle.cpp',
'skia/src/core/SkTaskGroup.cpp', 'skia/src/core/SkTaskGroup.cpp',
'skia/src/core/SkTextBlob.cpp', 'skia/src/core/SkTextBlob.cpp',
'skia/src/core/SkThreadID.cpp', 'skia/src/core/SkTextBlobTrace.cpp',
'skia/src/core/SkTime.cpp', 'skia/src/core/SkTime.cpp',
'skia/src/core/SkTLS.cpp',
'skia/src/core/SkTSearch.cpp',
'skia/src/core/SkTypeface.cpp', 'skia/src/core/SkTypeface.cpp',
'skia/src/core/SkTypeface_remote.cpp', 'skia/src/core/SkTypeface_remote.cpp',
'skia/src/core/SkTypefaceCache.cpp', 'skia/src/core/SkTypefaceCache.cpp',
'skia/src/core/SkUnPreMultiply.cpp', 'skia/src/core/SkUnPreMultiply.cpp',
'skia/src/core/SkUtils.cpp',
'skia/src/core/SkVertState.cpp', 'skia/src/core/SkVertState.cpp',
'skia/src/core/SkVM.cpp', 'skia/src/core/SkVM.cpp',
'skia/src/core/SkVMBlitter.cpp', 'skia/src/core/SkVMBlitter.cpp',
'skia/src/core/SkWriteBuffer.cpp', 'skia/src/core/SkWriteBuffer.cpp',
'skia/src/core/SkWritePixelsRec.cpp',
'skia/src/core/SkWriter32.cpp', 'skia/src/core/SkWriter32.cpp',
'skia/src/core/SkYUVASizeInfo.cpp', 'skia/src/core/SkYUVAInfo.cpp',
'skia/src/core/SkYUVAPixmaps.cpp',
'skia/src/core/SkYUVMath.cpp', 'skia/src/core/SkYUVMath.cpp',
'skia/src/core/SkYUVPlanesCache.cpp', 'skia/src/core/SkYUVPlanesCache.cpp',
'skia/src/effects/imagefilters/SkBlurImageFilter.cpp', 'skia/src/effects/imagefilters/SkBlurImageFilter.cpp',
'skia/src/effects/imagefilters/SkComposeImageFilter.cpp', 'skia/src/effects/imagefilters/SkComposeImageFilter.cpp',
'skia/src/effects/SkDashPathEffect.cpp', 'skia/src/effects/SkDashPathEffect.cpp',
'skia/src/encode/SkEncoder.cpp',
'skia/src/encode/SkICC.cpp',
'skia/src/encode/SkImageEncoder.cpp',
'skia/src/image/SkImage.cpp', 'skia/src/image/SkImage.cpp',
'skia/src/image/SkImage_Base.cpp',
'skia/src/image/SkImage_Lazy.cpp', 'skia/src/image/SkImage_Lazy.cpp',
'skia/src/image/SkImage_Raster.cpp', 'skia/src/image/SkImage_Raster.cpp',
'skia/src/image/SkRescaleAndReadPixels.cpp',
'skia/src/image/SkSurface.cpp', 'skia/src/image/SkSurface.cpp',
'skia/src/image/SkSurface_Base.cpp',
'skia/src/image/SkSurface_Null.cpp',
'skia/src/image/SkSurface_Raster.cpp', 'skia/src/image/SkSurface_Raster.cpp',
'skia/src/images/SkImageEncoder.cpp',
'skia/src/lazy/SkDiscardableMemoryPool.cpp', 'skia/src/lazy/SkDiscardableMemoryPool.cpp',
'skia/src/pathops/SkAddIntersections.cpp', 'skia/src/pathops/SkAddIntersections.cpp',
'skia/src/pathops/SkDConicLineIntersection.cpp', 'skia/src/pathops/SkDConicLineIntersection.cpp',
@ -232,15 +261,15 @@ UNIFIED_SOURCES += [
'skia/src/pathops/SkPathWriter.cpp', 'skia/src/pathops/SkPathWriter.cpp',
'skia/src/pathops/SkReduceOrder.cpp', 'skia/src/pathops/SkReduceOrder.cpp',
'skia/src/ports/SkDiscardableMemory_none.cpp', 'skia/src/ports/SkDiscardableMemory_none.cpp',
'skia/src/ports/SkFontMgr_empty_factory.cpp',
'skia/src/ports/SkGlobalInitialization_default.cpp', 'skia/src/ports/SkGlobalInitialization_default.cpp',
'skia/src/ports/SkImageGenerator_none.cpp', 'skia/src/ports/SkImageGenerator_none.cpp',
'skia/src/ports/SkMemory_mozalloc.cpp', 'skia/src/ports/SkMemory_mozalloc.cpp',
'skia/src/ports/SkOSFile_stdio.cpp', 'skia/src/ports/SkOSFile_stdio.cpp',
'skia/src/sfnt/SkOTTable_name.cpp', 'skia/src/sfnt/SkOTTable_name.cpp',
'skia/src/sfnt/SkOTUtils.cpp', 'skia/src/sfnt/SkOTUtils.cpp',
'skia/src/shaders/gradients/Sk4fGradientBase.cpp',
'skia/src/shaders/gradients/Sk4fLinearGradient.cpp',
'skia/src/shaders/gradients/SkGradientShader.cpp', 'skia/src/shaders/gradients/SkGradientShader.cpp',
'skia/src/shaders/gradients/SkGradientShaderBase.cpp',
'skia/src/shaders/gradients/SkLinearGradient.cpp', 'skia/src/shaders/gradients/SkLinearGradient.cpp',
'skia/src/shaders/gradients/SkRadialGradient.cpp', 'skia/src/shaders/gradients/SkRadialGradient.cpp',
'skia/src/shaders/gradients/SkSweepGradient.cpp', 'skia/src/shaders/gradients/SkSweepGradient.cpp',
@ -249,42 +278,138 @@ UNIFIED_SOURCES += [
'skia/src/shaders/SkColorFilterShader.cpp', 'skia/src/shaders/SkColorFilterShader.cpp',
'skia/src/shaders/SkColorShader.cpp', 'skia/src/shaders/SkColorShader.cpp',
'skia/src/shaders/SkComposeShader.cpp', 'skia/src/shaders/SkComposeShader.cpp',
'skia/src/shaders/SkCoordClampShader.cpp',
'skia/src/shaders/SkEmptyShader.cpp',
'skia/src/shaders/SkGainmapShader.cpp',
'skia/src/shaders/SkImageShader.cpp', 'skia/src/shaders/SkImageShader.cpp',
'skia/src/shaders/SkLocalMatrixShader.cpp', 'skia/src/shaders/SkLocalMatrixShader.cpp',
'skia/src/shaders/SkPerlinNoiseShader.cpp', 'skia/src/shaders/SkPerlinNoiseShader.cpp',
'skia/src/shaders/SkPictureShader.cpp', 'skia/src/shaders/SkPictureShader.cpp',
'skia/src/shaders/SkRTShader.cpp',
'skia/src/shaders/SkShader.cpp', 'skia/src/shaders/SkShader.cpp',
'skia/src/shaders/SkTransformShader.cpp',
'skia/src/sksl/analysis/SkSLCanExitWithoutReturningValue.cpp',
'skia/src/sksl/analysis/SkSLCheckProgramStructure.cpp',
'skia/src/sksl/analysis/SkSLFinalizationChecks.cpp',
'skia/src/sksl/analysis/SkSLGetLoopControlFlowInfo.cpp',
'skia/src/sksl/analysis/SkSLGetLoopUnrollInfo.cpp',
'skia/src/sksl/analysis/SkSLGetReturnComplexity.cpp',
'skia/src/sksl/analysis/SkSLHasSideEffects.cpp',
'skia/src/sksl/analysis/SkSLIsConstantExpression.cpp',
'skia/src/sksl/analysis/SkSLIsDynamicallyUniformExpression.cpp',
'skia/src/sksl/analysis/SkSLIsSameExpressionTree.cpp',
'skia/src/sksl/analysis/SkSLIsTrivialExpression.cpp',
'skia/src/sksl/analysis/SkSLProgramUsage.cpp',
'skia/src/sksl/analysis/SkSLSwitchCaseContainsExit.cpp',
'skia/src/sksl/analysis/SkSLSymbolTableStackBuilder.cpp',
'skia/src/sksl/codegen/SkSLRasterPipelineBuilder.cpp',
'skia/src/sksl/codegen/SkSLRasterPipelineCodeGenerator.cpp',
'skia/src/sksl/codegen/SkSLVMCodeGenerator.cpp',
'skia/src/sksl/dsl/DSLBlock.cpp',
'skia/src/sksl/dsl/DSLCase.cpp',
'skia/src/sksl/dsl/DSLCore.cpp',
'skia/src/sksl/dsl/DSLExpression.cpp',
'skia/src/sksl/dsl/DSLFunction.cpp',
'skia/src/sksl/dsl/DSLLayout.cpp',
'skia/src/sksl/dsl/DSLStatement.cpp',
'skia/src/sksl/dsl/DSLType.cpp',
'skia/src/sksl/dsl/DSLVar.cpp',
'skia/src/sksl/dsl/priv/DSLWriter.cpp',
'skia/src/sksl/ir/SkSLBinaryExpression.cpp',
'skia/src/sksl/ir/SkSLBlock.cpp',
'skia/src/sksl/ir/SkSLChildCall.cpp',
'skia/src/sksl/ir/SkSLConstructor.cpp',
'skia/src/sksl/ir/SkSLConstructorArray.cpp',
'skia/src/sksl/ir/SkSLConstructorArrayCast.cpp',
'skia/src/sksl/ir/SkSLConstructorCompound.cpp',
'skia/src/sksl/ir/SkSLConstructorCompoundCast.cpp',
'skia/src/sksl/ir/SkSLConstructorDiagonalMatrix.cpp',
'skia/src/sksl/ir/SkSLConstructorMatrixResize.cpp',
'skia/src/sksl/ir/SkSLConstructorScalarCast.cpp',
'skia/src/sksl/ir/SkSLConstructorSplat.cpp',
'skia/src/sksl/ir/SkSLConstructorStruct.cpp',
'skia/src/sksl/ir/SkSLDiscardStatement.cpp',
'skia/src/sksl/ir/SkSLDoStatement.cpp',
'skia/src/sksl/ir/SkSLExpression.cpp',
'skia/src/sksl/ir/SkSLExpressionStatement.cpp',
'skia/src/sksl/ir/SkSLFieldAccess.cpp',
'skia/src/sksl/ir/SkSLForStatement.cpp',
'skia/src/sksl/ir/SkSLFunctionCall.cpp',
'skia/src/sksl/ir/SkSLFunctionDeclaration.cpp',
'skia/src/sksl/ir/SkSLFunctionDefinition.cpp',
'skia/src/sksl/ir/SkSLIfStatement.cpp',
'skia/src/sksl/ir/SkSLIndexExpression.cpp',
'skia/src/sksl/ir/SkSLInterfaceBlock.cpp',
'skia/src/sksl/ir/SkSLLayout.cpp',
'skia/src/sksl/ir/SkSLLiteral.cpp',
'skia/src/sksl/ir/SkSLModifiers.cpp',
'skia/src/sksl/ir/SkSLPostfixExpression.cpp',
'skia/src/sksl/ir/SkSLPrefixExpression.cpp',
'skia/src/sksl/ir/SkSLProgram.cpp',
'skia/src/sksl/ir/SkSLSetting.cpp', 'skia/src/sksl/ir/SkSLSetting.cpp',
'skia/src/sksl/ir/SkSLSwitchStatement.cpp',
'skia/src/sksl/ir/SkSLSwizzle.cpp',
'skia/src/sksl/ir/SkSLSymbolTable.cpp', 'skia/src/sksl/ir/SkSLSymbolTable.cpp',
'skia/src/sksl/ir/SkSLTernaryExpression.cpp',
'skia/src/sksl/ir/SkSLType.cpp', 'skia/src/sksl/ir/SkSLType.cpp',
'skia/src/sksl/ir/SkSLTypeReference.cpp',
'skia/src/sksl/ir/SkSLVarDeclarations.cpp',
'skia/src/sksl/ir/SkSLVariable.cpp',
'skia/src/sksl/ir/SkSLVariableReference.cpp', 'skia/src/sksl/ir/SkSLVariableReference.cpp',
'skia/src/sksl/SkSLASTNode.cpp', 'skia/src/sksl/SkSLAnalysis.cpp',
'skia/src/sksl/SkSLByteCode.cpp', 'skia/src/sksl/SkSLBuiltinTypes.cpp',
'skia/src/sksl/SkSLByteCodeGenerator.cpp',
'skia/src/sksl/SkSLCFGGenerator.cpp',
'skia/src/sksl/SkSLCompiler.cpp', 'skia/src/sksl/SkSLCompiler.cpp',
'skia/src/sksl/SkSLIRGenerator.cpp', 'skia/src/sksl/SkSLConstantFolder.cpp',
'skia/src/sksl/SkSLContext.cpp',
'skia/src/sksl/SkSLErrorReporter.cpp',
'skia/src/sksl/SkSLInliner.cpp',
'skia/src/sksl/SkSLIntrinsicList.cpp',
'skia/src/sksl/SkSLMangler.cpp',
'skia/src/sksl/SkSLModuleLoader.cpp',
'skia/src/sksl/SkSLOperator.cpp',
'skia/src/sksl/SkSLOutputStream.cpp',
'skia/src/sksl/SkSLParser.cpp', 'skia/src/sksl/SkSLParser.cpp',
'skia/src/sksl/SkSLSectionAndParameterHelper.cpp', 'skia/src/sksl/SkSLPool.cpp',
'skia/src/sksl/SkSLPosition.cpp',
'skia/src/sksl/SkSLSampleUsage.cpp',
'skia/src/sksl/SkSLString.cpp', 'skia/src/sksl/SkSLString.cpp',
'skia/src/sksl/SkSLThreadContext.cpp',
'skia/src/sksl/SkSLUtil.cpp', 'skia/src/sksl/SkSLUtil.cpp',
'skia/src/utils/mac/SkStream_mac.cpp', 'skia/src/sksl/tracing/SkRPDebugTrace.cpp',
'skia/src/sksl/tracing/SkSLTraceHook.cpp',
'skia/src/sksl/tracing/SkVMDebugTrace.cpp',
'skia/src/sksl/tracing/SkVMDebugTracePlayer.cpp',
'skia/src/sksl/transform/SkSLAddConstToVarModifiers.cpp',
'skia/src/sksl/transform/SkSLEliminateDeadFunctions.cpp',
'skia/src/sksl/transform/SkSLEliminateDeadGlobalVariables.cpp',
'skia/src/sksl/transform/SkSLEliminateDeadLocalVariables.cpp',
'skia/src/sksl/transform/SkSLEliminateEmptyStatements.cpp',
'skia/src/sksl/transform/SkSLEliminateUnreachableCode.cpp',
'skia/src/sksl/transform/SkSLFindAndDeclareBuiltinFunctions.cpp',
'skia/src/sksl/transform/SkSLFindAndDeclareBuiltinVariables.cpp',
'skia/src/sksl/transform/SkSLRenamePrivateSymbols.cpp',
'skia/src/sksl/transform/SkSLReplaceConstVarsWithLiterals.cpp',
'skia/src/sksl/transform/SkSLRewriteIndexedSwizzle.cpp',
'skia/src/text/GlyphRun.cpp',
'skia/src/text/StrikeForGPU.cpp',
'skia/src/utils/mac/SkCTFont.cpp',
'skia/src/utils/SkBase64.cpp', 'skia/src/utils/SkBase64.cpp',
'skia/src/utils/SkCharToGlyphCache.cpp', 'skia/src/utils/SkCharToGlyphCache.cpp',
'skia/src/utils/SkClipStackUtils.cpp',
'skia/src/utils/SkCustomTypeface.cpp',
'skia/src/utils/SkDashPath.cpp', 'skia/src/utils/SkDashPath.cpp',
'skia/src/utils/SkEventTracer.cpp', 'skia/src/utils/SkEventTracer.cpp',
'skia/src/utils/SkFloatToDecimal.cpp', 'skia/src/utils/SkFloatToDecimal.cpp',
'skia/src/utils/SkGaussianColorFilter.cpp',
'skia/src/utils/SkMatrix22.cpp', 'skia/src/utils/SkMatrix22.cpp',
'skia/src/utils/SkOrderedFontMgr.cpp',
'skia/src/utils/SkOSPath.cpp', 'skia/src/utils/SkOSPath.cpp',
'skia/src/utils/SkPatchUtils.cpp', 'skia/src/utils/SkPatchUtils.cpp',
'skia/src/utils/SkPolyUtils.cpp', 'skia/src/utils/SkPolyUtils.cpp',
'skia/src/utils/SkShaderUtils.cpp',
'skia/src/utils/SkShadowTessellator.cpp', 'skia/src/utils/SkShadowTessellator.cpp',
'skia/src/utils/SkShadowUtils.cpp', 'skia/src/utils/SkShadowUtils.cpp',
'skia/src/utils/SkTextUtils.cpp', 'skia/src/utils/SkTextUtils.cpp',
'skia/src/utils/SkThreadUtils_pthread.cpp', 'skia/src/utils/SkVMVisualizer.cpp',
'skia/src/utils/SkThreadUtils_win.cpp',
'skia/src/utils/SkUTF.cpp',
'skia/src/utils/win/SkAutoCoInitialize.cpp', 'skia/src/utils/win/SkAutoCoInitialize.cpp',
'skia/src/utils/win/SkDWrite.cpp', 'skia/src/utils/win/SkDWrite.cpp',
'skia/src/utils/win/SkDWriteFontFileStream.cpp', 'skia/src/utils/win/SkDWriteFontFileStream.cpp',
@ -293,28 +418,26 @@ UNIFIED_SOURCES += [
'skia/src/utils/win/SkIStream.cpp', 'skia/src/utils/win/SkIStream.cpp',
] ]
SOURCES += [ SOURCES += [
'skia/modules/skcms/skcms.cc',
'skia/src/core/SkBitmapProcState.cpp', 'skia/src/core/SkBitmapProcState.cpp',
'skia/src/core/SkBitmapProcState_matrixProcs.cpp', 'skia/src/core/SkBitmapProcState_matrixProcs.cpp',
'skia/src/core/SkBitmapScaler.cpp',
'skia/src/core/SkBlitRow_D32.cpp', 'skia/src/core/SkBlitRow_D32.cpp',
'skia/src/core/SkBlitter.cpp', 'skia/src/core/SkBlitter.cpp',
'skia/src/core/SkBlitter_A8.cpp', 'skia/src/core/SkBlitter_A8.cpp',
'skia/src/core/SkBlitter_ARGB32.cpp', 'skia/src/core/SkBlitter_ARGB32.cpp',
'skia/src/core/SkBlitter_RGB565.cpp',
'skia/src/core/SkBlitter_Sprite.cpp', 'skia/src/core/SkBlitter_Sprite.cpp',
'skia/src/core/SkColorSpace.cpp', 'skia/src/core/SkColorSpace.cpp',
'skia/src/core/SkColorSpaceXformSteps.cpp', 'skia/src/core/SkColorSpaceXformSteps.cpp',
'skia/src/core/SkMatrix.cpp', 'skia/src/core/SkMatrix.cpp',
'skia/src/core/SkMatrix44.cpp',
'skia/src/core/SkMiniRecorder.cpp',
'skia/src/core/SkOpts.cpp', 'skia/src/core/SkOpts.cpp',
'skia/src/core/SkOpts_erms.cpp',
'skia/src/core/SkPath.cpp',
'skia/src/core/SkPictureData.cpp', 'skia/src/core/SkPictureData.cpp',
'skia/src/core/SkRecorder.cpp', 'skia/src/core/SkRecorder.cpp',
'skia/src/core/SkRTree.cpp', 'skia/src/core/SkRTree.cpp',
'skia/src/core/SkScan_Antihair.cpp', 'skia/src/core/SkScan_Antihair.cpp',
'skia/src/core/SkScan_AntiPath.cpp', 'skia/src/core/SkScan_AntiPath.cpp',
'skia/src/core/SkSpriteBlitter_ARGB32.cpp', 'skia/src/core/SkSpriteBlitter_ARGB32.cpp',
'skia/src/core/SkSpriteBlitter_RGB565.cpp',
'skia/src/core/SkVertices.cpp', 'skia/src/core/SkVertices.cpp',
'skia/src/core/SkXfermode.cpp', 'skia/src/core/SkXfermode.cpp',
'skia/src/core/SkXfermodeInterpretation.cpp', 'skia/src/core/SkXfermodeInterpretation.cpp',
@ -322,22 +445,19 @@ SOURCES += [
'skia/src/sksl/SkSLLexer.cpp', 'skia/src/sksl/SkSLLexer.cpp',
'skia/src/utils/SkParse.cpp', 'skia/src/utils/SkParse.cpp',
'skia/src/utils/SkParsePath.cpp', 'skia/src/utils/SkParsePath.cpp',
'skia/third_party/skcms/skcms.cc',
] ]
SOURCES['skia/modules/skcms/skcms.cc'].flags += skia_opt_flags
SOURCES['skia/src/core/SkBitmapProcState.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkBitmapProcState.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkBitmapProcState_matrixProcs.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkBitmapProcState_matrixProcs.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkBitmapScaler.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkBlitRow_D32.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkBlitRow_D32.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkBlitter.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkBlitter.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkBlitter_A8.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkBlitter_A8.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkBlitter_ARGB32.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkBlitter_ARGB32.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkBlitter_RGB565.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkBlitter_Sprite.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkBlitter_Sprite.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkMatrix.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkMatrix.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkOpts.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkOpts.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkOpts_erms.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkSpriteBlitter_ARGB32.cpp'].flags += skia_opt_flags SOURCES['skia/src/core/SkSpriteBlitter_ARGB32.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkSpriteBlitter_RGB565.cpp'].flags += skia_opt_flags
SOURCES['skia/third_party/skcms/skcms.cc'].flags += skia_opt_flags
if CONFIG['MOZ_ENABLE_SKIA_PDF']: if CONFIG['MOZ_ENABLE_SKIA_PDF']:
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'skia/src/pdf/SkClusterator.cpp', 'skia/src/pdf/SkClusterator.cpp',
@ -370,7 +490,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
'skia/src/ports/SkDebug_android.cpp', 'skia/src/ports/SkDebug_android.cpp',
'skia/src/ports/SkOSFile_posix.cpp', 'skia/src/ports/SkOSFile_posix.cpp',
'skia/src/ports/SkOSLibrary_posix.cpp', 'skia/src/ports/SkOSLibrary_posix.cpp',
'skia/src/ports/SkTLS_pthread.cpp',
] ]
SOURCES += [ SOURCES += [
'skia/src/ports/SkFontHost_cairo.cpp', 'skia/src/ports/SkFontHost_cairo.cpp',
@ -379,19 +498,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'): if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'):
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'skia/src/ports/SkDebug_stdio.cpp', 'skia/src/ports/SkDebug_stdio.cpp',
'skia/src/ports/SkFontMgr_mac_ct.cpp',
'skia/src/ports/SkOSFile_posix.cpp', 'skia/src/ports/SkOSFile_posix.cpp',
'skia/src/ports/SkOSLibrary_posix.cpp', 'skia/src/ports/SkOSLibrary_posix.cpp',
'skia/src/ports/SkTLS_pthread.cpp', 'skia/src/ports/SkScalerContext_mac_ct.cpp',
] 'skia/src/ports/SkTypeface_mac_ct.cpp',
SOURCES += [
'skia/src/ports/SkFontHost_mac.cpp',
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'skia/src/ports/SkDebug_stdio.cpp', 'skia/src/ports/SkDebug_stdio.cpp',
'skia/src/ports/SkOSFile_posix.cpp', 'skia/src/ports/SkOSFile_posix.cpp',
'skia/src/ports/SkOSLibrary_posix.cpp', 'skia/src/ports/SkOSLibrary_posix.cpp',
'skia/src/ports/SkTLS_pthread.cpp',
] ]
SOURCES += [ SOURCES += [
'skia/src/ports/SkFontHost_cairo.cpp', 'skia/src/ports/SkFontHost_cairo.cpp',
@ -402,24 +519,22 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
'skia/src/ports/SkDebug_win.cpp', 'skia/src/ports/SkDebug_win.cpp',
'skia/src/ports/SkFontHost_win.cpp', 'skia/src/ports/SkFontHost_win.cpp',
'skia/src/ports/SkFontMgr_win_dw.cpp', 'skia/src/ports/SkFontMgr_win_dw.cpp',
'skia/src/ports/SkFontMgr_win_dw_factory.cpp',
'skia/src/ports/SkOSFile_win.cpp', 'skia/src/ports/SkOSFile_win.cpp',
'skia/src/ports/SkOSLibrary_win.cpp', 'skia/src/ports/SkOSLibrary_win.cpp',
'skia/src/ports/SkScalerContext_win_dw.cpp', 'skia/src/ports/SkScalerContext_win_dw.cpp',
'skia/src/ports/SkTLS_win.cpp',
'skia/src/ports/SkTypeface_win_dw.cpp', 'skia/src/ports/SkTypeface_win_dw.cpp',
] ]
if CONFIG['INTEL_ARCHITECTURE']: if CONFIG['INTEL_ARCHITECTURE']:
SOURCES += [ SOURCES += [
'skia/src/opts/SkOpts_avx.cpp', 'skia/src/opts/SkOpts_avx.cpp',
'skia/src/opts/SkOpts_hsw.cpp', 'skia/src/opts/SkOpts_hsw.cpp',
'skia/src/opts/SkOpts_sse41.cpp', 'skia/src/opts/SkOpts_skx.cpp',
'skia/src/opts/SkOpts_sse42.cpp', 'skia/src/opts/SkOpts_sse42.cpp',
'skia/src/opts/SkOpts_ssse3.cpp', 'skia/src/opts/SkOpts_ssse3.cpp',
] ]
SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += skia_opt_flags SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += skia_opt_flags SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkOpts_sse41.cpp'].flags += skia_opt_flags SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += skia_opt_flags SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += skia_opt_flags SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += skia_opt_flags
elif CONFIG['CPU_ARCH'] == 'aarch64': elif CONFIG['CPU_ARCH'] == 'aarch64':
@ -435,7 +550,6 @@ AllowCompilerWarnings()
FINAL_LIBRARY = 'gkmedias' FINAL_LIBRARY = 'gkmedias'
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [
'skia', 'skia',
'skia/include/third_party/skcms',
] ]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
@ -450,10 +564,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
if CONFIG['INTEL_ARCHITECTURE']: if CONFIG['INTEL_ARCHITECTURE']:
SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3'] SOURCES['skia/src/opts/SkOpts_ssse3.cpp'].flags += ['-mssse3']
SOURCES['skia/src/opts/SkOpts_sse41.cpp'].flags += ['-msse4.1']
SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2'] SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2']
SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx'] SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx']
SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma'] SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2', '-mf16c', '-mfma']
SOURCES['skia/src/opts/SkOpts_skx.cpp'].flags += ['-mavx512f', '-mavx512dq', '-mavx512cd', '-mavx512bw', '-mavx512vl']
elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'): elif CONFIG['CPU_ARCH'] == 'aarch64' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-march=armv8-a+crc'] SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += ['-march=armv8-a+crc']