Bug 683891: Stop exporting THEBES_API symbols from libxul. r=glandium
authorKyle Huey <khuey@kylehuey.com>
Fri, 06 Jan 2012 09:44:25 -0500
changeset 83895 7564c427cd9846de2243f546a5f01a9bc0565106
parent 83894 af6501ede37845e43374df21326ae8550696d053
child 83896 75ead35a1230f305804cae6da16f91d190e7cd2c
push id21809
push userkhuey@mozilla.com
push dateFri, 06 Jan 2012 14:45:07 +0000
treeherdermozilla-central@7564c427cd98 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs683891
milestone12.0a1
first release with
nightly win64
7564c427cd98 / 12.0a1 / 20120106081835 / files
nightly linux32
nightly linux64
nightly mac
nightly win32
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly win64
Bug 683891: Stop exporting THEBES_API symbols from libxul. r=glandium
gfx/thebes/gfxASurface.h
gfx/thebes/gfxTypes.h
--- a/gfx/thebes/gfxASurface.h
+++ b/gfx/thebes/gfxASurface.h
@@ -52,19 +52,34 @@ struct nsIntPoint;
 struct nsIntRect;
 
 /**
  * A surface is something you can draw on. Instantiate a subclass of this
  * abstract class, and use gfxContext to draw on this surface.
  */
 class THEBES_API gfxASurface {
 public:
+#ifdef MOZILLA_INTERNAL_API
     nsrefcnt AddRef(void);
     nsrefcnt Release(void);
 
+    // These functions exist so that browsercomps can refcount a gfxASurface
+    virtual nsresult AddRefExternal(void)
+    {
+      return AddRef();
+    }
+    virtual nsresult ReleaseExternal(void)
+    {
+      return Release();
+    }
+#else
+    virtual nsresult AddRef(void);
+    virtual nsresult Release(void);
+#endif
+
 public:
     /**
      * The format for an image surface. For all formats with alpha data, 0
      * means transparent, 1 or 255 means fully opaque.
      */
     typedef enum {
         ImageFormatARGB32, ///< ARGB data in native endianness, using premultiplied alpha
         ImageFormatRGB24,  ///< xRGB data in native endianness
--- a/gfx/thebes/gfxTypes.h
+++ b/gfx/thebes/gfxTypes.h
@@ -42,21 +42,17 @@
 #include "nsAtomicRefcnt.h"
 
 /**
  * Currently needs to be 'double' for Cairo compatibility. Could
  * become 'float', perhaps, in some configurations.
  */
 typedef double gfxFloat;
 
-#if defined(IMPL_THEBES)
-# define THEBES_API NS_EXPORT
-#else
-# define THEBES_API NS_IMPORT
-#endif
+# define THEBES_API
 
 /**
  * gfx errors
  */
 
 /* nsIDeviceContextSpec.h defines a set of printer errors  */
 #define NS_ERROR_GFX_GENERAL_BASE (50)