2013-04-01 22:36:59 +04:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; 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',
|
|
|
|
'Blur.h',
|
2013-09-23 07:28:16 +04:00
|
|
|
'BorrowedContext.h',
|
2014-08-19 21:08:16 +04:00
|
|
|
'Coord.h',
|
2013-11-03 20:28:30 +04:00
|
|
|
'DataSurfaceHelpers.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',
|
2014-02-19 06:59:34 +04:00
|
|
|
'Logging.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'Matrix.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',
|
2015-04-01 23:02:20 +03:00
|
|
|
'Quaternion.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',
|
2013-04-16 23:24:43 +04:00
|
|
|
'Tools.h',
|
|
|
|
'Types.h',
|
|
|
|
'UserData.h',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
|
|
EXPORTS.mozilla.gfx += [
|
|
|
|
'MacIOSurface.h',
|
2013-05-08 22:31:52 +04:00
|
|
|
'QuartzSupport.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
2013-11-19 01:45:14 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'DrawTargetCG.cpp',
|
|
|
|
'PathCG.cpp',
|
|
|
|
'ScaledFontMac.cpp',
|
2013-10-24 03:00:23 +04:00
|
|
|
'SourceSurfaceCG.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'DrawTargetD2D.cpp',
|
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',
|
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',
|
2013-10-24 03:00:23 +04:00
|
|
|
'SourceSurfaceD2D.cpp',
|
2015-01-07 19:32:07 +03:00
|
|
|
'SourceSurfaceD2D1.cpp',
|
2013-10-24 03:00:23 +04:00
|
|
|
'SourceSurfaceD2DTarget.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
|
|
|
|
|
|
|
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-04-24 01:54:15 +04:00
|
|
|
'DrawTargetSkia.cpp',
|
|
|
|
'PathSkia.cpp',
|
2013-10-24 03:00:23 +04:00
|
|
|
'SourceSurfaceSkia.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
2013-11-19 01:45:14 +04:00
|
|
|
SOURCES += [
|
|
|
|
'image_operations.cpp', # Uses _USE_MATH_DEFINES
|
|
|
|
]
|
2014-07-28 22:48:29 +04:00
|
|
|
EXPORTS.mozilla.gfx += [
|
|
|
|
'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',
|
|
|
|
]
|
|
|
|
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']
|
|
|
|
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'):
|
|
|
|
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 += [
|
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',
|
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-04-24 01:54:15 +04:00
|
|
|
'Factory.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',
|
|
|
|
'Matrix.cpp',
|
2013-11-11 03:42:07 +04:00
|
|
|
'Path.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'PathCairo.cpp',
|
|
|
|
'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',
|
2013-04-24 01:54:15 +04:00
|
|
|
'SourceSurfaceCairo.cpp',
|
|
|
|
'SourceSurfaceRawData.cpp',
|
|
|
|
]
|
|
|
|
|
2014-09-03 01:20:33 +04:00
|
|
|
SOURCES += [
|
2015-02-24 00:20:35 +03:00
|
|
|
'PathHelpers.cpp', # Uses _USE_MATH_DEFINES
|
2014-09-03 01:20:33 +04:00
|
|
|
]
|
|
|
|
|
2013-07-01 20:32:40 +04:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
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']
|
|
|
|
SOURCES['BlurNEON.cpp'].flags += ['-mfpu=neon']
|
|
|
|
|
2013-11-01 06:39:03 +04:00
|
|
|
FAIL_ON_WARNINGS = True
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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 19:55:33 +04:00
|
|
|
|
2014-10-24 21:54:23 +04: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 19:55:33 +04: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 20:46:55 +03: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']
|