Chromium Code Reviews| 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 304 } | 304 } |
| 305 | 305 |
| 306 fHWAALineSupport = (kGL_GrGLStandard == standard); | 306 fHWAALineSupport = (kGL_GrGLStandard == standard); |
| 307 | 307 |
| 308 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); | 308 GR_GL_GetIntegerv(gli, GR_GL_MAX_TEXTURE_SIZE, &fMaxTextureSize); |
| 309 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); | 309 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); |
| 310 // Our render targets are always created with textures as the color | 310 // Our render targets are always created with textures as the color |
| 311 // attachment, hence this min: | 311 // attachment, hence this min: |
| 312 fMaxRenderTargetSize = SkTMin(fMaxTextureSize, fMaxRenderTargetSize); | 312 fMaxRenderTargetSize = SkTMin(fMaxTextureSize, fMaxRenderTargetSize); |
| 313 | 313 |
| 314 fPathRenderingSupport = ctxInfo.hasExtension("GL_NV_path_rendering") && | 314 fPathRenderingSupport = ctxInfo.hasExtension("GL_NV_path_rendering"); |
| 315 ctxInfo.hasExtension("GL_EXT_direct_state_access"); | 315 |
| 316 if (fPathRenderingSupport) { | |
| 317 if (kGL_GrGLStandard == standard) { | |
| 318 // Set fMaxFixedFunctionTextureCoords = 0 here if you want to force | |
| 319 // ProgramPathFragmentInputGen usage on desktop. | |
| 320 fPathRenderingSupport = ctxInfo.hasExtension("GL_EXT_direct_state_ac cess") && | |
| 321 (fMaxFixedFunctionTextureCoords > 0 || | |
| 322 ((ctxInfo.version() >= GR_GL_VER(4,3) || | |
| 323 ctxInfo.hasExtension("GL_ARB_program_interface_query")) && | |
| 324 NULL != gli->fFunctions.fProgramPathFragmentInputGen)); | |
|
bsalomon
2014/07/02 13:25:33
Can you explain in a comment why you're looking fo
Kimmo Kinnunen
2014/07/03 05:43:20
Added following:
// We need one of the two possibl
| |
| 325 } else { | |
| 326 // Note: path rendering is not yet implemented for GLES. | |
| 327 fPathRenderingSupport = ctxInfo.version() >= GR_GL_VER(3,1) && false ; | |
| 328 } | |
| 329 } | |
| 316 | 330 |
| 317 fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker"); | 331 fGpuTracingSupport = ctxInfo.hasExtension("GL_EXT_debug_marker"); |
| 318 | 332 |
| 319 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType; | 333 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType; |
| 320 | 334 |
| 321 // Disable scratch texture reuse on Mali and Adreno devices | 335 // Disable scratch texture reuse on Mali and Adreno devices |
| 322 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && | 336 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor() && |
| 323 kQualcomm_GrGLVendor != ctxInfo.vendor(); | 337 kQualcomm_GrGLVendor != ctxInfo.vendor(); |
| 324 | 338 |
| 325 // Enable supported shader-related caps | 339 // Enable supported shader-related caps |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 791 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 805 r.appendf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
| 792 r.appendf("Fragment coord conventions support: %s\n", | 806 r.appendf("Fragment coord conventions support: %s\n", |
| 793 (fFragCoordsConventionSupport ? "YES": "NO")); | 807 (fFragCoordsConventionSupport ? "YES": "NO")); |
| 794 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO")); | 808 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "YES": "NO")); |
| 795 r.appendf("Use non-VBO for dynamic data: %s\n", | 809 r.appendf("Use non-VBO for dynamic data: %s\n", |
| 796 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 810 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
| 797 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO ")); | 811 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO ")); |
| 798 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO")); | 812 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO")); |
| 799 return r; | 813 return r; |
| 800 } | 814 } |
| OLD | NEW |