diff options
author | bsalomon <bsalomon@google.com> | 2015-02-20 06:58:13 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-20 06:58:14 -0800 |
commit | d08ea5fdae990ee7829e3755abddfab9740eab99 (patch) | |
tree | 2c21b24822b5018c6d5ee7c902d987616ef7a60d /src/gpu/gl/GrGLCaps.cpp | |
parent | 04e4d08556750ff6be4576a4cd4925964c63376f (diff) |
Round stencil buffers dims up to next pow2 when allowed
Review URL: https://codereview.chromium.org/937303002
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 6d8b4bab25..1f50f8d1e1 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -407,6 +407,19 @@ bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { fUseDrawInsteadOfClear = true; } + if (kGL_GrGLStandard == standard) { + // ARB allows mixed size FBO attachments, EXT does not. + if (ctxInfo.version() >= GR_GL_VER(3, 0) || + ctxInfo.hasExtension("GL_ARB_framebuffer_object")) { + fOversizedStencilSupport = true; + } else { + SkASSERT(ctxInfo.hasExtension("GL_EXT_framebuffer_object")); + } + } else { + // ES 3.0 supports mixed size FBO attachments, 2.0 does not. + fOversizedStencilSupport = ctxInfo.version() >= GR_GL_VER(3, 0); + } + this->initConfigTexturableTable(ctxInfo, gli); this->initConfigRenderableTable(ctxInfo); |