michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: EXPORTS.mozilla += [ michael@0: 'GenericRefCounted.h', michael@0: ] michael@0: michael@0: EXPORTS.mozilla.gfx += [ michael@0: '2D.h', michael@0: 'BaseMargin.h', michael@0: 'BasePoint.h', michael@0: 'BasePoint3D.h', michael@0: 'BasePoint4D.h', michael@0: 'BaseRect.h', michael@0: 'BaseSize.h', michael@0: 'Blur.h', michael@0: 'BorrowedContext.h', michael@0: 'DataSurfaceHelpers.h', michael@0: 'Filters.h', michael@0: 'Helpers.h', michael@0: 'Logging.h', michael@0: 'Matrix.h', michael@0: 'PathHelpers.h', michael@0: 'Point.h', michael@0: 'Rect.h', michael@0: 'Scale.h', michael@0: 'ScaleFactor.h', michael@0: 'Tools.h', michael@0: 'Types.h', michael@0: 'UserData.h', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': michael@0: EXPORTS.mozilla.gfx += [ michael@0: 'MacIOSurface.h', michael@0: 'QuartzSupport.h', michael@0: ] michael@0: UNIFIED_SOURCES += [ michael@0: 'DrawTargetCG.cpp', michael@0: 'PathCG.cpp', michael@0: 'ScaledFontMac.cpp', michael@0: 'SourceSurfaceCG.cpp', michael@0: ] michael@0: elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': michael@0: SOURCES += [ michael@0: 'DrawTargetD2D.cpp', michael@0: 'PathD2D.cpp', michael@0: 'ScaledFontDWrite.cpp', michael@0: 'SourceSurfaceD2D.cpp', michael@0: 'SourceSurfaceD2DTarget.cpp', michael@0: ] michael@0: DEFINES['WIN32'] = True michael@0: # For Direct2D 1.1 we require WINSDK_MAXVER 0x06020000 or higher. michael@0: if CONFIG['MOZ_ENABLE_DIRECT2D1_1']: michael@0: SOURCES += [ michael@0: 'DrawTargetD2D1.cpp', michael@0: 'FilterNodeD2D1.cpp', michael@0: 'RadialGradientEffectD2D1.cpp', michael@0: 'SourceSurfaceD2D1.cpp' michael@0: ] michael@0: DEFINES['USE_D2D1_1'] = True michael@0: if CONFIG['MOZ_ENABLE_SKIA']: michael@0: SOURCES += [ michael@0: 'ScaledFontWin.cpp', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_ENABLE_SKIA']: michael@0: UNIFIED_SOURCES += [ michael@0: 'convolver.cpp', michael@0: 'DrawTargetSkia.cpp', michael@0: 'PathSkia.cpp', michael@0: 'SourceSurfaceSkia.cpp', michael@0: ] michael@0: SOURCES += [ michael@0: 'image_operations.cpp', # Uses _USE_MATH_DEFINES michael@0: ] michael@0: michael@0: # Are we targeting x86 or x64? If so, build SSE2 files. michael@0: if CONFIG['INTEL_ARCHITECTURE']: michael@0: # VC2005 doesn't support _mm_castsi128_ps, so SSE2 is turned off michael@0: if CONFIG['_MSC_VER'] != '1400': michael@0: SOURCES += [ michael@0: 'BlurSSE2.cpp', michael@0: 'FilterProcessingSSE2.cpp', michael@0: 'ImageScalingSSE2.cpp', michael@0: ] michael@0: DEFINES['USE_SSE2'] = True michael@0: # The file uses SSE2 intrinsics, so it needs special compile flags on some michael@0: # compilers. michael@0: SOURCES['BlurSSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] michael@0: SOURCES['FilterProcessingSSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] michael@0: SOURCES['ImageScalingSSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] michael@0: michael@0: UNIFIED_SOURCES += [ michael@0: 'Blur.cpp', michael@0: 'DataSourceSurface.cpp', michael@0: 'DataSurfaceHelpers.cpp', michael@0: 'DrawEventRecorder.cpp', michael@0: 'DrawTargetCairo.cpp', michael@0: 'DrawTargetDual.cpp', michael@0: 'DrawTargetRecording.cpp', michael@0: 'Factory.cpp', michael@0: 'FilterNodeSoftware.cpp', michael@0: 'FilterProcessing.cpp', michael@0: 'FilterProcessingScalar.cpp', michael@0: 'ImageScaling.cpp', michael@0: 'Matrix.cpp', michael@0: 'Path.cpp', michael@0: 'PathCairo.cpp', michael@0: 'PathHelpers.cpp', michael@0: 'PathRecording.cpp', michael@0: 'RecordedEvent.cpp', michael@0: 'Scale.cpp', michael@0: 'ScaledFontBase.cpp', michael@0: 'ScaledFontCairo.cpp', michael@0: 'SourceSurfaceCairo.cpp', michael@0: 'SourceSurfaceRawData.cpp', michael@0: ] michael@0: michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': michael@0: SOURCES += [ michael@0: 'MacIOSurface.cpp', michael@0: 'QuartzSupport.mm', michael@0: ] michael@0: michael@0: FAIL_ON_WARNINGS = True michael@0: michael@0: MSVC_ENABLE_PGO = True michael@0: michael@0: include('/ipc/chromium/chromium-config.mozbuild') michael@0: michael@0: FINAL_LIBRARY = 'xul' michael@0: michael@0: for var in ('USE_CAIRO', 'MOZ2D_HAS_MOZ_CAIRO'): michael@0: DEFINES[var] = True michael@0: michael@0: if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'): michael@0: DEFINES['MOZ_ENABLE_FREETYPE'] = True michael@0: michael@0: DEFINES['SK_A32_SHIFT'] = 24 michael@0: DEFINES['SK_R32_SHIFT'] = 16 michael@0: DEFINES['SK_G32_SHIFT'] = 8 michael@0: DEFINES['SK_B32_SHIFT'] = 0 michael@0: michael@0: if CONFIG['MOZ_DEBUG']: michael@0: DEFINES['GFX_LOG_DEBUG'] = True michael@0: DEFINES['GFX_LOG_WARNING'] = True