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

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

Issue 1947373003: Fix unit test crash caused by OSMesa not supporting rendering to GL_ALPHA8 (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | src/gpu/gl/GrGLUtil.h » ('j') | 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 ebfbf6a065ad3f79641040dc81a3a5925cc301e7..9870a92c146343bcb9805b209e7714369fcd22ad 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -1586,8 +1586,11 @@ void GrGLCaps::initConfigTable(const GrGLContextInfo& ctxInfo, const GrGLInterfa
fConfigTable[kAlpha_8_GrPixelConfig].fFormats.fExternalType = GR_GL_UNSIGNED_BYTE;
fConfigTable[kAlpha_8_GrPixelConfig].fFormatType = kNormalizedFixedPoint_FormatType;
fConfigTable[kAlpha_8_GrPixelConfig].fFlags = ConfigInfo::kTextureable_Flag;
- if (this->textureRedSupport() || kDesktop_ARB_MSFBOType == this->msFBOType()) {
+ if (this->textureRedSupport() ||
+ (kDesktop_ARB_MSFBOType == this->msFBOType() &&
+ ctxInfo.renderer() != kOSMesa_GrGLRenderer)) {
// desktop ARB extension/3.0+ supports ALPHA8 as renderable.
+ // However, osmesa fails if it used even when GL_ARB_framebuffer_object is present.
// Core profile removes ALPHA8 support, but we should have chosen R8 in that case.
fConfigTable[kAlpha_8_GrPixelConfig].fFlags |= allRenderFlags;
}
« no previous file with comments | « no previous file | src/gpu/gl/GrGLUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698