Bug 1136494 - Try to pull <windows.h> include out of GLContext.h. - r=mtseng draft
authorJeff Gilbert <jgilbert@mozilla.com>
Thu, 14 Jul 2016 11:54:48 -0700
changeset 387735 94e2abad05bd81a5c3b6c6f57fc102082a8b83bf
parent 387466 da8a989f65d1f4883f174bf07dff099104e7b3d4
child 387736 042f94ea1978d48e444c01d861316cbaf72a1aa0
push id23062
push userbmo:jgilbert@mozilla.com
push dateThu, 14 Jul 2016 19:33:51 +0000
reviewersmtseng
bugs1136494
milestone50.0a1
Bug 1136494 - Try to pull <windows.h> include out of GLContext.h. - r=mtseng MozReview-Commit-ID: 7LwGBIxUqxU
gfx/gl/GLContext.h
gfx/gl/GLLibraryLoader.cpp
gfx/gl/GLLibraryLoader.h
--- a/gfx/gl/GLContext.h
+++ b/gfx/gl/GLContext.h
@@ -14,20 +14,16 @@
 #include <map>
 #include <queue>
 #include <stack>
 
 #ifdef DEBUG
 #include <string.h>
 #endif
 
-#ifdef WIN32
-#include <windows.h>
-#endif
-
 #ifdef GetClassName
 #undef GetClassName
 #endif
 
 // Define MOZ_GL_DEBUG unconditionally to enable GL debugging in opt
 // builds.
 #ifdef DEBUG
 #define MOZ_GL_DEBUG 1
@@ -37,17 +33,16 @@
 #include "../../mfbt/RefPtr.h"
 #include "../../mfbt/UniquePtr.h"
 
 #include "GLDefs.h"
 #include "GLLibraryLoader.h"
 #include "nsISupportsImpl.h"
 #include "plstr.h"
 #include "GLContextTypes.h"
-//#include "GLTextureImage.h"
 #include "SurfaceTypes.h"
 #include "GLContextSymbols.h"
 #include "base/platform_thread.h"       // for PlatformThreadId
 #include "mozilla/GenericRefCounted.h"
 #include "gfx2DGlue.h"
 #include "GeckoProfiler.h"
 
 class nsIWidget;
--- a/gfx/gl/GLLibraryLoader.cpp
+++ b/gfx/gl/GLLibraryLoader.cpp
@@ -1,16 +1,20 @@
 /* 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/. */
 
 #include "GLLibraryLoader.h"
 
 #include "nsDebug.h"
 
+#ifdef WIN32
+#include <windows.h>
+#endif
+
 namespace mozilla {
 namespace gl {
 
 bool
 GLLibraryLoader::OpenLibrary(const char* library)
 {
     PRLibSpec lspec;
     lspec.type = PR_LibSpec_Pathname;
--- a/gfx/gl/GLLibraryLoader.h
+++ b/gfx/gl/GLLibraryLoader.h
@@ -2,20 +2,16 @@
  * 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/. */
 
 #ifndef GLLIBRARYLOADER_H_
 #define GLLIBRARYLOADER_H_
 
 #include <stdio.h>
 
-#ifdef WIN32
-#include <windows.h>
-#endif
-
 #include "GLDefs.h"
 #include "nscore.h"
 #include "prlink.h"
 
 namespace mozilla {
 namespace gl {
 
 class GLLibraryLoader