Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Unified Diff: src/gpu/gl/GrGpuGL.cpp

Issue 14607003: This may potentially fix a chromium issue and shouldn't hurt, so if anyone agrees that this fix sho… (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGpuGL.cpp
===================================================================
--- src/gpu/gl/GrGpuGL.cpp (revision 8972)
+++ src/gpu/gl/GrGpuGL.cpp (working copy)
@@ -931,6 +931,11 @@
if (glTexDesc.fWidth > maxRTSize || glTexDesc.fHeight > maxRTSize) {
return return_null_texture();
}
+ } else {
sugoi1 2013/05/02 21:14:32 Since we were only checking texture sizes when cre
+ int maxSize = this->caps()->maxTextureSize();
+ if (glTexDesc.fWidth > maxSize || glTexDesc.fHeight > maxSize) {
+ return return_null_texture();
+ }
}
GL_CALL(GenTextures(1, &glTexDesc.fTextureID));
@@ -1004,8 +1009,8 @@
const GrGLuint kUnknownBitCount = GrGLStencilBuffer::kUnknownBitCount;
void inline get_stencil_rb_sizes(const GrGLInterface* gl,
- GrGLuint rb,
sugoi1 2013/05/02 21:14:32 Removed an unused parameter
GrGLStencilBuffer::Format* format) {
+
// we shouldn't ever know one size and not the other
GrAssert((kUnknownBitCount == format->fStencilBits) ==
(kUnknownBitCount == format->fTotalBits));
@@ -1071,7 +1076,7 @@
// 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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698