| 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 | 
 |  316     fReuseScratchTextures = true; | 
 |  317 #else | 
|  315     fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor(); |  318     fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor(); | 
 |  319 #endif | 
|  316  |  320  | 
|  317     // Enable supported shader-related caps |  321     // Enable supported shader-related caps | 
|  318     if (kDesktop_GrGLBinding == binding) { |  322     if (kDesktop_GrGLBinding == binding) { | 
|  319         fDualSourceBlendingSupport = ctxInfo.version() >= GR_GL_VER(3,3) || |  323         fDualSourceBlendingSupport = ctxInfo.version() >= GR_GL_VER(3,3) || | 
|  320                                      ctxInfo.hasExtension("GL_ARB_blend_func_ext
     ended"); |  324                                      ctxInfo.hasExtension("GL_ARB_blend_func_ext
     ended"); | 
|  321         fShaderDerivativeSupport = true; |  325         fShaderDerivativeSupport = true; | 
|  322         // we don't support GL_ARB_geometry_shader4, just GL 3.2+ GS |  326         // we don't support GL_ARB_geometry_shader4, just GL 3.2+ GS | 
|  323         fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3,2) && |  327         fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3,2) && | 
|  324                                  ctxInfo.glslGeneration() >= k150_GrGLSLGenerati
     on; |  328                                  ctxInfo.glslGeneration() >= k150_GrGLSLGenerati
     on; | 
|  325     } else { |  329     } else { | 
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  649     GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); |  653     GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); | 
|  650     GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |  654     GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 
|  651     GrPrintf("Fragment coord conventions support: %s\n", |  655     GrPrintf("Fragment coord conventions support: %s\n", | 
|  652              (fFragCoordsConventionSupport ? "YES": "NO")); |  656              (fFragCoordsConventionSupport ? "YES": "NO")); | 
|  653     GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "
     YES": "NO")); |  657     GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "
     YES": "NO")); | 
|  654     GrPrintf("Use non-VBO for dynamic data: %s\n", |  658     GrPrintf("Use non-VBO for dynamic data: %s\n", | 
|  655              (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |  659              (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 
|  656     GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "
     NO")); |  660     GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "
     NO")); | 
|  657     GrPrintf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO"
     )); |  661     GrPrintf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO"
     )); | 
|  658 } |  662 } | 
| OLD | NEW |