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 #include "GrGLContext.h" | 10 #include "GrGLContext.h" |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 } | 302 } |
303 | 303 |
304 fHWAALineSupport = (kGL_GrGLStandard == standard); | 304 fHWAALineSupport = (kGL_GrGLStandard == standard); |
305 | 305 |
306 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); | 306 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); |
307 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); | 307 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); |
308 // Our render targets are always created with textures as the color | 308 // Our render targets are always created with textures as the color |
309 // attachment, hence this min: | 309 // attachment, hence this min: |
310 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize); | 310 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize); |
311 | 311 |
312 fPathRenderingSupport = GR_GL_USE_NV_PATH_RENDERING && | 312 fPathRenderingSupport = ctxInfo.hasExtension("GL_NV_path_rendering"); |
313 ctxInfo.hasExtension("GL_NV_path_rendering"); | |
314 SkASSERT(!fPathRenderingSupport || fFixedFunctionSupport); | 313 SkASSERT(!fPathRenderingSupport || fFixedFunctionSupport); |
315 | 314 |
316 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType; | 315 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType; |
317 | 316 |
318 // Disable scratch texture reuse on Mali and Adreno devices | 317 // Disable scratch texture reuse on Mali and Adreno devices |
319 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && | 318 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && |
320 kQualcomm_GrGLVendor != ctxInfo.vendor(); | 319 kQualcomm_GrGLVendor != ctxInfo.vendor(); |
321 | 320 |
322 // Enable supported shader-related caps | 321 // Enable supported shader-related caps |
323 if (kGL_GrGLStandard == standard) { | 322 if (kGL_GrGLStandard == standard) { |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 654 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
656 r.appendf("Fragment coord conventions support: %s\n", | 655 r.appendf("Fragment coord conventions support: %s\n", |
657 (fFragCoordsConventionSupport ? "YES": "NO")); | 656 (fFragCoordsConventionSupport ? "YES": "NO")); |
658 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 657 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
659 r.appendf("Use non-VBO for dynamic data: %s\n", | 658 r.appendf("Use non-VBO for dynamic data: %s\n", |
660 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 659 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
661 r.appendf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" :
"NO")); | 660 r.appendf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" :
"NO")); |
662 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); | 661 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); |
663 return r; | 662 return r; |
664 } | 663 } |
OLD | NEW |