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

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

Issue 430773004: Add query for whether or not we have compressedTexSubImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months 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 | « src/gpu/GrDrawTargetCaps.h ('k') | 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 #include "GrGLContext.h" 10 #include "GrGLContext.h"
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 SkASSERT(fConfigTextureSupport[kBGRA_8888_GrPixelConfig] || 495 SkASSERT(fConfigTextureSupport[kBGRA_8888_GrPixelConfig] ||
496 kSkia8888_GrPixelConfig != kBGRA_8888_GrPixelConfig); 496 kSkia8888_GrPixelConfig != kBGRA_8888_GrPixelConfig);
497 } 497 }
498 498
499 // Compressed texture support 499 // Compressed texture support
500 500
501 // glCompressedTexImage2D is available on all OpenGL ES devices... 501 // glCompressedTexImage2D is available on all OpenGL ES devices...
502 // however, it is only available on standard OpenGL after version 1.3 502 // however, it is only available on standard OpenGL after version 1.3
503 bool hasCompressTex2D = (kGL_GrGLStandard != standard || version >= GR_GL_VE R(1, 3)); 503 bool hasCompressTex2D = (kGL_GrGLStandard != standard || version >= GR_GL_VE R(1, 3));
504 504
505 fCompressedTexSubImageSupport =
506 hasCompressTex2D && (NULL != gli->fFunctions.fCompressedTexSubImage2D);
507
505 // Check for ETC1 508 // Check for ETC1
506 bool hasETC1 = false; 509 bool hasETC1 = false;
507 510
508 // First check version for support 511 // First check version for support
509 if (kGL_GrGLStandard == standard) { 512 if (kGL_GrGLStandard == standard) {
510 hasETC1 = hasCompressTex2D && 513 hasETC1 = hasCompressTex2D &&
511 (version >= GR_GL_VER(4, 3) || 514 (version >= GR_GL_VER(4, 3) ||
512 ctxInfo.hasExtension("GL_ARB_ES3_compatibility")); 515 ctxInfo.hasExtension("GL_ARB_ES3_compatibility"));
513 } else { 516 } else {
514 hasETC1 = hasCompressTex2D && 517 hasETC1 = hasCompressTex2D &&
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); 836 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO"));
834 r.appendf("Fragment coord conventions support: %s\n", 837 r.appendf("Fragment coord conventions support: %s\n",
835 (fFragCoordsConventionSupport ? "YES": "NO")); 838 (fFragCoordsConventionSupport ? "YES": "NO"));
836 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO")); 839 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO"));
837 r.appendf("Use non-VBO for dynamic data: %s\n", 840 r.appendf("Use non-VBO for dynamic data: %s\n",
838 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); 841 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
839 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO ")); 842 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO "));
840 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO")); 843 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO"));
841 return r; 844 return r;
842 } 845 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTargetCaps.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698