From 76c3511501cd086bd8a57c190e04020059abd30d Mon Sep 17 00:00:00 2001 From: Benoit Girard Date: Thu, 27 Oct 2011 10:17:40 -0400 Subject: [PATCH] Bug 680082 - [backout] Add GetMaxTextureImageSize to correct size support for TiledTextureImage. --- gfx/layers/opengl/ThebesLayerOGL.cpp | 4 ++-- gfx/thebes/GLContext.cpp | 1 - gfx/thebes/GLContext.h | 2 -- gfx/thebes/GLContextProviderEGL.cpp | 3 --- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/gfx/layers/opengl/ThebesLayerOGL.cpp b/gfx/layers/opengl/ThebesLayerOGL.cpp index 4ecbfbf20ed2..4ad745511f24 100644 --- a/gfx/layers/opengl/ThebesLayerOGL.cpp +++ b/gfx/layers/opengl/ThebesLayerOGL.cpp @@ -506,8 +506,8 @@ BasicBufferOGL::BeginPaint(ContentType aContentType, if (result.mRegionToDraw.IsEmpty()) return result; - if (destBufferRect.width > gl()->GetMaxTextureImageSize() || - destBufferRect.height > gl()->GetMaxTextureImageSize()) { + if (destBufferRect.width > gl()->GetMaxTextureSize() || + destBufferRect.height > gl()->GetMaxTextureSize()) { return result; } diff --git a/gfx/thebes/GLContext.cpp b/gfx/thebes/GLContext.cpp index 28230140c782..ece01b1c8bd8 100644 --- a/gfx/thebes/GLContext.cpp +++ b/gfx/thebes/GLContext.cpp @@ -419,7 +419,6 @@ GLContext::InitWithPrefix(const char *prefix, bool trygl) fGetIntegerv(LOCAL_GL_MAX_TEXTURE_SIZE, &mMaxTextureSize); fGetIntegerv(LOCAL_GL_MAX_RENDERBUFFER_SIZE, &mMaxRenderbufferSize); - mMaxTextureImageSize = mMaxTextureSize; UpdateActualFormat(); } diff --git a/gfx/thebes/GLContext.h b/gfx/thebes/GLContext.h index 780a66815a1b..7fc219aaa81f 100644 --- a/gfx/thebes/GLContext.h +++ b/gfx/thebes/GLContext.h @@ -1258,7 +1258,6 @@ public: const char *extension); GLint GetMaxTextureSize() { return mMaxTextureSize; } - GLint GetMaxTextureImageSize() { return mMaxTextureImageSize; } void SetFlipped(bool aFlipped) { mFlipped = aFlipped; } // this should just be a std::bitset, but that ended up breaking @@ -1398,7 +1397,6 @@ protected: nsTArray mScissorStack; GLint mMaxTextureSize; - GLint mMaxTextureImageSize; GLint mMaxRenderbufferSize; public: diff --git a/gfx/thebes/GLContextProviderEGL.cpp b/gfx/thebes/GLContextProviderEGL.cpp index b0193d317e1c..83320c99e869 100644 --- a/gfx/thebes/GLContextProviderEGL.cpp +++ b/gfx/thebes/GLContextProviderEGL.cpp @@ -726,9 +726,6 @@ public: } bool ok = InitWithPrefix("gl", true); - - PR_STATIC_ASSERT(sizeof(GLint) >= sizeof(int32_t)); - mMaxTextureImageSize = INT32_MAX; #if 0 if (ok) { EGLint v;