From 1a199e96f47bf9424bdf700eb3a91374e171fe9c Mon Sep 17 00:00:00 2001 From: Milan Sreckovic Date: Wed, 6 Mar 2013 09:34:35 -0500 Subject: [PATCH] Bug 848023 - Put back the override of fGetIntegerv for max texture sizes. r=bjacob --- gfx/gl/GLContext.h | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/gfx/gl/GLContext.h b/gfx/gl/GLContext.h index f49962a773c..db65bff6ea0 100644 --- a/gfx/gl/GLContext.h +++ b/gfx/gl/GLContext.h @@ -548,22 +548,40 @@ public: } void fGetIntegerv(GLenum pname, GLint *params) { - if (!mScreen) { - raw_fGetIntegerv(pname, params); - return; - } - switch (pname) { // LOCAL_GL_FRAMEBUFFER_BINDING is equal to // LOCAL_GL_DRAW_FRAMEBUFFER_BINDING_EXT, // so we don't need two cases. case LOCAL_GL_DRAW_FRAMEBUFFER_BINDING_EXT: - *params = mScreen->GetDrawFB(); + if (mScreen) { + *params = mScreen->GetDrawFB(); + } else { + raw_fGetIntegerv(pname, params); + } break; case LOCAL_GL_READ_FRAMEBUFFER_BINDING_EXT: - *params = mScreen->GetReadFB(); + if (mScreen) { + *params = mScreen->GetReadFB(); + } else { + raw_fGetIntegerv(pname, params); + } + break; + + case LOCAL_GL_MAX_TEXTURE_SIZE: + MOZ_ASSERT(mMaxTextureSize>0); + *params = mMaxTextureSize; + break; + + case LOCAL_GL_MAX_CUBE_MAP_TEXTURE_SIZE: + MOZ_ASSERT(mMaxCubeMapTextureSize>0); + *params = mMaxCubeMapTextureSize; + break; + + case LOCAL_GL_MAX_RENDERBUFFER_SIZE: + MOZ_ASSERT(mMaxRenderbufferSize>0); + *params = mMaxRenderbufferSize; break; default: