зеркало из https://github.com/mozilla/gecko-dev.git
254 строки
6.5 KiB
Python
254 строки
6.5 KiB
Python
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
|
# vim: set filetype=python:
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
EXPORTS.mozilla += [
|
|
'GenericRefCounted.h',
|
|
]
|
|
|
|
EXPORTS.mozilla.gfx += [
|
|
'2D.h',
|
|
'BaseCoord.h',
|
|
'BaseMargin.h',
|
|
'BasePoint.h',
|
|
'BasePoint3D.h',
|
|
'BasePoint4D.h',
|
|
'BaseRect.h',
|
|
'BaseSize.h',
|
|
'BezierUtils.h',
|
|
'Blur.h',
|
|
'BorrowedContext.h',
|
|
'Coord.h',
|
|
'CriticalSection.h',
|
|
'DataSurfaceHelpers.h',
|
|
'DrawEventRecorder.h',
|
|
'DrawTargetRecording.h',
|
|
'DrawTargetTiled.h',
|
|
'DrawTargetWrapAndRecord.h',
|
|
'Filters.h',
|
|
'FontVariation.h',
|
|
'Helpers.h',
|
|
'HelpersCairo.h',
|
|
'InlineTranslator.h',
|
|
'IterableArena.h',
|
|
'JobScheduler.h',
|
|
'JobScheduler_posix.h',
|
|
'JobScheduler_win32.h',
|
|
'Logging.h',
|
|
'LoggingConstants.h',
|
|
'Matrix.h',
|
|
'MatrixFwd.h',
|
|
'NumericTools.h',
|
|
'PathHelpers.h',
|
|
'PatternHelpers.h',
|
|
'Point.h',
|
|
'Polygon.h',
|
|
'Quaternion.h',
|
|
'RecordedEvent.h',
|
|
'RecordingTypes.h',
|
|
'Rect.h',
|
|
'RectAbsolute.h',
|
|
'Scale.h',
|
|
'ScaleFactor.h',
|
|
'ScaleFactors2D.h',
|
|
'SourceSurfaceCairo.h',
|
|
'SourceSurfaceCapture.h',
|
|
'SourceSurfaceRawData.h',
|
|
'StackArray.h',
|
|
'Swizzle.h',
|
|
'Tools.h',
|
|
'Triangle.h',
|
|
'Types.h',
|
|
'UserData.h',
|
|
]
|
|
|
|
EXPORTS.mozilla.gfx += ['ssse3-scaler.h']
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'):
|
|
EXPORTS.mozilla.gfx += [
|
|
'MacIOSurface.h',
|
|
'UnscaledFontMac.h',
|
|
]
|
|
UNIFIED_SOURCES += [
|
|
'NativeFontResourceMac.cpp',
|
|
'ScaledFontMac.cpp',
|
|
]
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
|
EXPORTS.mozilla.gfx += [
|
|
'dw-extra.h',
|
|
'UnscaledFontDWrite.h',
|
|
'UnscaledFontGDI.h',
|
|
]
|
|
SOURCES += [
|
|
'DrawTargetD2D1.cpp',
|
|
'ExtendInputEffectD2D1.cpp',
|
|
'FilterNodeD2D1.cpp',
|
|
'JobScheduler_win32.cpp',
|
|
'NativeFontResourceDWrite.cpp',
|
|
'NativeFontResourceGDI.cpp',
|
|
'PathD2D.cpp',
|
|
'RadialGradientEffectD2D1.cpp',
|
|
'ScaledFontDWrite.cpp',
|
|
'ScaledFontWin.cpp',
|
|
'SourceSurfaceD2D1.cpp',
|
|
]
|
|
DEFINES['WIN32'] = True
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'windows':
|
|
SOURCES += [
|
|
'JobScheduler_posix.cpp',
|
|
]
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk3'):
|
|
EXPORTS.mozilla.gfx += [
|
|
'UnscaledFontFreeType.h',
|
|
]
|
|
SOURCES += [
|
|
'UnscaledFontFreeType.cpp',
|
|
]
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
|
|
SOURCES += [
|
|
'NativeFontResourceFontconfig.cpp',
|
|
'ScaledFontFontconfig.cpp',
|
|
]
|
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
|
SOURCES += [
|
|
'ConvolutionFilter.cpp',
|
|
'DrawTargetSkia.cpp',
|
|
'PathSkia.cpp',
|
|
'SourceSurfaceSkia.cpp',
|
|
]
|
|
if CONFIG['CC_TYPE'] == 'clang':
|
|
# Suppress warnings from Skia header files.
|
|
SOURCES['DrawTargetSkia.cpp'].flags += ['-Wno-implicit-fallthrough']
|
|
SOURCES['PathSkia.cpp'].flags += ['-Wno-implicit-fallthrough']
|
|
SOURCES['SourceSurfaceSkia.cpp'].flags += ['-Wno-implicit-fallthrough']
|
|
EXPORTS.mozilla.gfx += [
|
|
'ConvolutionFilter.h',
|
|
'HelpersSkia.h',
|
|
]
|
|
|
|
# Are we targeting x86 or x64? If so, build SSE2 files.
|
|
if CONFIG['INTEL_ARCHITECTURE']:
|
|
SOURCES += [
|
|
'BlurSSE2.cpp',
|
|
'FilterProcessingSSE2.cpp',
|
|
'ImageScalingSSE2.cpp',
|
|
'ssse3-scaler.c',
|
|
'SwizzleSSE2.cpp',
|
|
]
|
|
DEFINES['USE_SSE2'] = True
|
|
# The file uses SSE2 intrinsics, so it needs special compile flags on some
|
|
# compilers.
|
|
SOURCES['BlurSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
|
|
SOURCES['FilterProcessingSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
|
|
SOURCES['ImageScalingSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
|
|
SOURCES['SwizzleSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
|
|
SOURCES['ssse3-scaler.c'].flags += CONFIG['SSSE3_FLAGS']
|
|
elif CONFIG['CPU_ARCH'].startswith('mips'):
|
|
SOURCES += [
|
|
'BlurLS3.cpp',
|
|
]
|
|
|
|
UNIFIED_SOURCES += [
|
|
'BezierUtils.cpp',
|
|
'Blur.cpp',
|
|
'CaptureCommandList.cpp',
|
|
'DataSourceSurface.cpp',
|
|
'DataSurfaceHelpers.cpp',
|
|
'DrawEventRecorder.cpp',
|
|
'DrawingJob.cpp',
|
|
'DrawTarget.cpp',
|
|
'DrawTargetCairo.cpp',
|
|
'DrawTargetCapture.cpp',
|
|
'DrawTargetDual.cpp',
|
|
'DrawTargetRecording.cpp',
|
|
'DrawTargetTiled.cpp',
|
|
'DrawTargetWrapAndRecord.cpp',
|
|
'FilterNodeCapture.cpp',
|
|
'FilterNodeSoftware.cpp',
|
|
'FilterProcessing.cpp',
|
|
'FilterProcessingScalar.cpp',
|
|
'ImageScaling.cpp',
|
|
'JobScheduler.cpp',
|
|
'Matrix.cpp',
|
|
'Path.cpp',
|
|
'PathCairo.cpp',
|
|
'PathHelpers.cpp',
|
|
'PathRecording.cpp',
|
|
'Quaternion.cpp',
|
|
'RecordedEvent.cpp',
|
|
'Scale.cpp',
|
|
'ScaledFontBase.cpp',
|
|
'ScaledFontCairo.cpp',
|
|
'SFNTData.cpp',
|
|
'SFNTNameTable.cpp',
|
|
'SourceSurfaceCairo.cpp',
|
|
'SourceSurfaceCapture.cpp',
|
|
'SourceSurfaceRawData.cpp',
|
|
'Swizzle.cpp',
|
|
]
|
|
|
|
SOURCES += [
|
|
'Factory.cpp', # Need to suppress warnings in Skia header files.
|
|
'InlineTranslator.cpp',
|
|
]
|
|
|
|
if CONFIG['CC_TYPE'] == 'clang':
|
|
SOURCES['Factory.cpp'].flags += ['-Wno-implicit-fallthrough']
|
|
|
|
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
|
CXXFLAGS += ['-Wno-error=shadow']
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
EXPORTS.mozilla.gfx += [
|
|
'QuartzSupport.h',
|
|
]
|
|
SOURCES += [
|
|
'MacIOSurface.cpp',
|
|
'QuartzSupport.mm',
|
|
]
|
|
|
|
if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']:
|
|
SOURCES += [
|
|
'BlurNEON.cpp',
|
|
'LuminanceNEON.cpp',
|
|
'SwizzleNEON.cpp',
|
|
]
|
|
SOURCES['BlurNEON.cpp'].flags += CONFIG['NEON_FLAGS']
|
|
SOURCES['LuminanceNEON.cpp'].flags += CONFIG['NEON_FLAGS']
|
|
SOURCES['SwizzleNEON.cpp'].flags += CONFIG['NEON_FLAGS']
|
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
FINAL_LIBRARY = 'xul'
|
|
|
|
for var in ('USE_CAIRO', 'MOZ2D_HAS_MOZ_CAIRO'):
|
|
DEFINES[var] = True
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk3'):
|
|
DEFINES['MOZ_ENABLE_FREETYPE'] = True
|
|
|
|
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk3'):
|
|
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
|
|
|
|
LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
|
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
|
LOCAL_INCLUDES += [
|
|
'/gfx/skia/skia/include/private',
|
|
'/gfx/skia/skia/src/core',
|
|
'/gfx/skia/skia/src/image',
|
|
]
|
|
if CONFIG['MOZ_ENABLE_SKIA_GPU']:
|
|
LOCAL_INCLUDES += [
|
|
'/gfx/skia/skia/src/gpu',
|
|
]
|
|
|