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

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

Issue 769073003: skia: Prevent GL_RED from being used with MESA (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 6 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 414f06d6aebc14e6bc044c4b3a4625d3710ea5e0..b4ee4a640d6cada2215d66dd847c303ee451962e 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -178,20 +178,17 @@ bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
ctxInfo.hasExtension("GL_EXT_texture_storage");
}
- // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support it if
- // it doesn't have ARB_texture_rg extension.
- if (kGL_GrGLStandard == standard) {
- if (ctxInfo.isMesa()) {
- fTextureRedSupport = ctxInfo.hasExtension("GL_ARB_texture_rg");
- } else {
+ // ARB_texture_rg is part of OpenGL 3.0, but mesa doesn't support GL_RED
+ // and GL_RG on FBO textures.
+ if (!ctxInfo.isMesa()) {
+ if (kGL_GrGLStandard == standard) {
fTextureRedSupport = version >= GR_GL_VER(3,0) ||
ctxInfo.hasExtension("GL_ARB_texture_rg");
+ } else {
+ fTextureRedSupport = version >= GR_GL_VER(3,0) ||
+ ctxInfo.hasExtension("GL_EXT_texture_rg");
}
- } else {
- fTextureRedSupport = version >= GR_GL_VER(3,0) ||
- ctxInfo.hasExtension("GL_EXT_texture_rg");
}
-
fImagingSupport = kGL_GrGLStandard == standard &&
ctxInfo.hasExtension("GL_ARB_imaging");
« 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