Compiler says 'no'. r?jrmuizel draft
authorJeff Gilbert <jdashg@gmail.com>
Tue, 12 Apr 2016 14:06:17 -0700
changeset 350215 0b3d9934cfb787bf4936cb1b2e585bc664614979
parent 350214 8630f250874d3d8ae71a6780b0c59e7035287728
child 350216 37063aa5ac6e0eebecc65b0e0ab07cb1bd2975ad
push id15269
push userjgilbert@mozilla.com
push dateTue, 12 Apr 2016 23:26:24 +0000
reviewersjrmuizel
milestone48.0a1
Compiler says 'no'. r?jrmuizel From 649a327d8a82cb3b7339223174a787b6957ae2b8 Mon Sep 17 00:00:00 2001 --- gfx/gl/GLContextProviderCGL.mm | 3 ++- gfx/gl/GLContextProviderEAGL.mm | 3 ++- gfx/gl/GLContextProviderGLX.cpp | 3 ++- gfx/gl/GLContextProviderWGL.cpp | 5 +++-- 4 files changed, 9 insertions(+), 5 deletions(-) MozReview-Commit-ID: BwPMDJw2E7f
gfx/gl/GLContextProviderCGL.mm
gfx/gl/GLContextProviderEAGL.mm
gfx/gl/GLContextProviderGLX.cpp
gfx/gl/GLContextProviderWGL.cpp
--- a/gfx/gl/GLContextProviderCGL.mm
+++ b/gfx/gl/GLContextProviderCGL.mm
@@ -356,17 +356,18 @@ static RefPtr<GLContext> gGlobalContext;
 GLContext*
 GLContextProviderCGL::GetGlobalContext()
 {
     static bool triedToCreateContext = false;
     if (!triedToCreateContext) {
         triedToCreateContext = true;
 
         MOZ_RELEASE_ASSERT(!gGlobalContext);
-        gGlobalContext = CreateHeadless(0);
+        RefPtr<GLContext> temp = CreateHeadless(CreateContextFlags::NONE);
+        gGlobalContext = temp;
 
         if (!gGlobalContext) {
             NS_WARNING("Couldn't init gGlobalContext.");
         }
     }
 
     return gGlobalContext;
 }
--- a/gfx/gl/GLContextProviderEAGL.mm
+++ b/gfx/gl/GLContextProviderEAGL.mm
@@ -243,17 +243,18 @@ static RefPtr<GLContext> gGlobalContext;
 GLContext*
 GLContextProviderEAGL::GetGlobalContext()
 {
     static bool triedToCreateContext = false;
     if (!triedToCreateContext) {
         triedToCreateContext = true;
 
         MOZ_RELEASE_ASSERT(!gGlobalContext);
-        gGlobalContext = CreateHeadless(0);
+        RefPtr<GLContext> temp = CreateHeadless(CreateContextFlags::NONE);
+        gGlobalContext = temp;
 
         if (!gGlobalContext) {
             MOZ_CRASH("Failed to create global context");
         }
     }
 
     return gGlobalContext;
 }
--- a/gfx/gl/GLContextProviderGLX.cpp
+++ b/gfx/gl/GLContextProviderGLX.cpp
@@ -1327,17 +1327,18 @@ GLContextProviderGLX::GetGlobalContext()
     if (gfxEnv::DisableContextSharingGlx())
         return nullptr;
 
     static bool triedToCreateContext = false;
     if (!triedToCreateContext) {
         triedToCreateContext = true;
 
         MOZ_RELEASE_ASSERT(!gGlobalContext);
-        gGlobalContext = CreateHeadless(0);
+        RefPtr<GLContext> temp = CreateHeadless(CreateContextFlags::NONE);
+        gGlobalContext = temp;
     }
 
     return gGlobalContext;
 }
 
 /*static*/ void
 GLContextProviderGLX::Shutdown()
 {
--- a/gfx/gl/GLContextProviderWGL.cpp
+++ b/gfx/gl/GLContextProviderWGL.cpp
@@ -683,27 +683,28 @@ GLContextProviderWGL::CreateOffscreen(co
         return nullptr;
 
     if (!gl->InitOffscreen(size, minCaps))
         return nullptr;
 
     return gl.forget();
 }
 
-static StaticRefPtr<GLContextWGL> gGlobalContext;
+static StaticRefPtr<GLContext> gGlobalContext;
 
 /*static*/ GLContext*
 GLContextProviderWGL::GetGlobalContext()
 {
     static bool triedToCreateContext = false;
     if (!triedToCreateContext) {
         triedToCreateContext = true;
 
         MOZ_RELEASE_ASSERT(!gGlobalContext);
-        gGlobalContext = CreateHeadless(0);
+        RefPtr<GLContext> temp = CreateHeadless(CreateContextFlags::NONE);
+        gGlobalContext = temp;
     }
 
     return static_cast<GLContext*>(gGlobalContext);
 }
 
 /*static*/ void
 GLContextProviderWGL::Shutdown()
 {