Bug 1539026 - Skia m74 mozbuild fixes. r=rhunt

This commit is contained in:
Lee Salzman 2019-03-26 11:06:47 -04:00
Родитель f2f62aef14
Коммит 73443d7f86
2 изменённых файлов: 38 добавлений и 85 удалений

Просмотреть файл

@ -76,9 +76,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
# We should autogenerate these SSE related flags.
if CONFIG['INTEL_ARCHITECTURE']:
SOURCES['skia/src/opts/SkBitmapProcState_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
SOURCES['skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp'].flags += ['-mssse3']
SOURCES['skia/src/opts/SkBlitRow_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
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']
@ -148,9 +145,13 @@ def generate_opt_sources():
subprocess.check_output('cd skia && bin/gn gen out/{0} --args=\'target_cpu="{1}"\''.format(key, cpu), shell=True)
opt_sources[key] = set()
for dep in deps:
output = subprocess.check_output('cd skia && bin/gn desc out/{0} {1} sources'.format(key, dep), shell=True)
if output:
opt_sources[key].update(parse_sources(output))
try:
output = subprocess.check_output('cd skia && bin/gn desc out/{0} {1} sources'.format(key, dep), shell=True)
if output:
opt_sources[key].update(parse_sources(output))
except subprocess.CalledProcessError as e:
if e.output.find('source_set') < 0:
raise
return opt_sources
@ -165,7 +166,13 @@ def generate_platform_sources():
if output:
sources[plat] = parse_sources(output)
deps = {':effects' : 'common', ':pdf' : 'pdf'}
plat_deps = {':fontmgr_win' : 'win', ':fontmgr_win_gdi' : 'win'}
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)
if output:
sources[key].update(parse_sources(output))
deps = {':pdf' : 'pdf'}
for dep, key in deps.items():
output = subprocess.check_output('cd skia && bin/gn desc out/linux {} sources'.format(dep), shell=True)
if output:
@ -188,6 +195,7 @@ def generate_separated_sources(platform_sources):
'SkLight',
'SkNormal',
'codec',
'SkWGL',
'SkMemory_malloc',
'third_party',
'Sk3D',
@ -204,7 +212,6 @@ def generate_separated_sources(platform_sources):
'SkOverdrawCanvas',
'SkPaintFilterCanvas',
'SkParseColor',
'SkTextBox',
'SkWhitelistTypefaces',
'SkXPS',
'SkCreateCGImageRef',
@ -225,7 +232,6 @@ def generate_separated_sources(platform_sources):
'skia/src/effects/SkDashPathEffect.cpp',
'skia/src/ports/SkDiscardableMemory_none.cpp',
'skia/src/ports/SkGlobalInitialization_default.cpp',
'skia/src/ports/SkGlobalInitialization_default_imagefilters.cpp',
'skia/src/ports/SkMemory_mozalloc.cpp',
'skia/src/ports/SkImageGenerator_none.cpp',
'skia/third_party/skcms/skcms.cc',
@ -298,13 +304,11 @@ def write_cflags(f, values, subsearch, cflag, indent):
f.write("SOURCES[\'" + val + "\'].flags += " + cflag + "\n")
opt_whitelist = [
'skia/src/opts/Sk',
'SkOpts',
'SkBitmapProcState',
'SkBlitMask',
'SkBitmapScaler',
'SkBlitRow',
'SkBlitter',
'SkJumper',
'SkSpriteBlitter',
'SkMatrix.cpp',
'skcms',
@ -314,7 +318,6 @@ opt_whitelist = [
# non-unifiable. Keep track of this and fix it.
unified_blacklist = [
'FontHost',
'SkAdvancedTypefaceMetrics',
'SkBitmapProcState_matrixProcs.cpp',
'SkBlitter_A8.cpp',
'SkBlitter_ARGB32.cpp',
@ -327,7 +330,6 @@ unified_blacklist = [
'SkPDFFont.cpp',
'SkPictureData.cpp',
'SkColorSpace',
'SkImage_Gpu.cpp',
'SkPathOpsDebug.cpp',
'SkParsePath.cpp',
'SkRecorder.cpp',
@ -336,10 +338,8 @@ unified_blacklist = [
'SkMatrix44.cpp',
'SkRTree.cpp',
'SkVertices.cpp',
'SkJumper',
'SkSLHCodeGenerator.cpp',
'SkSLLexer.cpp',
'SkSLLayoutLexer.cpp',
] + opt_whitelist
def write_sources(f, values, indent):
@ -410,16 +410,19 @@ def write_mozbuild(sources):
write_sources(f, sources['intel'], 4)
write_cflags(f, sources['intel'], opt_whitelist, 'skia_opt_flags', 4)
f.write("elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):\n")
write_sources(f, sources['arm'], 4)
write_cflags(f, sources['arm'], opt_whitelist, 'skia_opt_flags', 4)
if sources['arm']:
f.write("elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):\n")
write_sources(f, sources['arm'], 4)
write_cflags(f, sources['arm'], opt_whitelist, 'skia_opt_flags', 4)
f.write("elif CONFIG['CPU_ARCH'] == 'aarch64':\n")
write_sources(f, sources['arm64'], 4)
write_cflags(f, sources['arm64'], opt_whitelist, 'skia_opt_flags', 4)
if sources['arm64']:
f.write("elif CONFIG['CPU_ARCH'] == 'aarch64':\n")
write_sources(f, sources['arm64'], 4)
write_cflags(f, sources['arm64'], opt_whitelist, 'skia_opt_flags', 4)
f.write("else:\n")
write_sources(f, sources['none'], 4)
if sources['none']:
f.write("else:\n")
write_sources(f, sources['none'], 4)
f.write(footer)

Просмотреть файл

@ -38,7 +38,6 @@ UNIFIED_SOURCES += [
'skia/src/core/SkBitmapController.cpp',
'skia/src/core/SkBitmapDevice.cpp',
'skia/src/core/SkBitmapProvider.cpp',
'skia/src/core/SkBitmapScaler.cpp',
'skia/src/core/SkBlendMode.cpp',
'skia/src/core/SkBlurMask.cpp',
'skia/src/core/SkBlurMF.cpp',
@ -51,6 +50,7 @@ UNIFIED_SOURCES += [
'skia/src/core/SkColor.cpp',
'skia/src/core/SkColorFilter.cpp',
'skia/src/core/SkColorMatrixFilterRowMajor255.cpp',
'skia/src/core/SkContourMeasure.cpp',
'skia/src/core/SkConvertPixels.cpp',
'skia/src/core/SkConvolver.cpp',
'skia/src/core/SkCoverageDelta.cpp',
@ -63,6 +63,7 @@ UNIFIED_SOURCES += [
'skia/src/core/SkDeferredDisplayList.cpp',
'skia/src/core/SkDeferredDisplayListRecorder.cpp',
'skia/src/core/SkDeque.cpp',
'skia/src/core/SkDescriptor.cpp',
'skia/src/core/SkDevice.cpp',
'skia/src/core/SkDistanceFieldGen.cpp',
'skia/src/core/SkDocument.cpp',
@ -76,18 +77,17 @@ UNIFIED_SOURCES += [
'skia/src/core/SkEdgeBuilder.cpp',
'skia/src/core/SkEdgeClipper.cpp',
'skia/src/core/SkExecutor.cpp',
'skia/src/core/SkFDot6Constants.cpp',
'skia/src/core/SkFlattenable.cpp',
'skia/src/core/SkFont.cpp',
'skia/src/core/SkFontDescriptor.cpp',
'skia/src/core/SkFontLCDConfig.cpp',
'skia/src/core/SkFontMgr.cpp',
'skia/src/core/SkFontPriv.cpp',
'skia/src/core/SkFontStream.cpp',
'skia/src/core/SkGaussFilter.cpp',
'skia/src/core/SkGeometry.cpp',
'skia/src/core/SkGlobalInitialization_core.cpp',
'skia/src/core/SkGlyph.cpp',
'skia/src/core/SkGlyphCache.cpp',
'skia/src/core/SkGlyphRun.cpp',
'skia/src/core/SkGlyphRunPainter.cpp',
'skia/src/core/SkGpuBlurUtils.cpp',
@ -110,12 +110,10 @@ UNIFIED_SOURCES += [
'skia/src/core/SkMath.cpp',
'skia/src/core/SkMatrixImageFilter.cpp',
'skia/src/core/SkMD5.cpp',
'skia/src/core/SkMetaData.cpp',
'skia/src/core/SkMipMap.cpp',
'skia/src/core/SkModeColorFilter.cpp',
'skia/src/core/SkMultiPictureDraw.cpp',
'skia/src/core/SkPaint.cpp',
'skia/src/core/SkPaint_text.cpp',
'skia/src/core/SkPaintPriv.cpp',
'skia/src/core/SkPath.cpp',
'skia/src/core/SkPath_serial.cpp',
@ -132,6 +130,7 @@ UNIFIED_SOURCES += [
'skia/src/core/SkPixmap.cpp',
'skia/src/core/SkPoint.cpp',
'skia/src/core/SkPoint3.cpp',
'skia/src/core/SkPromiseImageTexture.cpp',
'skia/src/core/SkPtrRecorder.cpp',
'skia/src/core/SkQuadClipper.cpp',
'skia/src/core/SkRasterClip.cpp',
@ -162,6 +161,7 @@ UNIFIED_SOURCES += [
'skia/src/core/SkSpecialSurface.cpp',
'skia/src/core/SkSpinlock.cpp',
'skia/src/core/SkStream.cpp',
'skia/src/core/SkStrike.cpp',
'skia/src/core/SkStrikeCache.cpp',
'skia/src/core/SkString.cpp',
'skia/src/core/SkStringUtils.cpp',
@ -184,6 +184,7 @@ UNIFIED_SOURCES += [
'skia/src/core/SkVertState.cpp',
'skia/src/core/SkWriteBuffer.cpp',
'skia/src/core/SkWriter32.cpp',
'skia/src/core/SkYUVASizeInfo.cpp',
'skia/src/core/SkYUVPlanesCache.cpp',
'skia/src/effects/imagefilters/SkBlurImageFilter.cpp',
'skia/src/effects/SkDashPathEffect.cpp',
@ -216,7 +217,6 @@ UNIFIED_SOURCES += [
'skia/src/pathops/SkPathOpsCurve.cpp',
'skia/src/pathops/SkPathOpsLine.cpp',
'skia/src/pathops/SkPathOpsOp.cpp',
'skia/src/pathops/SkPathOpsPoint.cpp',
'skia/src/pathops/SkPathOpsQuad.cpp',
'skia/src/pathops/SkPathOpsRect.cpp',
'skia/src/pathops/SkPathOpsSimplify.cpp',
@ -228,7 +228,6 @@ UNIFIED_SOURCES += [
'skia/src/pathops/SkReduceOrder.cpp',
'skia/src/ports/SkDiscardableMemory_none.cpp',
'skia/src/ports/SkGlobalInitialization_default.cpp',
'skia/src/ports/SkGlobalInitialization_default_imagefilters.cpp',
'skia/src/ports/SkImageGenerator_none.cpp',
'skia/src/ports/SkMemory_mozalloc.cpp',
'skia/src/ports/SkOSFile_stdio.cpp',
@ -256,11 +255,13 @@ UNIFIED_SOURCES += [
'skia/src/utils/SkEventTracer.cpp',
'skia/src/utils/SkFloatToDecimal.cpp',
'skia/src/utils/SkMatrix22.cpp',
'skia/src/utils/SkMetaData.cpp',
'skia/src/utils/SkOSPath.cpp',
'skia/src/utils/SkPatchUtils.cpp',
'skia/src/utils/SkPolyUtils.cpp',
'skia/src/utils/SkShadowTessellator.cpp',
'skia/src/utils/SkShadowUtils.cpp',
'skia/src/utils/SkTextUtils.cpp',
'skia/src/utils/SkThreadUtils_pthread.cpp',
'skia/src/utils/SkThreadUtils_win.cpp',
'skia/src/utils/SkUTF.cpp',
@ -274,7 +275,7 @@ UNIFIED_SOURCES += [
SOURCES += [
'skia/src/core/SkBitmapProcState.cpp',
'skia/src/core/SkBitmapProcState_matrixProcs.cpp',
'skia/src/core/SkBlitMask_D32.cpp',
'skia/src/core/SkBitmapScaler.cpp',
'skia/src/core/SkBlitRow_D32.cpp',
'skia/src/core/SkBlitter.cpp',
'skia/src/core/SkBlitter_A8.cpp',
@ -300,7 +301,6 @@ SOURCES += [
'skia/src/core/SkVertices.cpp',
'skia/src/core/SkXfermode.cpp',
'skia/src/core/SkXfermodeInterpretation.cpp',
'skia/src/jumper/SkJumper.cpp',
'skia/src/pathops/SkPathOpsDebug.cpp',
'skia/src/utils/SkParse.cpp',
'skia/src/utils/SkParsePath.cpp',
@ -308,7 +308,7 @@ SOURCES += [
]
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/SkBlitMask_D32.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/SkBlitter.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkBlitter_A8.cpp'].flags += skia_opt_flags
@ -319,7 +319,6 @@ SOURCES['skia/src/core/SkMatrix.cpp'].flags += skia_opt_flags
SOURCES['skia/src/core/SkOpts.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/src/jumper/SkJumper.cpp'].flags += skia_opt_flags
SOURCES['skia/third_party/skcms/skcms.cc'].flags += skia_opt_flags
if CONFIG['MOZ_ENABLE_SKIA_PDF']:
UNIFIED_SOURCES += [
@ -328,7 +327,6 @@ if CONFIG['MOZ_ENABLE_SKIA_PDF']:
'skia/src/pdf/SkJpegInfo.cpp',
'skia/src/pdf/SkKeyedImage.cpp',
'skia/src/pdf/SkPDFBitmap.cpp',
'skia/src/pdf/SkPDFCanon.cpp',
'skia/src/pdf/SkPDFConvertType1FontStream.cpp',
'skia/src/pdf/SkPDFDevice.cpp',
'skia/src/pdf/SkPDFDocument.cpp',
@ -340,6 +338,7 @@ if CONFIG['MOZ_ENABLE_SKIA_PDF']:
'skia/src/pdf/SkPDFMetadata.cpp',
'skia/src/pdf/SkPDFResourceDict.cpp',
'skia/src/pdf/SkPDFShader.cpp',
'skia/src/pdf/SkPDFSubsetFont.cpp',
'skia/src/pdf/SkPDFTag.cpp',
'skia/src/pdf/SkPDFTypes.cpp',
'skia/src/pdf/SkPDFUtils.cpp',
@ -392,69 +391,23 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
'skia/src/ports/SkTypeface_win_dw.cpp',
]
if CONFIG['INTEL_ARCHITECTURE']:
UNIFIED_SOURCES += [
'skia/src/opts/opts_check_x86.cpp',
]
SOURCES += [
'skia/src/opts/SkBitmapProcState_opts_SSE2.cpp',
'skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp',
'skia/src/opts/SkBlitRow_opts_SSE2.cpp',
'skia/src/opts/SkOpts_avx.cpp',
'skia/src/opts/SkOpts_hsw.cpp',
'skia/src/opts/SkOpts_sse41.cpp',
'skia/src/opts/SkOpts_sse42.cpp',
'skia/src/opts/SkOpts_ssse3.cpp',
]
SOURCES['skia/src/opts/SkBitmapProcState_opts_SSE2.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBlitRow_opts_SSE2.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_sse41.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
elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['CC_TYPE'] in ('clang', 'gcc'):
SOURCES += [
'skia/src/opts/SkBitmapProcState_arm_neon.cpp',
'skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp',
'skia/src/opts/SkBitmapProcState_opts_none.cpp',
'skia/src/opts/SkBlitMask_opts_arm.cpp',
'skia/src/opts/SkBlitMask_opts_arm_neon.cpp',
'skia/src/opts/SkBlitRow_opts_arm.cpp',
'skia/src/opts/SkBlitRow_opts_arm_neon.cpp',
]
SOURCES['skia/src/opts/SkBitmapProcState_arm_neon.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBitmapProcState_opts_none.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBlitMask_opts_arm.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBlitMask_opts_arm_neon.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBlitRow_opts_arm.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBlitRow_opts_arm_neon.cpp'].flags += skia_opt_flags
elif CONFIG['CPU_ARCH'] == 'aarch64':
SOURCES += [
'skia/src/opts/SkBitmapProcState_arm_neon.cpp',
'skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp',
'skia/src/opts/SkBitmapProcState_opts_none.cpp',
'skia/src/opts/SkBlitMask_opts_arm.cpp',
'skia/src/opts/SkBlitMask_opts_arm_neon.cpp',
'skia/src/opts/SkBlitRow_opts_arm.cpp',
'skia/src/opts/SkBlitRow_opts_arm_neon.cpp',
'skia/src/opts/SkOpts_crc32.cpp',
]
SOURCES['skia/src/opts/SkBitmapProcState_arm_neon.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBitmapProcState_opts_none.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBlitMask_opts_arm.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBlitMask_opts_arm_neon.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBlitRow_opts_arm.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkBlitRow_opts_arm_neon.cpp'].flags += skia_opt_flags
SOURCES['skia/src/opts/SkOpts_crc32.cpp'].flags += skia_opt_flags
else:
SOURCES += [
'skia/src/opts/SkBitmapProcState_opts_none.cpp',
'skia/src/opts/SkBlitMask_opts_none.cpp',
'skia/src/opts/SkBlitRow_opts_none.cpp',
]
# We allow warnings for third-party code that can be updated from upstream.
@ -500,9 +453,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
# We should autogenerate these SSE related flags.
if CONFIG['INTEL_ARCHITECTURE']:
SOURCES['skia/src/opts/SkBitmapProcState_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
SOURCES['skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp'].flags += ['-mssse3']
SOURCES['skia/src/opts/SkBlitRow_opts_SSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
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']