2013-04-01 18:36:59 +00:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 20:47:21 +00: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 02:05:14 +00:00
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'GenericRefCounted.h',
|
|
|
|
]
|
|
|
|
|
2013-04-16 19:24:43 +00:00
|
|
|
EXPORTS.mozilla.gfx += [
|
|
|
|
'2D.h',
|
|
|
|
'BaseMargin.h',
|
|
|
|
'BasePoint.h',
|
|
|
|
'BasePoint3D.h',
|
|
|
|
'BasePoint4D.h',
|
|
|
|
'BaseRect.h',
|
|
|
|
'BaseSize.h',
|
|
|
|
'Blur.h',
|
2013-09-23 03:28:16 +00:00
|
|
|
'BorrowedContext.h',
|
2013-11-03 16:28:30 +00:00
|
|
|
'DataSurfaceHelpers.h',
|
2013-11-27 11:22:07 +00:00
|
|
|
'Filters.h',
|
2013-11-11 23:53:29 +00:00
|
|
|
'Helpers.h',
|
2014-02-19 02:59:34 +00:00
|
|
|
'Logging.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
'Matrix.h',
|
|
|
|
'PathHelpers.h',
|
|
|
|
'Point.h',
|
|
|
|
'Rect.h',
|
|
|
|
'Scale.h',
|
2013-06-14 20:11:31 +00:00
|
|
|
'ScaleFactor.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
'Tools.h',
|
|
|
|
'Types.h',
|
|
|
|
'UserData.h',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
|
|
EXPORTS.mozilla.gfx += [
|
|
|
|
'MacIOSurface.h',
|
2013-05-08 18:31:52 +00:00
|
|
|
'QuartzSupport.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
]
|
2013-11-18 21:45:14 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'DrawTargetCG.cpp',
|
|
|
|
'PathCG.cpp',
|
|
|
|
'ScaledFontMac.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'SourceSurfaceCG.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'DrawTargetD2D.cpp',
|
|
|
|
'PathD2D.cpp',
|
|
|
|
'ScaledFontDWrite.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'SourceSurfaceD2D.cpp',
|
|
|
|
'SourceSurfaceD2DTarget.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
2013-11-27 13:55:07 +00:00
|
|
|
DEFINES['WIN32'] = True
|
|
|
|
# For Direct2D 1.1 we require WINSDK_MAXVER 0x06020000 or higher.
|
2013-07-17 12:12:05 +00:00
|
|
|
if CONFIG['MOZ_ENABLE_DIRECT2D1_1']:
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-07-17 12:12:22 +00:00
|
|
|
'DrawTargetD2D1.cpp',
|
2013-11-27 11:25:16 +00:00
|
|
|
'FilterNodeD2D1.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'RadialGradientEffectD2D1.cpp',
|
2013-07-17 12:12:22 +00:00
|
|
|
'SourceSurfaceD2D1.cpp'
|
2013-06-21 03:53:23 +00:00
|
|
|
]
|
2013-11-27 13:55:07 +00:00
|
|
|
DEFINES['USE_D2D1_1'] = True
|
2013-04-23 21:54:15 +00:00
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'ScaledFontWin.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_ENABLE_SKIA']:
|
2013-11-18 21:45:14 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-10-23 23:05:43 +00:00
|
|
|
'convolver.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
'DrawTargetSkia.cpp',
|
|
|
|
'PathSkia.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'SourceSurfaceSkia.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
2013-11-18 21:45:14 +00:00
|
|
|
SOURCES += [
|
|
|
|
'image_operations.cpp', # Uses _USE_MATH_DEFINES
|
|
|
|
]
|
2013-04-23 21:54:15 +00: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 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'BlurSSE2.cpp',
|
2013-11-27 11:22:27 +00:00
|
|
|
'FilterProcessingSSE2.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'ImageScalingSSE2.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
2013-11-27 13:55:07 +00:00
|
|
|
DEFINES['USE_SSE2'] = True
|
2014-03-02 20:41:32 +00:00
|
|
|
# The file uses SSE2 intrinsics, so it needs special compile flags on some
|
|
|
|
# compilers.
|
2014-03-20 01:55:00 +00: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 21:54:15 +00:00
|
|
|
|
2013-11-18 21:45:14 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'Blur.cpp',
|
2013-11-27 11:21:21 +00:00
|
|
|
'DataSourceSurface.cpp',
|
2014-03-07 13:24:42 +00:00
|
|
|
'DataSurfaceHelpers.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
'DrawEventRecorder.cpp',
|
|
|
|
'DrawTargetCairo.cpp',
|
|
|
|
'DrawTargetDual.cpp',
|
|
|
|
'DrawTargetRecording.cpp',
|
2014-06-11 19:53:02 +00:00
|
|
|
'DrawTargetTiled.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
'Factory.cpp',
|
2013-11-27 11:22:46 +00:00
|
|
|
'FilterNodeSoftware.cpp',
|
2013-11-27 11:22:27 +00:00
|
|
|
'FilterProcessing.cpp',
|
|
|
|
'FilterProcessingScalar.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
'ImageScaling.cpp',
|
|
|
|
'Matrix.cpp',
|
2013-11-10 23:42:07 +00:00
|
|
|
'Path.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
'PathCairo.cpp',
|
2013-11-01 13:29:44 +00:00
|
|
|
'PathHelpers.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
'PathRecording.cpp',
|
|
|
|
'RecordedEvent.cpp',
|
|
|
|
'Scale.cpp',
|
|
|
|
'ScaledFontBase.cpp',
|
2013-06-05 17:48:59 +00:00
|
|
|
'ScaledFontCairo.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
'SourceSurfaceCairo.cpp',
|
|
|
|
'SourceSurfaceRawData.cpp',
|
|
|
|
]
|
|
|
|
|
2013-07-01 16:32:40 +00:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-11-08 03:53:54 +00:00
|
|
|
'MacIOSurface.cpp',
|
2013-07-01 16:32:40 +00:00
|
|
|
'QuartzSupport.mm',
|
|
|
|
]
|
2013-08-22 06:56:00 +00:00
|
|
|
|
2013-11-01 02:39:03 +00:00
|
|
|
FAIL_ON_WARNINGS = True
|
|
|
|
|
2013-08-22 06:56:01 +00:00
|
|
|
MSVC_ENABLE_PGO = True
|
|
|
|
|
2013-10-02 17:17:55 +00:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2014-02-25 20:42:23 +00:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2013-11-27 13:55:07 +00:00
|
|
|
|
2014-03-03 19:38:33 +00:00
|
|
|
for var in ('USE_CAIRO', 'MOZ2D_HAS_MOZ_CAIRO'):
|
2013-11-27 13:55:07 +00: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
|