2013-04-01 11:36:59 -07:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 12:47:21 -08: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-16 19:05:14 -07:00
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'GenericRefCounted.h',
|
|
|
|
]
|
|
|
|
|
2013-04-16 12:24:43 -07:00
|
|
|
EXPORTS.mozilla.gfx += [
|
|
|
|
'2D.h',
|
2014-08-19 10:08:16 -07:00
|
|
|
'BaseCoord.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'BaseMargin.h',
|
|
|
|
'BasePoint.h',
|
|
|
|
'BasePoint3D.h',
|
|
|
|
'BasePoint4D.h',
|
|
|
|
'BaseRect.h',
|
|
|
|
'BaseSize.h',
|
|
|
|
'Blur.h',
|
2013-09-22 20:28:16 -07:00
|
|
|
'BorrowedContext.h',
|
2014-08-19 10:08:16 -07:00
|
|
|
'Coord.h',
|
2013-11-03 08:28:30 -08:00
|
|
|
'DataSurfaceHelpers.h',
|
2014-09-02 14:21:35 -07:00
|
|
|
'DrawTargetTiled.h',
|
2013-11-27 03:22:07 -08:00
|
|
|
'Filters.h',
|
2013-11-11 15:53:29 -08:00
|
|
|
'Helpers.h',
|
2015-05-20 09:48:31 -07:00
|
|
|
'HelpersCairo.h',
|
2014-02-18 18:59:34 -08:00
|
|
|
'Logging.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'Matrix.h',
|
2015-04-09 12:49:25 -07:00
|
|
|
'NumericTools.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'PathHelpers.h',
|
2014-09-29 06:12:06 -07:00
|
|
|
'PatternHelpers.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'Point.h',
|
2015-04-01 13:02:20 -07:00
|
|
|
'Quaternion.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'Rect.h',
|
|
|
|
'Scale.h',
|
2013-06-14 13:11:31 -07:00
|
|
|
'ScaleFactor.h',
|
2015-03-06 10:53:47 -08:00
|
|
|
'ScaleFactors2D.h',
|
2014-06-17 02:08:23 -07:00
|
|
|
'SourceSurfaceCairo.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'Tools.h',
|
|
|
|
'Types.h',
|
|
|
|
'UserData.h',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
|
|
EXPORTS.mozilla.gfx += [
|
|
|
|
'MacIOSurface.h',
|
2013-05-08 11:31:52 -07:00
|
|
|
'QuartzSupport.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
]
|
2013-11-18 13:45:14 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'DrawTargetCG.cpp',
|
|
|
|
'PathCG.cpp',
|
|
|
|
'ScaledFontMac.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'SourceSurfaceCG.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'DrawTargetD2D.cpp',
|
2015-01-07 08:32:07 -08:00
|
|
|
'DrawTargetD2D1.cpp',
|
2015-02-09 11:04:11 -08:00
|
|
|
'ExtendInputEffectD2D1.cpp',
|
2015-01-07 08:32:07 -08:00
|
|
|
'FilterNodeD2D1.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'PathD2D.cpp',
|
2015-01-07 08:32:07 -08:00
|
|
|
'RadialGradientEffectD2D1.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'ScaledFontDWrite.cpp',
|
2014-05-03 01:13:00 -07:00
|
|
|
'ScaledFontWin.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'SourceSurfaceD2D.cpp',
|
2015-01-07 08:32:07 -08:00
|
|
|
'SourceSurfaceD2D1.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'SourceSurfaceD2DTarget.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
2013-11-27 05:55:07 -08:00
|
|
|
DEFINES['WIN32'] = True
|
2013-04-23 14:54:15 -07:00
|
|
|
|
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
2013-11-18 13:45:14 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-10-23 16:05:43 -07:00
|
|
|
'convolver.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'DrawTargetSkia.cpp',
|
|
|
|
'PathSkia.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'SourceSurfaceSkia.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
2013-11-18 13:45:14 -08:00
|
|
|
SOURCES += [
|
|
|
|
'image_operations.cpp', # Uses _USE_MATH_DEFINES
|
|
|
|
]
|
2014-07-28 11:48:29 -07:00
|
|
|
EXPORTS.mozilla.gfx += [
|
|
|
|
'HelpersSkia.h',
|
|
|
|
]
|
2013-04-23 14:54:15 -07:00
|
|
|
|
|
|
|
# Are we targeting x86 or x64? If so, build SSE2 files.
|
|
|
|
if CONFIG['INTEL_ARCHITECTURE']:
|
2014-12-16 09:53:13 -08:00
|
|
|
SOURCES += [
|
|
|
|
'BlurSSE2.cpp',
|
|
|
|
'FilterProcessingSSE2.cpp',
|
|
|
|
'ImageScalingSSE2.cpp',
|
|
|
|
]
|
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2014-12-16 09:53:13 -08:00
|
|
|
'convolverSSE2.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
2014-12-16 09:53:13 -08: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']
|
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
|
|
|
SOURCES['convolverSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
|
2015-04-21 16:07:00 -07:00
|
|
|
elif CONFIG['CPU_ARCH'].startswith('mips'):
|
2015-04-21 16:08:00 -07:00
|
|
|
SOURCES += [
|
|
|
|
'BlurLS3.cpp',
|
|
|
|
]
|
2015-04-21 16:07:00 -07:00
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
|
|
|
SOURCES += [
|
|
|
|
'convolverLS3.cpp',
|
|
|
|
]
|
2013-04-23 14:54:15 -07:00
|
|
|
|
2013-11-18 13:45:14 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'Blur.cpp',
|
2013-11-27 03:21:21 -08:00
|
|
|
'DataSourceSurface.cpp',
|
2014-03-07 05:24:42 -08:00
|
|
|
'DataSurfaceHelpers.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'DrawEventRecorder.cpp',
|
2014-08-01 09:01:47 -07:00
|
|
|
'DrawTarget.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'DrawTargetCairo.cpp',
|
2014-08-01 09:01:47 -07:00
|
|
|
'DrawTargetCapture.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'DrawTargetDual.cpp',
|
|
|
|
'DrawTargetRecording.cpp',
|
2015-02-23 13:20:35 -08:00
|
|
|
'DrawTargetTiled.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'Factory.cpp',
|
2013-11-27 03:22:46 -08:00
|
|
|
'FilterNodeSoftware.cpp',
|
2013-11-27 03:22:27 -08:00
|
|
|
'FilterProcessing.cpp',
|
|
|
|
'FilterProcessingScalar.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'ImageScaling.cpp',
|
|
|
|
'Matrix.cpp',
|
2013-11-10 15:42:07 -08:00
|
|
|
'Path.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'PathCairo.cpp',
|
|
|
|
'PathRecording.cpp',
|
2015-04-01 13:02:20 -07:00
|
|
|
'Quaternion.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'RecordedEvent.cpp',
|
|
|
|
'Scale.cpp',
|
|
|
|
'ScaledFontBase.cpp',
|
2013-06-05 10:48:59 -07:00
|
|
|
'ScaledFontCairo.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'SourceSurfaceCairo.cpp',
|
|
|
|
'SourceSurfaceRawData.cpp',
|
|
|
|
]
|
|
|
|
|
2014-09-02 14:20:33 -07:00
|
|
|
SOURCES += [
|
2015-02-23 13:20:35 -08:00
|
|
|
'PathHelpers.cpp', # Uses _USE_MATH_DEFINES
|
2014-09-02 14:20:33 -07:00
|
|
|
]
|
|
|
|
|
2013-07-01 09:32:40 -07:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-11-07 19:53:54 -08:00
|
|
|
'MacIOSurface.cpp',
|
2013-07-01 09:32:40 -07:00
|
|
|
'QuartzSupport.mm',
|
|
|
|
]
|
2013-08-21 23:56:00 -07:00
|
|
|
|
2015-01-18 13:08:00 -08:00
|
|
|
if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']:
|
|
|
|
SOURCES += ['BlurNEON.cpp']
|
|
|
|
SOURCES['BlurNEON.cpp'].flags += ['-mfpu=neon']
|
|
|
|
|
2013-10-31 19:39:03 -07:00
|
|
|
FAIL_ON_WARNINGS = True
|
|
|
|
|
2013-10-02 10:17:55 -07:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2014-02-25 12:42:23 -08:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2013-11-27 05:55:07 -08:00
|
|
|
|
2014-03-03 11:38:33 -08:00
|
|
|
for var in ('USE_CAIRO', 'MOZ2D_HAS_MOZ_CAIRO'):
|
2013-11-27 05:55:07 -08:00
|
|
|
DEFINES[var] = True
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'):
|
|
|
|
DEFINES['MOZ_ENABLE_FREETYPE'] = True
|
|
|
|
|
|
|
|
if CONFIG['MOZ_DEBUG']:
|
|
|
|
DEFINES['GFX_LOG_DEBUG'] = True
|
|
|
|
DEFINES['GFX_LOG_WARNING'] = True
|
2014-07-24 08:55:33 -07:00
|
|
|
|
2014-10-24 10:54:23 -07:00
|
|
|
# Define the GFX_LOG_WARNING in release builds (available, but controlled by a
|
|
|
|
# preference), though we may want to consider only doing it in the nightly
|
|
|
|
# build, if the size of gfxWarning() code ends up making a difference.
|
|
|
|
# See bug 1074952.
|
|
|
|
# if CONFIG['NIGHTLY_BUILD']:
|
|
|
|
DEFINES['GFX_LOG_WARNING'] = True
|
|
|
|
|
2014-07-24 08:55:33 -07:00
|
|
|
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'):
|
|
|
|
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
|
2015-02-23 09:46:55 -08:00
|
|
|
|
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
# Due to bug 796023, we can't have -DUNICODE and -D_UNICODE; defining those
|
|
|
|
# macros changes the type of LOGFONT to LOGFONTW instead of LOGFONTA. This
|
|
|
|
# changes the symbol names of exported C++ functions that use LOGFONT.
|
|
|
|
del DEFINES['UNICODE']
|
|
|
|
del DEFINES['_UNICODE']
|