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

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

Issue 811133002: Re-enable default sized formats, handling BGRA exception. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase to ToT (ignore, wrong changelist) 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 | src/gpu/gl/GrGpuGL.cpp » ('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 c1eb6e10e254020ad96955596a169e59cd7e9910..cfb9558c76cdf41af061f12820e32490d09c3894 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -497,10 +497,17 @@ void GrGLCaps::initConfigRenderableTable(const GrGLContextInfo& ctxInfo) {
if (kGL_GrGLStandard == standard) {
fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = true;
fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = true;
+ } else if (ctxInfo.version() >= GR_GL_VER(3,0)) {
+ fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = true;
+ // for now we don't support floating point MSAA on ES
+ fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = false;
} else {
- // in theory, check for "GL_EXT_color_buffer_half_float"
- // for now we don't support half float alpha render target on ES
- fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = false;
+ if (ctxInfo.hasExtension("GL_EXT_color_buffer_half_float") && fTextureRedSupport) {
+ fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = true;
+ } else {
+ fConfigRenderSupport[kAlpha_half_GrPixelConfig][kNo_MSAA] = false;
+ }
+ // for now we don't support floating point MSAA on ES
fConfigRenderSupport[kAlpha_half_GrPixelConfig][kYes_MSAA] = false;
}
}
@@ -649,10 +656,10 @@ void GrGLCaps::initConfigTexturableTable(const GrGLContextInfo& ctxInfo, const G
bool hasHalfFPTextures = version >= GR_GL_VER(3, 1);
if (!hasHalfFPTextures) {
hasHalfFPTextures = ctxInfo.hasExtension("GL_ARB_texture_float") ||
- (ctxInfo.hasExtension("GL_OES_texture_half_float_linear") &&
- ctxInfo.hasExtension("GL_OES_texture_half_float"));
+ (ctxInfo.hasExtension("GL_OES_texture_half_float_linear") &&
+ ctxInfo.hasExtension("GL_OES_texture_half_float"));
}
- fConfigTextureSupport[kAlpha_half_GrPixelConfig] = hasHalfFPTextures && fTextureRedSupport;
+ fConfigTextureSupport[kAlpha_half_GrPixelConfig] = hasHalfFPTextures;
}
bool GrGLCaps::doReadPixelsSupported(const GrGLInterface* intf,
« no previous file with comments | « no previous file | src/gpu/gl/GrGpuGL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698