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

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

Issue 806943002: Change desktop and ES 3.0 to always use sized internal texture formats. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add check for ES2 compatibility. 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
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 8b26282968ba8bb4ea91371ee05c6b464d3dca2b..7c00638fa798c6ec7e091c57e87ecb185a6d6c73 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -44,6 +44,7 @@ void GrGLCaps::reset() {
fTwoFormatLimit = false;
fFragCoordsConventionSupport = false;
fVertexArrayObjectSupport = false;
+ fES2CompatibilitySupport = false;
fUseNonVBOVertexAndIndexDynamicData = false;
fIsCoreProfile = false;
fFullClearIsFree = false;
@@ -86,6 +87,7 @@ GrGLCaps& GrGLCaps::operator= (const GrGLCaps& caps) {
fTwoFormatLimit = caps.fTwoFormatLimit;
fFragCoordsConventionSupport = caps.fFragCoordsConventionSupport;
fVertexArrayObjectSupport = caps.fVertexArrayObjectSupport;
+ fES2CompatibilitySupport = caps.fES2CompatibilitySupport;
fUseNonVBOVertexAndIndexDynamicData = caps.fUseNonVBOVertexAndIndexDynamicData;
fIsCoreProfile = caps.fIsCoreProfile;
fFullClearIsFree = caps.fFullClearIsFree;
@@ -239,6 +241,13 @@ bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
ctxInfo.hasExtension("GL_OES_vertex_array_object");
}
+ if (kGL_GrGLStandard == standard) {
+ fES2CompatibilitySupport = ctxInfo.hasExtension("GL_ARB_ES2_compatibility");
+ }
+ else {
+ fES2CompatibilitySupport = true;
+ }
+
if (kGLES_GrGLStandard == standard) {
if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) {
fFBFetchSupport = true;
@@ -511,7 +520,8 @@ void GrGLCaps::initConfigTexturableTable(const GrGLContextInfo& ctxInfo, const G
// Base texture support
fConfigTextureSupport[kAlpha_8_GrPixelConfig] = true;
- fConfigTextureSupport[kRGB_565_GrPixelConfig] = true;
+ fConfigTextureSupport[kRGB_565_GrPixelConfig] = (kGL_GrGLStandard != standard ||
+ fES2CompatibilitySupport);
fConfigTextureSupport[kRGBA_4444_GrPixelConfig] = true;
fConfigTextureSupport[kRGBA_8888_GrPixelConfig] = true;
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGpuGL.cpp » ('j') | src/gpu/gl/GrGpuGL.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698