From d44febb3ea728f1b328e20e7ef82bf612e8e5620 Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Thu, 23 Jun 2011 19:01:17 -0700 Subject: [PATCH] Bug 665622 - Fix unused variable warnings in GLContext.cpp & GLContextProviderEGL.cpp; r=joedrew --- gfx/thebes/GLContext.cpp | 4 +++- gfx/thebes/GLContextProviderEGL.cpp | 11 +++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/gfx/thebes/GLContext.cpp b/gfx/thebes/GLContext.cpp index 842c82a0cd3..e648ce587af 100644 --- a/gfx/thebes/GLContext.cpp +++ b/gfx/thebes/GLContext.cpp @@ -53,6 +53,8 @@ #include "gfxCrashReporterUtils.h" +#include "mozilla/Util.h" // for DebugOnly + namespace mozilla { namespace gl { @@ -1777,7 +1779,7 @@ GLContext::SetBlitFramebufferForDestTexture(GLuint aTexture) 0); if (aTexture) { - GLenum status = fCheckFramebufferStatus(LOCAL_GL_FRAMEBUFFER); + DebugOnly status = fCheckFramebufferStatus(LOCAL_GL_FRAMEBUFFER); // Note: if you are hitting this assertion, it is likely that // your texture is not texture complete -- that is, you diff --git a/gfx/thebes/GLContextProviderEGL.cpp b/gfx/thebes/GLContextProviderEGL.cpp index b70ba3f6cab..5445ff95eb0 100644 --- a/gfx/thebes/GLContextProviderEGL.cpp +++ b/gfx/thebes/GLContextProviderEGL.cpp @@ -1767,7 +1767,6 @@ GetVendor() already_AddRefed GLContextProviderEGL::CreateForWindow(nsIWidget *aWidget) { - EGLContext context; EGLConfig config; if (!sEGLLibrary.EnsureInitialized()) { @@ -2164,14 +2163,13 @@ ContentTypeToGLFormat(gfxASurface::gfxContentType aCType) already_AddRefed GLContextProviderEGL::CreateForNativePixmapSurface(gfxASurface* aSurface) { - EGLSurface surface = nsnull; - EGLContext context = nsnull; - EGLConfig config = nsnull; - if (!sEGLLibrary.EnsureInitialized()) return nsnull; #ifdef MOZ_X11 + EGLSurface surface = nsnull; + EGLConfig config = nsnull; + if (aSurface->GetType() != gfxASurface::SurfaceTypeXlib) { // Not implemented return nsnull; @@ -2193,9 +2191,6 @@ GLContextProviderEGL::CreateForNativePixmapSurface(gfxASurface* aSurface) return glContext.forget().get(); #else - (void)surface; - (void)context; - // Not implemented return nsnull; #endif