gfx/2d/moz.build

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
michael@0 2 # vim: set filetype=python:
michael@0 3 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 6
michael@0 7 EXPORTS.mozilla += [
michael@0 8 'GenericRefCounted.h',
michael@0 9 ]
michael@0 10
michael@0 11 EXPORTS.mozilla.gfx += [
michael@0 12 '2D.h',
michael@0 13 'BaseMargin.h',
michael@0 14 'BasePoint.h',
michael@0 15 'BasePoint3D.h',
michael@0 16 'BasePoint4D.h',
michael@0 17 'BaseRect.h',
michael@0 18 'BaseSize.h',
michael@0 19 'Blur.h',
michael@0 20 'BorrowedContext.h',
michael@0 21 'DataSurfaceHelpers.h',
michael@0 22 'Filters.h',
michael@0 23 'Helpers.h',
michael@0 24 'Logging.h',
michael@0 25 'Matrix.h',
michael@0 26 'PathHelpers.h',
michael@0 27 'Point.h',
michael@0 28 'Rect.h',
michael@0 29 'Scale.h',
michael@0 30 'ScaleFactor.h',
michael@0 31 'Tools.h',
michael@0 32 'Types.h',
michael@0 33 'UserData.h',
michael@0 34 ]
michael@0 35
michael@0 36 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
michael@0 37 EXPORTS.mozilla.gfx += [
michael@0 38 'MacIOSurface.h',
michael@0 39 'QuartzSupport.h',
michael@0 40 ]
michael@0 41 UNIFIED_SOURCES += [
michael@0 42 'DrawTargetCG.cpp',
michael@0 43 'PathCG.cpp',
michael@0 44 'ScaledFontMac.cpp',
michael@0 45 'SourceSurfaceCG.cpp',
michael@0 46 ]
michael@0 47 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
michael@0 48 SOURCES += [
michael@0 49 'DrawTargetD2D.cpp',
michael@0 50 'PathD2D.cpp',
michael@0 51 'ScaledFontDWrite.cpp',
michael@0 52 'SourceSurfaceD2D.cpp',
michael@0 53 'SourceSurfaceD2DTarget.cpp',
michael@0 54 ]
michael@0 55 DEFINES['WIN32'] = True
michael@0 56 # For Direct2D 1.1 we require WINSDK_MAXVER 0x06020000 or higher.
michael@0 57 if CONFIG['MOZ_ENABLE_DIRECT2D1_1']:
michael@0 58 SOURCES += [
michael@0 59 'DrawTargetD2D1.cpp',
michael@0 60 'FilterNodeD2D1.cpp',
michael@0 61 'RadialGradientEffectD2D1.cpp',
michael@0 62 'SourceSurfaceD2D1.cpp'
michael@0 63 ]
michael@0 64 DEFINES['USE_D2D1_1'] = True
michael@0 65 if CONFIG['MOZ_ENABLE_SKIA']:
michael@0 66 SOURCES += [
michael@0 67 'ScaledFontWin.cpp',
michael@0 68 ]
michael@0 69
michael@0 70 if CONFIG['MOZ_ENABLE_SKIA']:
michael@0 71 UNIFIED_SOURCES += [
michael@0 72 'convolver.cpp',
michael@0 73 'DrawTargetSkia.cpp',
michael@0 74 'PathSkia.cpp',
michael@0 75 'SourceSurfaceSkia.cpp',
michael@0 76 ]
michael@0 77 SOURCES += [
michael@0 78 'image_operations.cpp', # Uses _USE_MATH_DEFINES
michael@0 79 ]
michael@0 80
michael@0 81 # Are we targeting x86 or x64? If so, build SSE2 files.
michael@0 82 if CONFIG['INTEL_ARCHITECTURE']:
michael@0 83 # VC2005 doesn't support _mm_castsi128_ps, so SSE2 is turned off
michael@0 84 if CONFIG['_MSC_VER'] != '1400':
michael@0 85 SOURCES += [
michael@0 86 'BlurSSE2.cpp',
michael@0 87 'FilterProcessingSSE2.cpp',
michael@0 88 'ImageScalingSSE2.cpp',
michael@0 89 ]
michael@0 90 DEFINES['USE_SSE2'] = True
michael@0 91 # The file uses SSE2 intrinsics, so it needs special compile flags on some
michael@0 92 # compilers.
michael@0 93 SOURCES['BlurSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
michael@0 94 SOURCES['FilterProcessingSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
michael@0 95 SOURCES['ImageScalingSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
michael@0 96
michael@0 97 UNIFIED_SOURCES += [
michael@0 98 'Blur.cpp',
michael@0 99 'DataSourceSurface.cpp',
michael@0 100 'DataSurfaceHelpers.cpp',
michael@0 101 'DrawEventRecorder.cpp',
michael@0 102 'DrawTargetCairo.cpp',
michael@0 103 'DrawTargetDual.cpp',
michael@0 104 'DrawTargetRecording.cpp',
michael@0 105 'Factory.cpp',
michael@0 106 'FilterNodeSoftware.cpp',
michael@0 107 'FilterProcessing.cpp',
michael@0 108 'FilterProcessingScalar.cpp',
michael@0 109 'ImageScaling.cpp',
michael@0 110 'Matrix.cpp',
michael@0 111 'Path.cpp',
michael@0 112 'PathCairo.cpp',
michael@0 113 'PathHelpers.cpp',
michael@0 114 'PathRecording.cpp',
michael@0 115 'RecordedEvent.cpp',
michael@0 116 'Scale.cpp',
michael@0 117 'ScaledFontBase.cpp',
michael@0 118 'ScaledFontCairo.cpp',
michael@0 119 'SourceSurfaceCairo.cpp',
michael@0 120 'SourceSurfaceRawData.cpp',
michael@0 121 ]
michael@0 122
michael@0 123 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
michael@0 124 SOURCES += [
michael@0 125 'MacIOSurface.cpp',
michael@0 126 'QuartzSupport.mm',
michael@0 127 ]
michael@0 128
michael@0 129 FAIL_ON_WARNINGS = True
michael@0 130
michael@0 131 MSVC_ENABLE_PGO = True
michael@0 132
michael@0 133 include('/ipc/chromium/chromium-config.mozbuild')
michael@0 134
michael@0 135 FINAL_LIBRARY = 'xul'
michael@0 136
michael@0 137 for var in ('USE_CAIRO', 'MOZ2D_HAS_MOZ_CAIRO'):
michael@0 138 DEFINES[var] = True
michael@0 139
michael@0 140 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'):
michael@0 141 DEFINES['MOZ_ENABLE_FREETYPE'] = True
michael@0 142
michael@0 143 DEFINES['SK_A32_SHIFT'] = 24
michael@0 144 DEFINES['SK_R32_SHIFT'] = 16
michael@0 145 DEFINES['SK_G32_SHIFT'] = 8
michael@0 146 DEFINES['SK_B32_SHIFT'] = 0
michael@0 147
michael@0 148 if CONFIG['MOZ_DEBUG']:
michael@0 149 DEFINES['GFX_LOG_DEBUG'] = True
michael@0 150 DEFINES['GFX_LOG_WARNING'] = True

mercurial