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 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 } | 841 } |
842 } | 842 } |
843 | 843 |
844 // Check for BGRA | 844 // Check for BGRA |
845 if (kGL_GrGLStandard == standard) { | 845 if (kGL_GrGLStandard == standard) { |
846 fConfigTextureSupport[kBGRA_8888_GrPixelConfig] = | 846 fConfigTextureSupport[kBGRA_8888_GrPixelConfig] = |
847 version >= GR_GL_VER(1,2) || ctxInfo.hasExtension("GL_EXT_bgra"); | 847 version >= GR_GL_VER(1,2) || ctxInfo.hasExtension("GL_EXT_bgra"); |
848 } else { | 848 } else { |
849 if (ctxInfo.hasExtension("GL_APPLE_texture_format_BGRA8888")) { | 849 if (ctxInfo.hasExtension("GL_APPLE_texture_format_BGRA8888")) { |
850 fConfigTextureSupport[kBGRA_8888_GrPixelConfig] = true; | 850 fConfigTextureSupport[kBGRA_8888_GrPixelConfig] = true; |
| 851 if (version >= GR_GL_VER(3,0) || ctxInfo.hasExtension("GL_EXT_textur
e_storage")) { |
| 852 fBGRAIsInternalFormat = true; |
| 853 } |
851 } else if (ctxInfo.hasExtension("GL_EXT_texture_format_BGRA8888")) { | 854 } else if (ctxInfo.hasExtension("GL_EXT_texture_format_BGRA8888")) { |
852 fConfigTextureSupport[kBGRA_8888_GrPixelConfig] = true; | 855 fConfigTextureSupport[kBGRA_8888_GrPixelConfig] = true; |
853 fBGRAIsInternalFormat = true; | 856 fBGRAIsInternalFormat = true; |
854 } | 857 } |
855 SkASSERT(fConfigTextureSupport[kBGRA_8888_GrPixelConfig] || | 858 SkASSERT(fConfigTextureSupport[kBGRA_8888_GrPixelConfig] || |
856 kSkia8888_GrPixelConfig != kBGRA_8888_GrPixelConfig); | 859 kSkia8888_GrPixelConfig != kBGRA_8888_GrPixelConfig); |
857 } | 860 } |
858 | 861 |
859 fConfigTextureSupport[kSRGBA_8888_GrPixelConfig] = srgbSupport; | 862 fConfigTextureSupport[kSRGBA_8888_GrPixelConfig] = srgbSupport; |
860 | 863 |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1344 glslCaps->fConfigSwizzle[kR11_EAC_GrPixelConfig] = "rrrr"; | 1347 glslCaps->fConfigSwizzle[kR11_EAC_GrPixelConfig] = "rrrr"; |
1345 glslCaps->fConfigSwizzle[kASTC_12x12_GrPixelConfig] = "rgba"; | 1348 glslCaps->fConfigSwizzle[kASTC_12x12_GrPixelConfig] = "rgba"; |
1346 glslCaps->fConfigSwizzle[kRGBA_float_GrPixelConfig] = "rgba"; | 1349 glslCaps->fConfigSwizzle[kRGBA_float_GrPixelConfig] = "rgba"; |
1347 glslCaps->fConfigSwizzle[kRGBA_half_GrPixelConfig] = "rgba"; | 1350 glslCaps->fConfigSwizzle[kRGBA_half_GrPixelConfig] = "rgba"; |
1348 | 1351 |
1349 } | 1352 } |
1350 | 1353 |
1351 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1354 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
1352 | 1355 |
1353 | 1356 |
OLD | NEW |