2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:21 +04:00
|
|
|
# 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/.
|
|
|
|
|
2013-06-17 06:05:14 +04:00
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'GenericRefCounted.h',
|
|
|
|
]
|
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS.mozilla.gfx += [
|
|
|
|
'2D.h',
|
2014-08-19 21:08:16 +04:00
|
|
|
'BaseCoord.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'BaseMargin.h',
|
|
|
|
'BasePoint.h',
|
|
|
|
'BasePoint3D.h',
|
|
|
|
'BasePoint4D.h',
|
|
|
|
'BaseRect.h',
|
|
|
|
'BaseSize.h',
|
2015-08-06 05:42:09 +03:00
|
|
|
'BezierUtils.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'Blur.h',
|
2013-09-23 07:28:16 +04:00
|
|
|
'BorrowedContext.h',
|
2014-08-19 21:08:16 +04:00
|
|
|
'Coord.h',
|
2015-09-28 14:49:54 +03:00
|
|
|
'CriticalSection.h',
|
2013-11-03 20:28:30 +04:00
|
|
|
'DataSurfaceHelpers.h',
|
2016-01-05 13:08:57 +03:00
|
|
|
'DrawEventRecorder.h',
|
2018-08-03 17:48:37 +03:00
|
|
|
'DrawTargetOffset.h',
|
2017-04-26 23:31:59 +03:00
|
|
|
'DrawTargetRecording.h',
|
2014-09-03 01:21:35 +04:00
|
|
|
'DrawTargetTiled.h',
|
2017-06-12 23:52:29 +03:00
|
|
|
'DrawTargetWrapAndRecord.h',
|
2013-11-27 15:22:07 +04:00
|
|
|
'Filters.h',
|
2017-04-14 21:11:02 +03:00
|
|
|
'FontVariation.h',
|
2013-11-12 03:53:29 +04:00
|
|
|
'Helpers.h',
|
2015-05-20 19:48:31 +03:00
|
|
|
'HelpersCairo.h',
|
2017-04-26 23:31:59 +03:00
|
|
|
'InlineTranslator.h',
|
2015-09-28 14:49:33 +03:00
|
|
|
'IterableArena.h',
|
2015-09-28 14:49:43 +03:00
|
|
|
'JobScheduler.h',
|
|
|
|
'JobScheduler_posix.h',
|
|
|
|
'JobScheduler_win32.h',
|
2014-02-19 06:59:34 +04:00
|
|
|
'Logging.h',
|
2016-06-27 09:33:18 +03:00
|
|
|
'LoggingConstants.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'Matrix.h',
|
2015-12-03 02:52:00 +03:00
|
|
|
'MatrixFwd.h',
|
2015-04-09 22:49:25 +03:00
|
|
|
'NumericTools.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'PathHelpers.h',
|
2014-09-29 17:12:06 +04:00
|
|
|
'PatternHelpers.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'Point.h',
|
2016-08-09 21:24:18 +03:00
|
|
|
'Polygon.h',
|
2015-04-01 23:02:20 +03:00
|
|
|
'Quaternion.h',
|
2016-01-05 13:08:57 +03:00
|
|
|
'RecordedEvent.h',
|
2016-01-05 13:08:57 +03:00
|
|
|
'RecordingTypes.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'Rect.h',
|
2018-03-06 00:35:35 +03:00
|
|
|
'RectAbsolute.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'Scale.h',
|
2013-06-15 00:11:31 +04:00
|
|
|
'ScaleFactor.h',
|
2015-03-06 21:53:47 +03:00
|
|
|
'ScaleFactors2D.h',
|
2014-06-17 13:08:23 +04:00
|
|
|
'SourceSurfaceCairo.h',
|
2017-10-31 22:02:31 +03:00
|
|
|
'SourceSurfaceCapture.h',
|
2015-11-25 07:15:29 +03:00
|
|
|
'SourceSurfaceRawData.h',
|
2015-08-14 00:01:10 +03:00
|
|
|
'StackArray.h',
|
2017-02-12 17:26:34 +03:00
|
|
|
'Swizzle.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'Tools.h',
|
2016-10-04 02:35:52 +03:00
|
|
|
'Triangle.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'Types.h',
|
|
|
|
'UserData.h',
|
|
|
|
]
|
|
|
|
|
2016-05-28 17:12:12 +03:00
|
|
|
EXPORTS.mozilla.gfx += ['ssse3-scaler.h']
|
|
|
|
|
2015-06-12 15:48:42 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'):
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS.mozilla.gfx += [
|
|
|
|
'MacIOSurface.h',
|
2017-04-07 00:41:02 +03:00
|
|
|
'UnscaledFontMac.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
2013-11-19 01:45:14 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2016-09-16 00:13:57 +03:00
|
|
|
'NativeFontResourceMac.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'ScaledFontMac.cpp',
|
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
2017-04-07 00:41:02 +03:00
|
|
|
EXPORTS.mozilla.gfx += [
|
2018-02-27 00:21:01 +03:00
|
|
|
'dw-extra.h',
|
2017-04-07 00:41:02 +03:00
|
|
|
'UnscaledFontDWrite.h',
|
|
|
|
'UnscaledFontGDI.h',
|
|
|
|
]
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2015-01-07 19:32:07 +03:00
|
|
|
'DrawTargetD2D1.cpp',
|
2015-02-09 22:04:11 +03:00
|
|
|
'ExtendInputEffectD2D1.cpp',
|
2015-01-07 19:32:07 +03:00
|
|
|
'FilterNodeD2D1.cpp',
|
2015-09-28 14:49:52 +03:00
|
|
|
'JobScheduler_win32.cpp',
|
2016-01-05 13:08:58 +03:00
|
|
|
'NativeFontResourceDWrite.cpp',
|
|
|
|
'NativeFontResourceGDI.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'PathD2D.cpp',
|
2015-01-07 19:32:07 +03:00
|
|
|
'RadialGradientEffectD2D1.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'ScaledFontDWrite.cpp',
|
2014-05-03 12:13:00 +04:00
|
|
|
'ScaledFontWin.cpp',
|
2015-01-07 19:32:07 +03:00
|
|
|
'SourceSurfaceD2D1.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
2013-11-27 17:55:07 +04:00
|
|
|
DEFINES['WIN32'] = True
|
2013-04-24 01:54:15 +04:00
|
|
|
|
2015-09-28 14:49:43 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'windows':
|
|
|
|
SOURCES += [
|
|
|
|
'JobScheduler_posix.cpp',
|
|
|
|
]
|
|
|
|
|
2018-01-10 12:04:59 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk3'):
|
2017-04-07 00:41:02 +03:00
|
|
|
EXPORTS.mozilla.gfx += [
|
|
|
|
'UnscaledFontFreeType.h',
|
|
|
|
]
|
2017-04-14 21:11:00 +03:00
|
|
|
SOURCES += [
|
2018-06-15 02:42:56 +03:00
|
|
|
'NativeFontResourceFreeType.cpp',
|
2017-04-14 21:11:00 +03:00
|
|
|
'UnscaledFontFreeType.cpp',
|
|
|
|
]
|
2017-04-07 00:41:02 +03:00
|
|
|
|
2018-01-10 12:04:59 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
|
2016-07-20 22:07:11 +03:00
|
|
|
SOURCES += [
|
|
|
|
'ScaledFontFontconfig.cpp',
|
|
|
|
]
|
|
|
|
|
2018-06-15 02:42:56 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
|
|
|
SOURCES += [
|
|
|
|
'ScaledFontFreeType.cpp',
|
|
|
|
]
|
|
|
|
|
2013-04-24 01:54:15 +04:00
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
2016-01-08 11:32:01 +03:00
|
|
|
SOURCES += [
|
2017-06-22 20:57:17 +03:00
|
|
|
'ConvolutionFilter.cpp',
|
2016-01-08 11:43:58 +03:00
|
|
|
'DrawTargetSkia.cpp',
|
|
|
|
'PathSkia.cpp',
|
|
|
|
'SourceSurfaceSkia.cpp',
|
2016-01-08 11:32:01 +03:00
|
|
|
]
|
2017-12-08 00:09:38 +03:00
|
|
|
if CONFIG['CC_TYPE'] == 'clang':
|
2016-01-08 11:43:58 +03:00
|
|
|
# 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']
|
2014-07-28 22:48:29 +04:00
|
|
|
EXPORTS.mozilla.gfx += [
|
2017-06-22 20:57:17 +03:00
|
|
|
'ConvolutionFilter.h',
|
2014-07-28 22:48:29 +04:00
|
|
|
'HelpersSkia.h',
|
|
|
|
]
|
2013-04-24 01:54:15 +04:00
|
|
|
|
|
|
|
# Are we targeting x86 or x64? If so, build SSE2 files.
|
|
|
|
if CONFIG['INTEL_ARCHITECTURE']:
|
2014-12-16 20:53:13 +03:00
|
|
|
SOURCES += [
|
|
|
|
'BlurSSE2.cpp',
|
|
|
|
'FilterProcessingSSE2.cpp',
|
|
|
|
'ImageScalingSSE2.cpp',
|
2016-05-28 17:12:12 +03:00
|
|
|
'ssse3-scaler.c',
|
2017-02-12 17:27:04 +03:00
|
|
|
'SwizzleSSE2.cpp',
|
2014-12-16 20:53:13 +03:00
|
|
|
]
|
|
|
|
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']
|
2017-02-12 17:27:04 +03:00
|
|
|
SOURCES['SwizzleSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
|
2016-05-28 17:12:12 +03:00
|
|
|
SOURCES['ssse3-scaler.c'].flags += CONFIG['SSSE3_FLAGS']
|
2015-04-22 02:07:00 +03:00
|
|
|
elif CONFIG['CPU_ARCH'].startswith('mips'):
|
2015-04-22 02:08:00 +03:00
|
|
|
SOURCES += [
|
|
|
|
'BlurLS3.cpp',
|
|
|
|
]
|
2013-04-24 01:54:15 +04:00
|
|
|
|
2013-11-19 01:45:14 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2015-08-06 05:42:09 +03:00
|
|
|
'BezierUtils.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'Blur.cpp',
|
2018-08-01 20:44:33 +03:00
|
|
|
'BufferEdgePad.cpp',
|
2018-08-01 20:50:32 +03:00
|
|
|
'BufferUnrotate.cpp',
|
2017-10-31 22:02:30 +03:00
|
|
|
'CaptureCommandList.cpp',
|
2013-11-27 15:21:21 +04:00
|
|
|
'DataSourceSurface.cpp',
|
2014-03-07 17:24:42 +04:00
|
|
|
'DataSurfaceHelpers.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'DrawEventRecorder.cpp',
|
2015-09-28 14:49:45 +03:00
|
|
|
'DrawingJob.cpp',
|
2014-08-01 20:01:47 +04:00
|
|
|
'DrawTarget.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'DrawTargetCairo.cpp',
|
2014-08-01 20:01:47 +04:00
|
|
|
'DrawTargetCapture.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'DrawTargetDual.cpp',
|
2018-08-03 17:48:37 +03:00
|
|
|
'DrawTargetOffset.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'DrawTargetRecording.cpp',
|
2015-02-24 00:20:35 +03:00
|
|
|
'DrawTargetTiled.cpp',
|
2017-06-12 23:52:29 +03:00
|
|
|
'DrawTargetWrapAndRecord.cpp',
|
2017-12-07 05:21:49 +03:00
|
|
|
'FilterNodeCapture.cpp',
|
2013-11-27 15:22:46 +04:00
|
|
|
'FilterNodeSoftware.cpp',
|
2013-11-27 15:22:27 +04:00
|
|
|
'FilterProcessing.cpp',
|
|
|
|
'FilterProcessingScalar.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'ImageScaling.cpp',
|
2015-09-28 14:49:43 +03:00
|
|
|
'JobScheduler.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'Matrix.cpp',
|
2013-11-11 03:42:07 +04:00
|
|
|
'Path.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'PathCairo.cpp',
|
2015-11-28 07:49:55 +03:00
|
|
|
'PathHelpers.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'PathRecording.cpp',
|
2015-04-01 23:02:20 +03:00
|
|
|
'Quaternion.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'RecordedEvent.cpp',
|
|
|
|
'Scale.cpp',
|
|
|
|
'ScaledFontBase.cpp',
|
2016-01-05 13:08:56 +03:00
|
|
|
'SFNTData.cpp',
|
|
|
|
'SFNTNameTable.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'SourceSurfaceCairo.cpp',
|
2017-10-31 22:02:31 +03:00
|
|
|
'SourceSurfaceCapture.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'SourceSurfaceRawData.cpp',
|
2017-02-12 17:26:34 +03:00
|
|
|
'Swizzle.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
|
|
|
|
2016-01-08 11:43:58 +03:00
|
|
|
SOURCES += [
|
|
|
|
'Factory.cpp', # Need to suppress warnings in Skia header files.
|
2017-04-26 23:31:59 +03:00
|
|
|
'InlineTranslator.cpp',
|
2016-01-08 11:43:58 +03:00
|
|
|
]
|
|
|
|
|
2017-12-08 00:09:38 +03:00
|
|
|
if CONFIG['CC_TYPE'] == 'clang':
|
2016-01-08 11:43:58 +03:00
|
|
|
SOURCES['Factory.cpp'].flags += ['-Wno-implicit-fallthrough']
|
|
|
|
|
2017-12-08 00:09:15 +03:00
|
|
|
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
2016-05-11 10:00:01 +03:00
|
|
|
CXXFLAGS += ['-Wno-error=shadow']
|
|
|
|
|
2013-07-01 20:32:40 +04:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
2015-06-12 15:48:42 +03:00
|
|
|
EXPORTS.mozilla.gfx += [
|
|
|
|
'QuartzSupport.h',
|
|
|
|
]
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-11-08 07:53:54 +04:00
|
|
|
'MacIOSurface.cpp',
|
2013-07-01 20:32:40 +04:00
|
|
|
'QuartzSupport.mm',
|
|
|
|
]
|
2013-08-22 10:56:00 +04:00
|
|
|
|
2018-12-26 19:27:08 +03:00
|
|
|
if CONFIG['CC_TYPE'] in ('clang', 'gcc') and (CONFIG['CPU_ARCH'] == 'aarch64' or CONFIG['BUILD_ARM_NEON']):
|
|
|
|
# MSVC cannot use arm_neon.h.
|
2017-02-12 17:27:25 +03:00
|
|
|
SOURCES += [
|
|
|
|
'BlurNEON.cpp',
|
2017-06-09 17:57:44 +03:00
|
|
|
'LuminanceNEON.cpp',
|
2017-02-12 17:27:25 +03:00
|
|
|
'SwizzleNEON.cpp',
|
|
|
|
]
|
2018-12-26 19:27:08 +03:00
|
|
|
DEFINES['USE_NEON'] = True
|
2016-09-14 12:34:19 +03:00
|
|
|
SOURCES['BlurNEON.cpp'].flags += CONFIG['NEON_FLAGS']
|
2017-06-09 17:57:44 +03:00
|
|
|
SOURCES['LuminanceNEON.cpp'].flags += CONFIG['NEON_FLAGS']
|
2017-02-12 17:27:25 +03:00
|
|
|
SOURCES['SwizzleNEON.cpp'].flags += CONFIG['NEON_FLAGS']
|
2015-01-19 00:08:00 +03:00
|
|
|
|
2013-10-02 21:17:55 +04:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2014-02-26 00:42:23 +04:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2013-11-27 17:55:07 +04:00
|
|
|
|
2014-03-03 23:38:33 +04:00
|
|
|
for var in ('USE_CAIRO', 'MOZ2D_HAS_MOZ_CAIRO'):
|
2013-11-27 17:55:07 +04:00
|
|
|
DEFINES[var] = True
|
|
|
|
|
2018-01-10 12:04:59 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk3'):
|
2013-11-27 17:55:07 +04:00
|
|
|
DEFINES['MOZ_ENABLE_FREETYPE'] = True
|
|
|
|
|
2014-07-24 19:55:33 +04:00
|
|
|
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
|
|
|
|
|
2018-01-10 12:04:59 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk3'):
|
2014-07-24 19:55:33 +04:00
|
|
|
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
|
2015-02-23 20:46:55 +03:00
|
|
|
|
2015-07-30 19:05:22 +03:00
|
|
|
LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
|
2016-10-25 05:40:59 +03:00
|
|
|
|
|
|
|
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',
|
|
|
|
]
|
|
|
|
|
2018-07-31 16:10:07 +03:00
|
|
|
if CONFIG['CC_TYPE'] == 'clang-cl':
|
|
|
|
AllowCompilerWarnings() # workaround for bug 1090497
|