aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLCaps.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-05-23 07:43:48 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-23 12:45:21 +0000
commit92de631edd3eb9b3430332d1f1d566e903ea2ea9 (patch)
tree47117268c4a5fb3065ef4be5a21eb3c5c0b401b2 /src/gpu/gl/GrGLCaps.cpp
parent8ca3356290323ed7eb42611b867fff90c239eb39 (diff)
Remove compressed (ETC1) texture support from Ganesh (take 2)
Reland of https://skia-review.googlesource.com/c/17456/ (Remove compressed (ETC1) texture support from Ganesh) but w/o removing third_part\etc1 files TBR=bsalomon@google.com Change-Id: I8ec4b7e3ddf47d213cb24c382731c050ffb8847f Reviewed-on: https://skia-review.googlesource.com/17700 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index f4e50628d0..b9eee088e0 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -1344,15 +1344,6 @@ bool GrGLCaps::getTexImageFormats(GrPixelConfig surfaceConfig, GrPixelConfig ext
return true;
}
-bool GrGLCaps::getCompressedTexImageFormats(GrPixelConfig surfaceConfig,
- GrGLenum* internalFormat) const {
- if (!GrPixelConfigIsCompressed(surfaceConfig)) {
- return false;
- }
- *internalFormat = fConfigTable[surfaceConfig].fFormats.fInternalFormatTexImage;
- return true;
-}
-
bool GrGLCaps::getReadPixelsFormat(GrPixelConfig surfaceConfig, GrPixelConfig externalConfig,
GrGLenum* externalFormat, GrGLenum* externalType) const {
if (!this->getExternalFormat(surfaceConfig, externalConfig, kOther_ExternalFormatUsage,
@@ -1363,9 +1354,6 @@ bool GrGLCaps::getReadPixelsFormat(GrPixelConfig surfaceConfig, GrPixelConfig ex
}
bool GrGLCaps::getRenderbufferFormat(GrPixelConfig config, GrGLenum* internalFormat) const {
- if (GrPixelConfigIsCompressed(config)) {
- return false;
- }
*internalFormat = fConfigTable[config].fFormats.fInternalFormatRenderbuffer;
return true;
}
@@ -1374,9 +1362,6 @@ bool GrGLCaps::getExternalFormat(GrPixelConfig surfaceConfig, GrPixelConfig memo
ExternalFormatUsage usage, GrGLenum* externalFormat,
GrGLenum* externalType) const {
SkASSERT(externalFormat && externalType);
- if (GrPixelConfigIsCompressed(memoryConfig)) {
- return false;
- }
bool surfaceIsAlphaOnly = GrPixelConfigIsAlphaOnly(surfaceConfig);
bool memoryIsAlphaOnly = GrPixelConfigIsAlphaOnly(memoryConfig);
@@ -1926,39 +1911,6 @@ void GrGLCaps::initConfigTable(const GrContextOptions& contextOptions,
}
fConfigTable[kRGBA_half_GrPixelConfig].fSwizzle = GrSwizzle::RGBA();
- // Compressed texture support
-
- // glCompressedTexImage2D is available on all OpenGL ES devices. It is available on standard
- // OpenGL after version 1.3. We'll assume at least that level of OpenGL support.
-
- // TODO: Fix command buffer bindings and remove this.
- fCompressedTexSubImageSupport = SkToBool(gli->fFunctions.fCompressedTexSubImage2D);
-
- // No sized/unsized internal format distinction for compressed formats, no external format.
- // Below we set the external formats and types to 0.
- {
- fConfigTable[kETC1_GrPixelConfig].fFormats.fBaseInternalFormat = GR_GL_COMPRESSED_ETC1_RGB8;
- fConfigTable[kETC1_GrPixelConfig].fFormats.fSizedInternalFormat =
- GR_GL_COMPRESSED_ETC1_RGB8;
- fConfigTable[kETC1_GrPixelConfig].fFormats.fExternalFormat[kOther_ExternalFormatUsage] = 0;
- fConfigTable[kETC1_GrPixelConfig].fFormats.fExternalType = 0;
- fConfigTable[kETC1_GrPixelConfig].fFormatType = kNormalizedFixedPoint_FormatType;
- if (kGL_GrGLStandard == standard) {
- if (version >= GR_GL_VER(4, 3) || ctxInfo.hasExtension("GL_ARB_ES3_compatibility")) {
- fConfigTable[kETC1_GrPixelConfig].fFlags = ConfigInfo::kTextureable_Flag;
- }
- } else {
- if (version >= GR_GL_VER(3, 0) ||
- ctxInfo.hasExtension("GL_OES_compressed_ETC1_RGB8_texture") ||
- // ETC2 is a superset of ETC1, so we can just check for that, too.
- (ctxInfo.hasExtension("GL_OES_compressed_ETC2_RGB8_texture") &&
- ctxInfo.hasExtension("GL_OES_compressed_ETC2_RGBA8_texture"))) {
- fConfigTable[kETC1_GrPixelConfig].fFlags = ConfigInfo::kTextureable_Flag;
- }
- }
- fConfigTable[kETC1_GrPixelConfig].fSwizzle = GrSwizzle::RGBA();
- }
-
// Bulk populate the texture internal/external formats here and then deal with exceptions below.
// ES 2.0 requires that the internal/external formats match.