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

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

Issue 937303002: Round stencil buffers dims up to next pow2 when allowed (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « src/gpu/GrGpu.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 6d8b4bab25470e0fd8c221ec417653c421474a30..1f50f8d1e18a6be82b834529ecadee5b6af431f6 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);
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698