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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); | 282 GR_GL_GetIntegerv(gli, GR_GL_MAX_RENDERBUFFER_SIZE, &fMaxRenderTargetSize); |
283 // Our render targets are always created with textures as the color | 283 // Our render targets are always created with textures as the color |
284 // attachment, hence this min: | 284 // attachment, hence this min: |
285 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize); | 285 fMaxRenderTargetSize = GrMin(fMaxTextureSize, fMaxRenderTargetSize); |
286 | 286 |
287 fPathStencilingSupport = GR_GL_USE_NV_PATH_RENDERING && | 287 fPathStencilingSupport = GR_GL_USE_NV_PATH_RENDERING && |
288 ctxInfo.hasExtension("GL_NV_path_rendering"); | 288 ctxInfo.hasExtension("GL_NV_path_rendering"); |
289 | 289 |
290 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType; | 290 fDstReadInShaderSupport = kNone_FBFetchType != fFBFetchType; |
291 | 291 |
| 292 #if 0 |
| 293 // This has to be temporarily disabled. On Android it causes the texture |
| 294 // usage to become front loaded and the OS kills the process. It can |
| 295 // be re-enabled once the more dynamic (ref-driven) cache clearing |
| 296 // system is in place. |
292 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor(); | 297 fReuseScratchTextures = kARM_GrGLVendor != ctxInfo.vendor(); |
| 298 #else |
| 299 fReuseScratchTextures = true; |
| 300 #endif |
293 | 301 |
294 // Enable supported shader-related caps | 302 // Enable supported shader-related caps |
295 if (kDesktop_GrGLBinding == binding) { | 303 if (kDesktop_GrGLBinding == binding) { |
296 fDualSourceBlendingSupport = ctxInfo.version() >= GR_GL_VER(3,3) || | 304 fDualSourceBlendingSupport = ctxInfo.version() >= GR_GL_VER(3,3) || |
297 ctxInfo.hasExtension("GL_ARB_blend_func_ext
ended"); | 305 ctxInfo.hasExtension("GL_ARB_blend_func_ext
ended"); |
298 fShaderDerivativeSupport = true; | 306 fShaderDerivativeSupport = true; |
299 // we don't support GL_ARB_geometry_shader4, just GL 3.2+ GS | 307 // we don't support GL_ARB_geometry_shader4, just GL 3.2+ GS |
300 fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3,2) && | 308 fGeometryShaderSupport = ctxInfo.version() >= GR_GL_VER(3,2) && |
301 ctxInfo.glslGeneration() >= k150_GrGLSLGenerati
on; | 309 ctxInfo.glslGeneration() >= k150_GrGLSLGenerati
on; |
302 } else { | 310 } else { |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); | 590 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); |
583 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 591 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
584 GrPrintf("Fragment coord conventions support: %s\n", | 592 GrPrintf("Fragment coord conventions support: %s\n", |
585 (fFragCoordsConventionSupport ? "YES": "NO")); | 593 (fFragCoordsConventionSupport ? "YES": "NO")); |
586 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "
YES": "NO")); | 594 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "
YES": "NO")); |
587 GrPrintf("Use non-VBO for dynamic data: %s\n", | 595 GrPrintf("Use non-VBO for dynamic data: %s\n", |
588 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 596 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
589 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); | 597 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); |
590 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "
NO")); | 598 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "
NO")); |
591 } | 599 } |
OLD | NEW |