2011-06-24 10:41:16 -07:00
|
|
|
#
|
2012-05-21 04:12:37 -07:00
|
|
|
# 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/.
|
2011-06-24 10:41:16 -07:00
|
|
|
|
|
|
|
DEPTH = ../..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
|
|
|
MODULE = gfx2d
|
|
|
|
LIBRARY_NAME = gfx2d
|
|
|
|
LIBXUL_LIBRARY = 1
|
|
|
|
EXPORT_LIBRARY = 1
|
|
|
|
|
|
|
|
EXPORTS_NAMESPACES = mozilla/gfx
|
|
|
|
EXPORTS_mozilla/gfx = \
|
|
|
|
2D.h \
|
|
|
|
BasePoint.h \
|
2011-08-26 17:06:03 -07:00
|
|
|
BasePoint3D.h \
|
|
|
|
BasePoint4D.h \
|
2011-06-24 10:41:16 -07:00
|
|
|
BaseMargin.h \
|
|
|
|
BaseRect.h \
|
|
|
|
BaseSize.h \
|
2011-11-18 01:19:24 -08:00
|
|
|
Blur.h \
|
2011-11-02 12:55:03 -07:00
|
|
|
PathHelpers.h \
|
2011-06-24 10:41:16 -07:00
|
|
|
Point.h \
|
|
|
|
Matrix.h \
|
|
|
|
Rect.h \
|
|
|
|
Types.h \
|
2012-01-13 06:47:58 -08:00
|
|
|
UserData.h \
|
2011-06-24 10:41:16 -07:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
CPPSRCS = \
|
|
|
|
Factory.cpp \
|
|
|
|
Matrix.cpp \
|
|
|
|
DrawTargetCairo.cpp \
|
|
|
|
SourceSurfaceCairo.cpp \
|
2012-01-09 14:15:10 -08:00
|
|
|
PathCairo.cpp \
|
2011-11-18 01:19:24 -08:00
|
|
|
Blur.cpp \
|
2012-01-09 10:54:44 -08:00
|
|
|
ScaledFontBase.cpp \
|
2012-04-03 13:25:52 -07:00
|
|
|
DrawTargetDual.cpp \
|
2012-05-09 21:31:14 -07:00
|
|
|
ImageScaling.cpp \
|
2011-06-24 10:41:16 -07:00
|
|
|
$(NULL)
|
|
|
|
|
2012-01-09 10:54:44 -08:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
CPPSRCS += \
|
|
|
|
SourceSurfaceCG.cpp \
|
|
|
|
DrawTargetCG.cpp \
|
|
|
|
PathCG.cpp \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
2011-11-02 12:55:03 -07:00
|
|
|
|
2012-05-03 12:21:52 -07:00
|
|
|
DEFINES += -DMOZ_GFX -DUSE_CAIRO -DGFX2D_INTERNAL
|
2011-06-24 10:41:16 -07:00
|
|
|
|
2011-12-14 05:04:32 -08:00
|
|
|
ifdef MOZ_ENABLE_SKIA
|
2011-11-02 12:55:03 -07:00
|
|
|
CPPSRCS += \
|
2011-12-14 05:04:32 -08:00
|
|
|
SourceSurfaceSkia.cpp \
|
|
|
|
DrawTargetSkia.cpp \
|
|
|
|
PathSkia.cpp \
|
2012-02-13 11:58:01 -08:00
|
|
|
ScaledFontFreetype.cpp
|
2011-11-02 12:55:03 -07:00
|
|
|
$(NULL)
|
2011-12-14 05:04:32 -08:00
|
|
|
|
2011-11-02 12:55:03 -07:00
|
|
|
DEFINES += -DUSE_SKIA
|
2011-12-14 05:04:32 -08:00
|
|
|
|
2011-11-02 12:55:03 -07:00
|
|
|
endif
|
|
|
|
|
2011-12-14 05:04:32 -08:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
ifdef MOZ_ENABLE_SKIA
|
|
|
|
CPPSRCS += \
|
|
|
|
ScaledFontMac.cpp \
|
2011-11-02 12:55:03 -07:00
|
|
|
$(NULL)
|
2011-12-14 05:04:32 -08:00
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
DEFINES += -DSK_BUILD_FOR_ANDROID_NDK
|
2011-11-02 12:55:03 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
DEFINES += -DSK_A32_SHIFT=24 -DSK_R32_SHIFT=16 -DSK_G32_SHIFT=8 -DSK_B32_SHIFT=0
|
|
|
|
|
2011-06-24 10:41:16 -07:00
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
DEFINES += -DGFX_LOG_DEBUG -DGFX_LOG_WARNING
|
|
|
|
endif
|
|
|
|
|
2012-05-09 21:31:14 -07:00
|
|
|
# Are we targeting x86 or x64? If so, build SSE2 files.
|
|
|
|
ifneq (,$(INTEL_ARCHITECTURE))
|
2012-05-17 19:17:26 -07:00
|
|
|
# VC2005 doesn't support _mm_castsi128_ps, so SSE2 is turned off
|
|
|
|
ifneq (1400,$(_MSC_VER))
|
2012-05-09 21:31:14 -07:00
|
|
|
CPPSRCS += ImageScalingSSE2.cpp
|
|
|
|
DEFINES += -DUSE_SSE2
|
|
|
|
endif
|
2012-05-17 19:17:26 -07:00
|
|
|
endif
|
2012-05-09 21:31:14 -07:00
|
|
|
|
2011-06-24 10:41:16 -07:00
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
|
|
|
CPPSRCS += \
|
|
|
|
DrawTargetD2D.cpp \
|
|
|
|
SourceSurfaceD2D.cpp \
|
|
|
|
SourceSurfaceD2DTarget.cpp \
|
|
|
|
PathD2D.cpp \
|
|
|
|
ScaledFontDWrite.cpp \
|
2011-12-14 05:04:32 -08:00
|
|
|
$(NULL)
|
2012-05-03 12:21:52 -07:00
|
|
|
DEFINES += -DWIN32 -DINITGUID
|
2011-12-14 05:04:32 -08:00
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_SKIA
|
|
|
|
CPPSRCS += \
|
2011-11-17 20:00:37 -08:00
|
|
|
ScaledFontWin.cpp \
|
|
|
|
$(NULL)
|
2011-12-14 05:04:32 -08:00
|
|
|
endif
|
2011-06-24 10:41:16 -07:00
|
|
|
endif
|
|
|
|
|
2012-05-09 21:31:14 -07:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2011-06-24 10:41:16 -07:00
|
|
|
#ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
|
|
|
#CPPSRCS += \
|
|
|
|
# DrawTargetCG.cpp \
|
|
|
|
# SourceSurfaceCG.cpp \
|
|
|
|
# $(NULL)
|
|
|
|
#
|
|
|
|
## Always link with OpenGL/AGL
|
|
|
|
#EXTRA_DSO_LDOPTS += -framework OpenGL -framework AGL -framework QuickTime -framework AppKit -framework QuartzCore
|
|
|
|
#endif
|
|
|
|
|
2012-05-09 21:31:14 -07:00
|
|
|
# The file uses SSE2 intrinsics, so it needs special compile flags on some
|
|
|
|
# compilers.
|
|
|
|
ifneq (,$(INTEL_ARCHITECTURE))
|
|
|
|
ifdef GNU_CC
|
|
|
|
ImageScalingSSE2.$(OBJ_SUFFIX): CXXFLAGS+=-msse2
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef SOLARIS_SUNPRO_CXX
|
|
|
|
ImageScalingSSE2.$(OBJ_SUFFIX): OS_CXXFLAGS += -xarch=sse2 -xO4
|
|
|
|
endif
|
|
|
|
endif
|
2012-05-07 19:40:13 -07:00
|
|
|
|
2011-06-26 07:10:35 -07:00
|
|
|
CXXFLAGS += $(MOZ_CAIRO_CFLAGS)
|