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 86337 7564c427cd9846de2243f546a5f01a9bc0565106
parent 86336 af6501ede37845e43374df21326ae8550696d053
child 86338 75ead35a1230f305804cae6da16f91d190e7cd2c
push idunknown
push userunknown
push dateunknown
reviewersglandium
bugs683891
milestone12.0a1
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)