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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 // ES3 has no limitations. | 330 // ES3 has no limitations. |
331 fNPOTTextureTileSupport = ctxInfo.version() >= GR_GL_VER(3,0) || | 331 fNPOTTextureTileSupport = ctxInfo.version() >= GR_GL_VER(3,0) || |
332 ctxInfo.hasExtension("GL_OES_texture_npot"); | 332 ctxInfo.hasExtension("GL_OES_texture_npot"); |
333 // ES2 supports MIP mapping for POT textures but our caps don't allow fo
r limited MIP | 333 // ES2 supports MIP mapping for POT textures but our caps don't allow fo
r limited MIP |
334 // support. The OES extension or ES 3.0 allow for MIPS on NPOT textures.
So, apparently, | 334 // support. The OES extension or ES 3.0 allow for MIPS on NPOT textures.
So, apparently, |
335 // does the undocumented GL_IMG_texture_npot extension. This extension d
oes not seem to | 335 // does the undocumented GL_IMG_texture_npot extension. This extension d
oes not seem to |
336 // to alllow arbitrary wrap modes, however. | 336 // to alllow arbitrary wrap modes, however. |
337 fMipMapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG
_texture_npot"); | 337 fMipMapSupport = fNPOTTextureTileSupport || ctxInfo.hasExtension("GL_IMG
_texture_npot"); |
338 } | 338 } |
339 | 339 |
340 fHWAALineSupport = (kGL_GrGLStandard == standard); | |
341 | |
342 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); | 340 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); |
343 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); | 341 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); |
344 // Our render targets are always created with textures as the color | 342 // Our render targets are always created with textures as the color |
345 // attachment, hence this min: | 343 // attachment, hence this min: |
346 fMaxRenderTargetSize = SkTMin(fMaxTextureSize, fMaxRenderTargetSize); | 344 fMaxRenderTargetSize = SkTMin(fMaxTextureSize, fMaxRenderTargetSize); |
347 | 345 |
348 fPathRenderingSupport = ctxInfo.hasExtension("GL_NV_path_rendering"); | 346 fPathRenderingSupport = ctxInfo.hasExtension("GL_NV_path_rendering"); |
349 | 347 |
350 if (fPathRenderingSupport) { | 348 if (fPathRenderingSupport) { |
351 if (kGL_GrGLStandard == standard) { | 349 if (kGL_GrGLStandard == standard) { |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 1046 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
1049 r.appendf("Fragment coord conventions support: %s\n", | 1047 r.appendf("Fragment coord conventions support: %s\n", |
1050 (fFragCoordsConventionSupport ? "YES": "NO")); | 1048 (fFragCoordsConventionSupport ? "YES": "NO")); |
1051 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 1049 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
1052 r.appendf("Use non-VBO for dynamic data: %s\n", | 1050 r.appendf("Use non-VBO for dynamic data: %s\n", |
1053 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 1051 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
1054 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); | 1052 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); |
1055 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); | 1053 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); |
1056 return r; | 1054 return r; |
1057 } | 1055 } |
OLD | NEW |