Backed out changeset 07f3cfaa7900 (bug 958596) for build failures on Windows
authorEd Morley <emorley@mozilla.com>
Tue, 25 Feb 2014 17:17:47 +0000
changeset 181527 ecfb4d63943ffb954278c1ef50b4d8890aab72ed
parent 181526 a442f3946ac35d17424dd88c93241b6d508424d0
child 181528 15869165b0aaa87856c525bf2c59bc0cbd5e0bc5
push id5439
push userffxbld
push dateMon, 17 Mar 2014 23:08:15 +0000
treeherdermozilla-aurora@c0befb3c8038 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs958596
milestone30.0a1
backs out07f3cfaa79004858f4466a71b0b83f2ed035e472
Backed out changeset 07f3cfaa7900 (bug 958596) for build failures on Windows
configure.in
gfx/2d/Factory.cpp
gfx/2d/Logging.h
gfx/2d/Rect.h
gfx/2d/Types.h
gfx/2d/moz.build
--- a/configure.in
+++ b/configure.in
@@ -7714,17 +7714,16 @@ dnl =
 dnl ========================================================
 MOZ_ARG_HEADER(Static build options)
 
 AC_SUBST(LIBXUL_LIBS)
 XPCOM_LIBS="$LIBXUL_LIBS"
 
 if test "$OS_ARCH" = "WINNT"; then
   GKMEDIAS_SHARED_LIBRARY=1
-  AC_DEFINE(GKMEDIAS_SHARED_LIBRARY)
 fi
 AC_SUBST(GKMEDIAS_SHARED_LIBRARY)
 
 if test -z "$MOZ_NATIVE_ZLIB"; then
 if test -n "$JS_SHARED_LIBRARY" -o "$GKMEDIAS_SHARED_LIBRARY"; then
   ZLIB_IN_MOZGLUE=1
   AC_DEFINE(ZLIB_IN_MOZGLUE)
 fi
--- a/gfx/2d/Factory.cpp
+++ b/gfx/2d/Factory.cpp
@@ -48,17 +48,17 @@
 #include "SourceSurfaceRawData.h"
 
 #include "DrawEventRecorder.h"
 
 #include "Logging.h"
 
 #include "mozilla/CheckedInt.h"
 
-#if defined(DEBUG) || defined(PR_LOGGING)
+#ifdef PR_LOGGING
 PRLogModuleInfo *
 GetGFX2DLog()
 {
   static PRLogModuleInfo *sLog;
   if (!sLog)
     sLog = PR_NewLogModule("gfx2d");
   return sLog;
 }
@@ -151,17 +151,17 @@ HasCPUIDBit(unsigned int level, CPUIDReg
 }
 #endif
 #endif
 
 namespace mozilla {
 namespace gfx {
 
 // XXX - Need to define an API to set this.
-GFX2D_API int sGfxLogLevel = LOG_DEBUG;
+int sGfxLogLevel = LOG_DEBUG;
 
 #ifdef WIN32
 ID3D10Device1 *Factory::mD3D10Device;
 #ifdef USE_D2D1_1
 ID3D11Device *Factory::mD3D11Device;
 ID2D1Device *Factory::mD2D1Device;
 #endif
 #endif
--- a/gfx/2d/Logging.h
+++ b/gfx/2d/Logging.h
@@ -9,53 +9,46 @@
 #include <string>
 #include <sstream>
 #include <stdio.h>
 
 #include "Point.h"
 #include "Matrix.h"
 
 #ifdef WIN32
-// This file gets included from nsGlobalWindow.cpp, which doesn't like
-// having windows.h included in it. Since OutputDebugStringA is the only
-// thing we need from windows.h, we just declare it here directly.
-// Note: the function's documented signature is
-//  WINBASEAPI void WINAPI OutputDebugStringA(LPCSTR lpOutputString)
-// but if we don't include windows.h, the macros WINBASEAPI, WINAPI, and 
-// LPCSTR are not defined, so we need to replace them with their expansions.
-extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA(const char* lpOutputString);
+#include <windows.h>
 #endif
 
-#if defined(DEBUG) || defined(PR_LOGGING)
+#ifdef PR_LOGGING
 #include <prlog.h>
 
 extern PRLogModuleInfo *GetGFX2DLog();
 #endif
 
 namespace mozilla {
 namespace gfx {
 
 const int LOG_DEBUG = 1;
 const int LOG_WARNING = 2;
 
-#if defined(DEBUG) || defined(PR_LOGGING)
+#ifdef PR_LOGGING
 
 inline PRLogModuleLevel PRLogLevelForLevel(int aLevel) {
   switch (aLevel) {
   case LOG_DEBUG:
     return PR_LOG_DEBUG;
   case LOG_WARNING:
     return PR_LOG_WARNING;
   }
   return PR_LOG_DEBUG;
 }
 
 #endif
 
-extern GFX2D_API int sGfxLogLevel;
+extern int sGfxLogLevel;
 
 static inline void OutputMessage(const std::string &aString, int aLevel) {
 #if defined(WIN32) && !defined(PR_LOGGING)
   if (aLevel >= sGfxLogLevel) {
     ::OutputDebugStringA(aString.c_str());
   }
 #elif defined(PR_LOGGING)
   if (PR_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
--- a/gfx/2d/Rect.h
+++ b/gfx/2d/Rect.h
@@ -92,17 +92,17 @@ struct RectTyped :
     RectTyped(const PointTyped<units>& aPos, const SizeTyped<units>& aSize) :
         Super(aPos, aSize) {}
     RectTyped(Float _x, Float _y, Float _width, Float _height) :
         Super(_x, _y, _width, _height) {}
     explicit RectTyped(const IntRectTyped<units>& rect) :
         Super(float(rect.x), float(rect.y),
               float(rect.width), float(rect.height)) {}
 
-    void NudgeToIntegers()
+    GFX2D_API void NudgeToIntegers()
     {
       NudgeToInteger(&(this->x));
       NudgeToInteger(&(this->y));
       NudgeToInteger(&(this->width));
       NudgeToInteger(&(this->height));
     }
 
     bool ToIntRect(IntRectTyped<units> *aOut) const
--- a/gfx/2d/Types.h
+++ b/gfx/2d/Types.h
@@ -241,17 +241,17 @@ struct GradientStop
 
   Float offset;
   Color color;
 };
 
 }
 }
 
-#if defined(XP_WIN) && defined(GKMEDIAS_SHARED_LIBRARY)
+#if defined(XP_WIN) && defined(MOZ_GFX)
 #ifdef GFX2D_INTERNAL
 #define GFX2D_API __declspec(dllexport)
 #else
 #define GFX2D_API __declspec(dllimport)
 #endif
 #else
 #define GFX2D_API
 #endif
--- a/gfx/2d/moz.build
+++ b/gfx/2d/moz.build
@@ -16,17 +16,16 @@ EXPORTS.mozilla.gfx += [
     'BasePoint4D.h',
     'BaseRect.h',
     'BaseSize.h',
     'Blur.h',
     'BorrowedContext.h',
     'DataSurfaceHelpers.h',
     'Filters.h',
     'Helpers.h',
-    'Logging.h',
     'Matrix.h',
     'PathHelpers.h',
     'Point.h',
     'Rect.h',
     'Scale.h',
     'ScaleFactor.h',
     'Tools.h',
     'Types.h',