aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-11 19:54:04 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-11 19:54:04 +0000
commit7aaee005fa2b219bb74c9c050936042e8c9bde6e (patch)
tree11b2fbe48e265ab6188e3ffe3e71013285463956 /gpu/src
parent9f2f0a84d5a1b7c67c1d2a253bc2d7ee6f3f4625 (diff)
Use min of max_texture and max_renderbuffer size when calling fbo_test
git-svn-id: http://skia.googlecode.com/svn/trunk@1110 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src')
-rw-r--r--gpu/src/GrGpuGL.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/gpu/src/GrGpuGL.cpp b/gpu/src/GrGpuGL.cpp
index e62949b14c..7e88edeffd 100644
--- a/gpu/src/GrGpuGL.cpp
+++ b/gpu/src/GrGpuGL.cpp
@@ -407,6 +407,8 @@ GrGpuGL::GrGpuGL() {
}
}
+ GR_GL_GetIntegerv(GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureDimension);
+
/* The iPhone 4 has a restriction that for an FBO with texture color
attachment with height <= 8 then the width must be <= height. Here
we look for such a limitation.
@@ -414,6 +416,8 @@ GrGpuGL::GrGpuGL() {
fMinRenderTargetHeight = GR_INVAL_GLINT;
GrGLint maxRenderSize;
GR_GL_GetIntegerv(GR_GL_MAX_RENDERBUFFER_SIZE, &maxRenderSize);
+ // fbo_test creates FBOs with texture bound to the color attachment
+ maxRenderSize = GrMin(maxRenderSize, fMaxTextureDimension);
if (gPrintStartupSpew) {
GrPrintf("Small height FBO texture experiments\n");
@@ -456,8 +460,6 @@ GrGpuGL::GrGpuGL() {
}
}
GrAssert(GR_INVAL_GLINT != fMinRenderTargetWidth);
-
- GR_GL_GetIntegerv(GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureDimension);
}
GrGpuGL::~GrGpuGL() {