| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 | 8 |
| 9 #include "GrGLCaps.h" | 9 #include "GrGLCaps.h" |
| 10 | 10 |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 bool srgbSupport) { | 701 bool srgbSupport) { |
| 702 GrGLStandard standard = ctxInfo.standard(); | 702 GrGLStandard standard = ctxInfo.standard(); |
| 703 GrGLVersion version = ctxInfo.version(); | 703 GrGLVersion version = ctxInfo.version(); |
| 704 | 704 |
| 705 // Base texture support | 705 // Base texture support |
| 706 fConfigTextureSupport[kAlpha_8_GrPixelConfig] = true; | 706 fConfigTextureSupport[kAlpha_8_GrPixelConfig] = true; |
| 707 fConfigTextureSupport[kRGB_565_GrPixelConfig] = true; | 707 fConfigTextureSupport[kRGB_565_GrPixelConfig] = true; |
| 708 fConfigTextureSupport[kRGBA_4444_GrPixelConfig] = true; | 708 fConfigTextureSupport[kRGBA_4444_GrPixelConfig] = true; |
| 709 fConfigTextureSupport[kRGBA_8888_GrPixelConfig] = true; | 709 fConfigTextureSupport[kRGBA_8888_GrPixelConfig] = true; |
| 710 | 710 |
| 711 // Check for 8-bit palette.. | 711 // Disable this for now, while we investigate skbug.com/4333 |
| 712 GrGLint numFormats; | 712 if (false) { |
| 713 GR_GL_GetIntegerv(gli, GR_GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numFormats); | 713 // Check for 8-bit palette.. |
| 714 if (numFormats) { | 714 GrGLint numFormats; |
| 715 SkAutoSTMalloc<10, GrGLint> formats(numFormats); | 715 GR_GL_GetIntegerv(gli, GR_GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numFormats
); |
| 716 GR_GL_GetIntegerv(gli, GR_GL_COMPRESSED_TEXTURE_FORMATS, formats); | 716 if (numFormats) { |
| 717 for (int i = 0; i < numFormats; ++i) { | 717 SkAutoSTMalloc<10, GrGLint> formats(numFormats); |
| 718 if (GR_GL_PALETTE8_RGBA8 == formats[i]) { | 718 GR_GL_GetIntegerv(gli, GR_GL_COMPRESSED_TEXTURE_FORMATS, formats); |
| 719 fConfigTextureSupport[kIndex_8_GrPixelConfig] = true; | 719 for (int i = 0; i < numFormats; ++i) { |
| 720 break; | 720 if (GR_GL_PALETTE8_RGBA8 == formats[i]) { |
| 721 fConfigTextureSupport[kIndex_8_GrPixelConfig] = true; |
| 722 break; |
| 723 } |
| 721 } | 724 } |
| 722 } | 725 } |
| 723 } | 726 } |
| 724 | 727 |
| 725 // Check for BGRA | 728 // Check for BGRA |
| 726 if (kGL_GrGLStandard == standard) { | 729 if (kGL_GrGLStandard == standard) { |
| 727 fConfigTextureSupport[kBGRA_8888_GrPixelConfig] = | 730 fConfigTextureSupport[kBGRA_8888_GrPixelConfig] = |
| 728 version >= GR_GL_VER(1,2) || ctxInfo.hasExtension("GL_EXT_bgra"); | 731 version >= GR_GL_VER(1,2) || ctxInfo.hasExtension("GL_EXT_bgra"); |
| 729 } else { | 732 } else { |
| 730 if (ctxInfo.hasExtension("GL_APPLE_texture_format_BGRA8888")) { | 733 if (ctxInfo.hasExtension("GL_APPLE_texture_format_BGRA8888")) { |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1192 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
| 1190 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = | 1193 glslCaps->fFloatPrecisions[kGeometry_GrShaderType][p] = |
| 1191 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; | 1194 glslCaps->fFloatPrecisions[kVerte
x_GrShaderType][p]; |
| 1192 } | 1195 } |
| 1193 } | 1196 } |
| 1194 } | 1197 } |
| 1195 | 1198 |
| 1196 | 1199 |
| 1197 | 1200 |
| 1198 | 1201 |
| OLD | NEW |