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',
|
2014-09-03 01:21:35 +04:00
|
|
|
'DrawTargetTiled.h',
|
2013-11-27 15:22:07 +04:00
|
|
|
'Filters.h',
|
2013-11-12 03:53:29 +04:00
|
|
|
'Helpers.h',
|
2015-05-20 19:48:31 +03:00
|
|
|
'HelpersCairo.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',
|
|
|
|
'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',
|
2015-11-25 07:15:29 +03:00
|
|
|
'SourceSurfaceRawData.h',
|
2015-08-14 00:01:10 +03:00
|
|
|
'StackArray.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',
|
|
|
|
]
|
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
|
|
|
'PathCG.cpp',
|
|
|
|
'ScaledFontMac.cpp',
|
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
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',
|
|
|
|
]
|
|
|
|
|
2016-07-20 22:07:11 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
|
|
|
|
SOURCES += [
|
|
|
|
'ScaledFontFontconfig.cpp',
|
|
|
|
]
|
|
|
|
|
2013-04-24 01:54:15 +04:00
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
2013-11-19 01:45:14 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-10-24 03:05:43 +04:00
|
|
|
'convolver.cpp',
|
2013-11-19 01:45:14 +04:00
|
|
|
]
|
2016-01-08 11:32:01 +03:00
|
|
|
SOURCES += [
|
2016-01-08 11:43:58 +03:00
|
|
|
'DrawTargetSkia.cpp',
|
2016-01-08 11:32:01 +03:00
|
|
|
'image_operations.cpp', # Uses _USE_MATH_DEFINES
|
2016-01-08 11:43:58 +03:00
|
|
|
'PathSkia.cpp',
|
|
|
|
'SourceSurfaceSkia.cpp',
|
2016-01-08 11:32:01 +03:00
|
|
|
]
|
2016-01-08 11:43:58 +03:00
|
|
|
if CONFIG['CLANG_CXX']:
|
|
|
|
# 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 += [
|
|
|
|
'HelpersSkia.h',
|
2015-08-08 05:27:14 +03:00
|
|
|
'RefPtrSkia.h',
|
2014-07-28 22:48:29 +04:00
|
|
|
]
|
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',
|
2014-12-16 20:53:13 +03:00
|
|
|
]
|
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2014-12-16 20:53:13 +03:00
|
|
|
'convolverSSE2.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
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']
|
2016-05-28 17:12:12 +03:00
|
|
|
SOURCES['ssse3-scaler.c'].flags += CONFIG['SSSE3_FLAGS']
|
2014-12-16 20:53:13 +03:00
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
|
|
|
SOURCES['convolverSSE2.cpp'].flags += CONFIG['SSE2_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',
|
|
|
|
]
|
2015-04-22 02:07:00 +03:00
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
|
|
|
SOURCES += [
|
|
|
|
'convolverLS3.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',
|
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',
|
|
|
|
'DrawTargetRecording.cpp',
|
2015-02-24 00:20:35 +03:00
|
|
|
'DrawTargetTiled.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',
|
2013-06-05 21:48:59 +04:00
|
|
|
'ScaledFontCairo.cpp',
|
2016-01-05 13:08:56 +03:00
|
|
|
'SFNTData.cpp',
|
|
|
|
'SFNTNameTable.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'SourceSurfaceCairo.cpp',
|
|
|
|
'SourceSurfaceRawData.cpp',
|
|
|
|
]
|
|
|
|
|
2016-01-08 11:43:58 +03:00
|
|
|
SOURCES += [
|
|
|
|
'Factory.cpp', # Need to suppress warnings in Skia header files.
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['CLANG_CXX']:
|
|
|
|
SOURCES['Factory.cpp'].flags += ['-Wno-implicit-fallthrough']
|
|
|
|
|
2016-05-11 10:00:01 +03:00
|
|
|
if CONFIG['GNU_CXX']:
|
|
|
|
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
|
|
|
|
2015-01-19 00:08:00 +03:00
|
|
|
if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']:
|
|
|
|
SOURCES += ['BlurNEON.cpp']
|
2016-09-14 12:34:19 +03:00
|
|
|
SOURCES['BlurNEON.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
|
|
|
|
|
2016-07-13 03:27:57 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk'):
|
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']
|
|
|
|
|
2016-07-13 03:27:57 +03:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk'):
|
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']
|