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',
|
|
|
|
'BaseMargin.h',
|
|
|
|
'BasePoint.h',
|
|
|
|
'BasePoint3D.h',
|
|
|
|
'BasePoint4D.h',
|
|
|
|
'BaseRect.h',
|
|
|
|
'BaseSize.h',
|
|
|
|
'Blur.h',
|
2013-09-22 20:28:16 -07:00
|
|
|
'BorrowedContext.h',
|
2013-11-03 08:28:30 -08:00
|
|
|
'DataSurfaceHelpers.h',
|
2013-11-27 03:22:07 -08:00
|
|
|
'Filters.h',
|
2013-11-11 15:53:29 -08:00
|
|
|
'Helpers.h',
|
2014-02-18 18:59:34 -08:00
|
|
|
'Logging.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'Matrix.h',
|
|
|
|
'PathHelpers.h',
|
|
|
|
'Point.h',
|
|
|
|
'Rect.h',
|
|
|
|
'Scale.h',
|
2013-06-14 13:11:31 -07:00
|
|
|
'ScaleFactor.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',
|
|
|
|
'PathD2D.cpp',
|
|
|
|
'ScaledFontDWrite.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'SourceSurfaceD2D.cpp',
|
|
|
|
'SourceSurfaceD2DTarget.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
2013-11-27 05:55:07 -08:00
|
|
|
DEFINES['WIN32'] = True
|
|
|
|
# For Direct2D 1.1 we require WINSDK_MAXVER 0x06020000 or higher.
|
2013-07-17 05:12:05 -07:00
|
|
|
if CONFIG['MOZ_ENABLE_DIRECT2D1_1']:
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-07-17 05:12:22 -07:00
|
|
|
'DrawTargetD2D1.cpp',
|
2013-11-27 03:25:16 -08:00
|
|
|
'FilterNodeD2D1.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'RadialGradientEffectD2D1.cpp',
|
2013-07-17 05:12:22 -07:00
|
|
|
'SourceSurfaceD2D1.cpp'
|
2013-06-20 20:53:23 -07:00
|
|
|
]
|
2013-11-27 05:55:07 -08:00
|
|
|
DEFINES['USE_D2D1_1'] = True
|
2013-04-23 14:54:15 -07:00
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'ScaledFontWin.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
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
|
|
|
|
]
|
2013-04-23 14:54:15 -07:00
|
|
|
|
|
|
|
# Are we targeting x86 or x64? If so, build SSE2 files.
|
|
|
|
if CONFIG['INTEL_ARCHITECTURE']:
|
|
|
|
# VC2005 doesn't support _mm_castsi128_ps, so SSE2 is turned off
|
|
|
|
if CONFIG['_MSC_VER'] != '1400':
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'BlurSSE2.cpp',
|
2013-11-27 03:22:27 -08:00
|
|
|
'FilterProcessingSSE2.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'ImageScalingSSE2.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
2013-11-27 05:55:07 -08:00
|
|
|
DEFINES['USE_SSE2'] = True
|
2014-03-02 12:41:32 -08:00
|
|
|
# The file uses SSE2 intrinsics, so it needs special compile flags on some
|
|
|
|
# compilers.
|
2014-03-19 18:55:00 -07:00
|
|
|
SOURCES['BlurSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
|
|
|
|
SOURCES['FilterProcessingSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
|
|
|
|
SOURCES['ImageScalingSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
|
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',
|
|
|
|
'DrawTargetCairo.cpp',
|
|
|
|
'DrawTargetDual.cpp',
|
|
|
|
'DrawTargetRecording.cpp',
|
|
|
|
'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',
|
2013-11-01 06:29:44 -07:00
|
|
|
'PathHelpers.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'PathRecording.cpp',
|
|
|
|
'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',
|
|
|
|
]
|
|
|
|
|
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
|
|
|
|
2013-10-31 19:39:03 -07:00
|
|
|
FAIL_ON_WARNINGS = True
|
|
|
|
|
2013-08-21 23:56:01 -07:00
|
|
|
MSVC_ENABLE_PGO = 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
|
|
|
|
|
|
|
|
DEFINES['SK_A32_SHIFT'] = 24
|
|
|
|
DEFINES['SK_R32_SHIFT'] = 16
|
|
|
|
DEFINES['SK_G32_SHIFT'] = 8
|
|
|
|
DEFINES['SK_B32_SHIFT'] = 0
|
|
|
|
|
|
|
|
if CONFIG['MOZ_DEBUG']:
|
|
|
|
DEFINES['GFX_LOG_DEBUG'] = True
|
|
|
|
DEFINES['GFX_LOG_WARNING'] = True
|