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

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

Issue 1531283002: Don't allow BGRA rendertargets on iOS w/ES 3.0+. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years 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 | « no previous file | 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 a7e957cf4d1d1fb60c4efe0feb7515ba5d835555..a1e2bad469b8089150ac1664a1de89059a66f448 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -730,15 +730,19 @@ void GrGLCaps::initConfigRenderableTable(const GrGLContextInfo& ctxInfo, bool sr
}
if (this->isConfigTexturable(kBGRA_8888_GrPixelConfig)) {
- fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kNo_MSAA] = true;
- // The GL_EXT_texture_format_BGRA8888 extension does not add BGRA to the list of
- // configs that are color-renderable and can be passed to glRenderBufferStorageMultisample.
- // Chromium may have an extension to allow BGRA renderbuffers to work on desktop platforms.
- if (ctxInfo.hasExtension("GL_CHROMIUM_renderbuffer_format_BGRA8888")) {
- fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] = true;
- } else {
- fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] =
- !fBGRAIsInternalFormat || !this->usesMSAARenderBuffers();
+ // On iOS, BGRA is not supported as a renderable target on ES 3.0+
+ if (!ctxInfo.hasExtension("GL_APPLE_texture_format_BGRA8888") ||
+ ctxInfo.version() < GR_GL_VER(3,0)) {
+ fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kNo_MSAA] = true;
+ // The GL_EXT_texture_format_BGRA8888 extension does not add BGRA to the list of
+ // configs that are color-renderable and can be passed to glRenderBufferStorageMultisample.
+ // Chromium may have an extension to allow BGRA renderbuffers to work on desktop platforms.
+ if (ctxInfo.hasExtension("GL_CHROMIUM_renderbuffer_format_BGRA8888")) {
+ fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] = true;
+ } else {
+ fConfigRenderSupport[kBGRA_8888_GrPixelConfig][kYes_MSAA] =
+ !fBGRAIsInternalFormat || !this->usesMSAARenderBuffers();
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698