diff options
author | 2012-04-27 14:25:44 +0000 | |
---|---|---|
committer | 2012-04-27 14:25:44 +0000 | |
commit | f6b070da5e337d13bd08ca488a0140d8facef8b8 (patch) | |
tree | 15d753d5f84c684a482b389a8d61ba16c745e3cf /src/gpu/gl/GrGpuGL.cpp | |
parent | e9b087e958f3c165a5ac271d3abfb83bdb4c1b9d (diff) |
Clamp requested MSAA sample count to GL_MAX_SAMPLES
Review URL: http://codereview.appspot.com/6135044/
git-svn-id: http://skia.googlecode.com/svn/trunk@3777 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl/GrGpuGL.cpp')
-rw-r--r-- | src/gpu/gl/GrGpuGL.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp index a9b345bdba..9abd01c966 100644 --- a/src/gpu/gl/GrGpuGL.cpp +++ b/src/gpu/gl/GrGpuGL.cpp @@ -866,6 +866,8 @@ bool renderbuffer_storage_msaa(GrGLContextInfo& ctxInfo, created = (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctxInfo.interface())); } if (!created) { + // glRBMS will fail if requested samples is > max samples. + sampleCount = GrMin(sampleCount, ctxInfo.caps().maxSampleCount()); GL_ALLOC_CALL(ctxInfo.interface(), RenderbufferStorageMultisample(GR_GL_RENDERBUFFER, sampleCount, |