if (glTexDesc.fWidth > maxRTSize || glTexDesc.fHeight > maxRTSize) {
return return_null_texture();
}
+ } else {
+ int maxSize = this->caps()->maxTextureSize();
+ if (glTexDesc.fWidth > maxSize || glTexDesc.fHeight > maxSize) {
+ return return_null_texture();
+ }
}
GL_CALL(GenTextures(1, &glTexDesc.fTextureID));
const GrGLuint kUnknownBitCount = GrGLStencilBuffer::kUnknownBitCount;
void inline get_stencil_rb_sizes(const GrGLInterface* gl,
- GrGLuint rb,
GrGLStencilBuffer::Format* format) {
+
// we shouldn't ever know one size and not the other
GrAssert((kUnknownBitCount == format->fStencilBits) ==
(kUnknownBitCount == format->fTotalBits));
// After sized formats we attempt an unsized format and take
// whatever sizes GL gives us. In that case we query for the size.
GrGLStencilBuffer::Format format = sFmt;
- get_stencil_rb_sizes(this->glInterface(), sbID, &format);
+ get_stencil_rb_sizes(this->glInterface(), &format);
static const bool kIsWrapped = false;
SkAutoTUnref<GrStencilBuffer> sb(SkNEW_ARGS(GrGLStencilBuffer,
(this, kIsWrapped, sbID, width, height,