Bug 751463: Remove Azure from XUL. r=khuey
authorBas Schouten <bschouten@mozilla.com>
Thu, 03 May 2012 21:21:52 +0200
changeset 93006 18f6006cce7097a10c4a9aefac36c15f4fef5da9
parent 93005 751dc7771b2f652f5cf133b61428e66d2989604b
child 93007 9fca7e83d16b692c7a4657952d254fd6adc6059c
push id8929
push userbschouten@mozilla.com
push dateThu, 03 May 2012 19:22:09 +0000
treeherdermozilla-inbound@18f6006cce70 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs751463
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 751463: Remove Azure from XUL. r=khuey
gfx/2d/2D.h
gfx/2d/Blur.h
gfx/2d/Factory.cpp
gfx/2d/Makefile.in
gfx/2d/Matrix.h
gfx/2d/Types.h
layout/media/Makefile.in
toolkit/library/Makefile.in
--- a/gfx/2d/2D.h
+++ b/gfx/2d/2D.h
@@ -782,17 +782,17 @@ public:
 protected:
   UserData mUserData;
   Matrix mTransform;
   bool mTransformDirty : 1;
 
   SurfaceFormat mFormat;
 };
 
-class Factory
+class GFX2D_API Factory
 {
 public:
   static TemporaryRef<DrawTarget> CreateDrawTargetForCairoSurface(cairo_surface_t* aSurface);
 
   static TemporaryRef<DrawTarget>
     CreateDrawTarget(BackendType aBackend, const IntSize &aSize, SurfaceFormat aFormat);
   
   static TemporaryRef<DrawTarget>
--- a/gfx/2d/Blur.h
+++ b/gfx/2d/Blur.h
@@ -55,17 +55,17 @@ namespace gfx {
  *
  * A spread N makes each output pixel the maximum value of all source
  * pixels within a square of side length 2N+1 centered on the output pixel.
  *
  * A temporary surface is created in the Init function. The caller then draws
  * any desired content onto the context acquired through GetContext, and lastly
  * calls Paint to apply the blurred content as an alpha mask.
  */
-class AlphaBoxBlur
+class GFX2D_API AlphaBoxBlur
 {
 public:
 
   /** Constructs a box blur and initializes the backing surface.
    *
    * @param aRect The coordinates of the surface to create in device units.
    *
    * @param aBlurRadius The blur radius in pixels.  This is the radius of the
--- a/gfx/2d/Factory.cpp
+++ b/gfx/2d/Factory.cpp
@@ -275,23 +275,23 @@ Factory::CreateDWriteGlyphRenderingOptio
   RefPtr<GlyphRenderingOptions> options =
     new GlyphRenderingOptionsDWrite(aParams);
 
   return options;
 }
 
 #endif // XP_WIN
 
-#ifdef USE_CAIRO
 TemporaryRef<DrawTarget>
 Factory::CreateDrawTargetForCairoSurface(cairo_surface_t* aSurface)
 {
+#ifdef USE_CAIRO
   RefPtr<DrawTargetCairo> newTarget = new DrawTargetCairo();
   if (newTarget->Init(aSurface)) {
     return newTarget;
   }
 
+#endif
   return NULL;
 }
-#endif
 
 }
 }
--- a/gfx/2d/Makefile.in
+++ b/gfx/2d/Makefile.in
@@ -79,17 +79,17 @@ CPPSRCS	= \
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 CPPSRCS	+= \
 	   SourceSurfaceCG.cpp \
 	   DrawTargetCG.cpp \
 	   PathCG.cpp \
 	   $(NULL)
 endif
 
-DEFINES += -DMOZ_GFX -DUSE_CAIRO
+DEFINES += -DMOZ_GFX -DUSE_CAIRO -DGFX2D_INTERNAL
 
 ifdef MOZ_ENABLE_SKIA
 CPPSRCS	+= \
         SourceSurfaceSkia.cpp \
         DrawTargetSkia.cpp \
         PathSkia.cpp \
         ScaledFontFreetype.cpp
         $(NULL)
@@ -120,17 +120,17 @@ endif
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 CPPSRCS	+= \
         DrawTargetD2D.cpp \
         SourceSurfaceD2D.cpp \
         SourceSurfaceD2DTarget.cpp \
         PathD2D.cpp \
         ScaledFontDWrite.cpp \
         $(NULL)
-DEFINES += -DWIN32
+DEFINES += -DWIN32 -DINITGUID
 
 ifdef MOZ_ENABLE_SKIA
 CPPSRCS += \
         ScaledFontWin.cpp \
         $(NULL)
 endif
 endif
 
--- a/gfx/2d/Matrix.h
+++ b/gfx/2d/Matrix.h
@@ -78,17 +78,17 @@ public:
     Size retSize;
 
     retSize.width = aSize.width * _11 + aSize.height * _21;
     retSize.height = aSize.width * _12 + aSize.height * _22;
 
     return retSize;
   }
 
-  Rect TransformBounds(const Rect& rect) const;
+  GFX2D_API Rect TransformBounds(const Rect& rect) const;
 
   // Apply a scale to this matrix. This scale will be applied -before- the
   // existing transformation of the matrix.
   Matrix &Scale(Float aX, Float aY)
   {
     _11 *= aX;
     _12 *= aX;
     _21 *= aY;
@@ -133,17 +133,17 @@ public:
     return true;
   }
 
   Float Determinant() const
   {
     return _11 * _22 - _12 * _21;
   }
   
-  static Matrix Rotation(Float aAngle);
+  GFX2D_API static Matrix Rotation(Float aAngle);
 
   Matrix operator*(const Matrix &aMatrix) const
   {
     Matrix resultMatrix;
 
     resultMatrix._11 = this->_11 * aMatrix._11 + this->_12 * aMatrix._21;
     resultMatrix._12 = this->_11 * aMatrix._12 + this->_12 * aMatrix._22;
     resultMatrix._21 = this->_21 * aMatrix._11 + this->_22 * aMatrix._21;
--- a/gfx/2d/Types.h
+++ b/gfx/2d/Types.h
@@ -149,16 +149,26 @@ struct GradientStop
 
   Float offset;
   Color color;
 };
 
 }
 }
 
+#ifdef XP_WIN
+#ifdef GFX2D_INTERNAL
+#define GFX2D_API __declspec(dllexport)
+#else
+#define GFX2D_API __declspec(dllimport)
+#endif
+#else
+#define GFX2D_API
+#endif
+
 // Side constants for use in various places
 namespace mozilla {
   namespace css {
     enum Side {eSideTop, eSideRight, eSideBottom, eSideLeft};
   }
 }
 
 // XXX - These don't really belong here. But for now this is where they go.
--- a/layout/media/Makefile.in
+++ b/layout/media/Makefile.in
@@ -114,16 +114,20 @@ SHARED_LIBRARY_LIBS 	+= \
 	$(NULL)
 endif
 
 SHARED_LIBRARY_LIBS 	+= \
 	$(DEPTH)/gfx/angle/$(LIB_PREFIX)angle.$(LIB_SUFFIX) \
 	$(DEPTH)/parser/expat/lib/$(LIB_PREFIX)mozexpat_s.$(LIB_SUFFIX) \
 	$(NULL)
 
+SHARED_LIBRARY_LIBS 	+= \
+	$(DEPTH)/gfx/2d/$(LIB_PREFIX)gfx2d.$(LIB_SUFFIX) \
+	$(NULL)
+
 ifeq (WINNT,$(OS_TARGET))
 EXTRA_DSO_LDOPTS = $(MOZALLOC_LIB) $(NSPR_LIBS)
 
 # OTS uses uncompress2() from libz, so we need to link with this
 ifdef MOZ_NATIVE_ZLIB
 EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
 else
 EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -99,17 +99,16 @@ endif
 # dependent libraries
 STATIC_LIBS += \
   jsipc_s \
   domipc_s \
   domplugins_s \
   mozipc_s \
   mozipdlgen_s \
   ipcshell_s \
-  gfx2d \
   gfxipc_s \
   hal_s \
   dombindings_s \
   $(NULL)
 
 ifdef MOZ_B2G_RIL #{
 STATIC_LIBS += mozril_s
 endif #}