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

Side by Side Diff: src/gpu/gl/GrGLCaps.cpp

Issue 1504333007: Use BRGA as internal format on later iOS (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698