Round stencil buffers dims up to next pow2 when allowed
Review URL: https://codereview.chromium.org/937303002
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 6d8b4ba..1f50f8d 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -407,6 +407,19 @@
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);