gfx/2d/moz.build

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/2d/moz.build	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,150 @@
     1.4 +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
     1.5 +# vim: set filetype=python:
     1.6 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 +
    1.10 +EXPORTS.mozilla += [
    1.11 +    'GenericRefCounted.h',
    1.12 +]
    1.13 +
    1.14 +EXPORTS.mozilla.gfx += [
    1.15 +    '2D.h',
    1.16 +    'BaseMargin.h',
    1.17 +    'BasePoint.h',
    1.18 +    'BasePoint3D.h',
    1.19 +    'BasePoint4D.h',
    1.20 +    'BaseRect.h',
    1.21 +    'BaseSize.h',
    1.22 +    'Blur.h',
    1.23 +    'BorrowedContext.h',
    1.24 +    'DataSurfaceHelpers.h',
    1.25 +    'Filters.h',
    1.26 +    'Helpers.h',
    1.27 +    'Logging.h',
    1.28 +    'Matrix.h',
    1.29 +    'PathHelpers.h',
    1.30 +    'Point.h',
    1.31 +    'Rect.h',
    1.32 +    'Scale.h',
    1.33 +    'ScaleFactor.h',
    1.34 +    'Tools.h',
    1.35 +    'Types.h',
    1.36 +    'UserData.h',
    1.37 +]
    1.38 +
    1.39 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
    1.40 +    EXPORTS.mozilla.gfx += [
    1.41 +        'MacIOSurface.h',
    1.42 +        'QuartzSupport.h',
    1.43 +    ]
    1.44 +    UNIFIED_SOURCES += [
    1.45 +        'DrawTargetCG.cpp',
    1.46 +        'PathCG.cpp',
    1.47 +        'ScaledFontMac.cpp',
    1.48 +        'SourceSurfaceCG.cpp',
    1.49 +    ]
    1.50 +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
    1.51 +    SOURCES += [
    1.52 +        'DrawTargetD2D.cpp',
    1.53 +        'PathD2D.cpp',
    1.54 +        'ScaledFontDWrite.cpp',
    1.55 +        'SourceSurfaceD2D.cpp',
    1.56 +        'SourceSurfaceD2DTarget.cpp',
    1.57 +    ]
    1.58 +    DEFINES['WIN32'] = True
    1.59 +    # For Direct2D 1.1 we require WINSDK_MAXVER 0x06020000 or higher.
    1.60 +    if CONFIG['MOZ_ENABLE_DIRECT2D1_1']:
    1.61 +        SOURCES += [
    1.62 +            'DrawTargetD2D1.cpp',
    1.63 +            'FilterNodeD2D1.cpp',
    1.64 +            'RadialGradientEffectD2D1.cpp',
    1.65 +            'SourceSurfaceD2D1.cpp'
    1.66 +        ]
    1.67 +        DEFINES['USE_D2D1_1'] = True
    1.68 +    if CONFIG['MOZ_ENABLE_SKIA']:
    1.69 +        SOURCES += [
    1.70 +            'ScaledFontWin.cpp',
    1.71 +        ]
    1.72 +
    1.73 +if CONFIG['MOZ_ENABLE_SKIA']:
    1.74 +    UNIFIED_SOURCES += [
    1.75 +        'convolver.cpp',
    1.76 +        'DrawTargetSkia.cpp',
    1.77 +        'PathSkia.cpp',
    1.78 +        'SourceSurfaceSkia.cpp',
    1.79 +    ]
    1.80 +    SOURCES += [
    1.81 +        'image_operations.cpp', # Uses _USE_MATH_DEFINES
    1.82 +    ]
    1.83 +
    1.84 +# Are we targeting x86 or x64?  If so, build SSE2 files.
    1.85 +if CONFIG['INTEL_ARCHITECTURE']:
    1.86 +    # VC2005 doesn't support _mm_castsi128_ps, so SSE2 is turned off
    1.87 +    if CONFIG['_MSC_VER'] != '1400':
    1.88 +        SOURCES += [
    1.89 +            'BlurSSE2.cpp',
    1.90 +            'FilterProcessingSSE2.cpp',
    1.91 +            'ImageScalingSSE2.cpp',
    1.92 +        ]
    1.93 +        DEFINES['USE_SSE2'] = True
    1.94 +        # The file uses SSE2 intrinsics, so it needs special compile flags on some
    1.95 +        # compilers.
    1.96 +        SOURCES['BlurSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
    1.97 +        SOURCES['FilterProcessingSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
    1.98 +        SOURCES['ImageScalingSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
    1.99 +
   1.100 +UNIFIED_SOURCES += [
   1.101 +    'Blur.cpp',
   1.102 +    'DataSourceSurface.cpp',
   1.103 +    'DataSurfaceHelpers.cpp',
   1.104 +    'DrawEventRecorder.cpp',
   1.105 +    'DrawTargetCairo.cpp',
   1.106 +    'DrawTargetDual.cpp',
   1.107 +    'DrawTargetRecording.cpp',
   1.108 +    'Factory.cpp',
   1.109 +    'FilterNodeSoftware.cpp',
   1.110 +    'FilterProcessing.cpp',
   1.111 +    'FilterProcessingScalar.cpp',
   1.112 +    'ImageScaling.cpp',
   1.113 +    'Matrix.cpp',
   1.114 +    'Path.cpp',
   1.115 +    'PathCairo.cpp',
   1.116 +    'PathHelpers.cpp',
   1.117 +    'PathRecording.cpp',
   1.118 +    'RecordedEvent.cpp',
   1.119 +    'Scale.cpp',
   1.120 +    'ScaledFontBase.cpp',
   1.121 +    'ScaledFontCairo.cpp',
   1.122 +    'SourceSurfaceCairo.cpp',
   1.123 +    'SourceSurfaceRawData.cpp',
   1.124 +]
   1.125 +
   1.126 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
   1.127 +    SOURCES += [
   1.128 +        'MacIOSurface.cpp',
   1.129 +        'QuartzSupport.mm',
   1.130 +    ]
   1.131 +
   1.132 +FAIL_ON_WARNINGS = True
   1.133 +
   1.134 +MSVC_ENABLE_PGO = True
   1.135 +
   1.136 +include('/ipc/chromium/chromium-config.mozbuild')
   1.137 +
   1.138 +FINAL_LIBRARY = 'xul'
   1.139 +
   1.140 +for var in ('USE_CAIRO', 'MOZ2D_HAS_MOZ_CAIRO'):
   1.141 +    DEFINES[var] = True
   1.142 +
   1.143 +if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'):
   1.144 +    DEFINES['MOZ_ENABLE_FREETYPE'] = True
   1.145 +
   1.146 +DEFINES['SK_A32_SHIFT'] = 24
   1.147 +DEFINES['SK_R32_SHIFT'] = 16
   1.148 +DEFINES['SK_G32_SHIFT'] = 8
   1.149 +DEFINES['SK_B32_SHIFT'] = 0
   1.150 +
   1.151 +if CONFIG['MOZ_DEBUG']:
   1.152 +    DEFINES['GFX_LOG_DEBUG'] = True
   1.153 +    DEFINES['GFX_LOG_WARNING'] = True

mercurial