| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); | 305 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); |
| 306 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); | 306 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); |
| 307 // Our render targets are always created with textures as the color | 307 // Our render targets are always created with textures as the color |
| 308 // attachment, hence this min: | 308 // attachment, hence this min: |
| 309 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize); | 309 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize); |
| 310 | 310 |
| 311 fPathRenderingSupport = GR_GL_USE_NV_PATH_RENDERING && | 311 fPathRenderingSupport = GR_GL_USE_NV_PATH_RENDERING && |
| 312 ctxInfo.hasExtension("GL_NV_path_rendering"); | 312 ctxInfo.hasExtension("GL_NV_path_rendering"); |
| 313 | 313 |
| 314 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType; | 314 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType; |
| 315 #ifdef SK_BUILD_FOR_ANDROID | 315 |
| 316 fReuseScratchTextures = false; | 316 // Disable scratch texture reuse on Mali and Adreno devices |
| 317 #else | 317 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && |
| 318 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor(); | 318 kQualcomm_GrGLVendor != ctxInfo.vendor(); |
| 319 #endif | |
| 320 | 319 |
| 321 // Enable supported shader-related caps | 320 // Enable supported shader-related caps |
| 322 if (kDesktop_GrGLBinding == binding) { | 321 if (kDesktop_GrGLBinding == binding) { |
| 323 fDualSourceBlendingSupport = ctxInfo.version() >= GR_GL_VER(3,3) || | 322 fDualSourceBlendingSupport = ctxInfo.version() >= GR_GL_VER(3,3) || |
| 324 ctxInfo.hasExtension("GL_ARB_blend_func_ext
ended"); | 323 ctxInfo.hasExtension("GL_ARB_blend_func_ext
ended"); |
| 325 fShaderDerivativeSupport = true; | 324 fShaderDerivativeSupport = true; |
| 326 // we don't support GL_ARB_geometry_shader4, just GL 3.2+ GS | 325 // we don't support GL_ARB_geometry_shader4, just GL 3.2+ GS |
| 327 fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3,2) && | 326 fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3,2) && |
| 328 ctxInfo.glslGeneration() >= k150_GrGLSLGenerati
on; | 327 ctxInfo.glslGeneration() >= k150_GrGLSLGenerati
on; |
| 329 } else { | 328 } else { |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); | 652 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); |
| 654 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 653 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
| 655 GrPrintf("Fragment coord conventions support: %s\n", | 654 GrPrintf("Fragment coord conventions support: %s\n", |
| 656 (fFragCoordsConventionSupport ? "YES": "NO")); | 655 (fFragCoordsConventionSupport ? "YES": "NO")); |
| 657 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "
YES": "NO")); | 656 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "
YES": "NO")); |
| 658 GrPrintf("Use non-VBO for dynamic data: %s\n", | 657 GrPrintf("Use non-VBO for dynamic data: %s\n", |
| 659 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 658 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
| 660 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "
NO")); | 659 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "
NO")); |
| 661 GrPrintf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO"
)); | 660 GrPrintf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO"
)); |
| 662 } | 661 } |
| OLD | NEW |