Bug 680082 - Add GetMaxTextureImageSize to correct size support for TiledTextureImage. r=matt.woodrow

--HG--
extra : rebase_source : e121a8718fa68e602794957bae278d7351d7d585
This commit is contained in:
Benoit Girard 2011-10-26 14:36:18 -07:00
parent 82bf6d0e6b
commit d8ebb72e62
4 changed files with 8 additions and 2 deletions

View File

@ -506,8 +506,8 @@ BasicBufferOGL::BeginPaint(ContentType aContentType,
if (result.mRegionToDraw.IsEmpty())
return result;
if (destBufferRect.width > gl()->GetMaxTextureSize() ||
destBufferRect.height > gl()->GetMaxTextureSize()) {
if (destBufferRect.width > gl()->GetMaxTextureImageSize() ||
destBufferRect.height > gl()->GetMaxTextureImageSize()) {
return result;
}

View File

@ -419,6 +419,7 @@ GLContext::InitWithPrefix(const char *prefix, bool trygl)
fGetIntegerv(LOCAL_GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
fGetIntegerv(LOCAL_GL_MAX_RENDERBUFFER_SIZE, &mMaxRenderbufferSize);
mMaxTextureImageSize = mMaxTextureSize;
UpdateActualFormat();
}

View File

@ -1258,6 +1258,7 @@ 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
@ -1397,6 +1398,7 @@ protected:
nsTArray<nsIntRect> mScissorStack;
GLint mMaxTextureSize;
GLint mMaxTextureImageSize;
GLint mMaxRenderbufferSize;
public:

View File

@ -726,6 +726,9 @@ public:
}
bool ok = InitWithPrefix("gl", true);
PR_STATIC_ASSERT(sizeof(GLint) >= sizeof(int32_t));
mMaxTextureImageSize = PR_INT32_MAX;
#if 0
if (ok) {
EGLint v;