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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 GR_GL_GetIntegerv(gli, GR_GL_CONTEXT_PROFILE_MASK, &profileMask); | 206 GR_GL_GetIntegerv(gli, GR_GL_CONTEXT_PROFILE_MASK, &profileMask); |
207 fIsCoreProfile = SkToBool(profileMask & GR_GL_CONTEXT_CORE_PROFILE_BIT); | 207 fIsCoreProfile = SkToBool(profileMask & GR_GL_CONTEXT_CORE_PROFILE_BIT); |
208 } | 208 } |
209 | 209 |
210 fDiscardFBSupport = ctxInfo.hasExtension("GL_EXT_discard_framebuffer"); | 210 fDiscardFBSupport = ctxInfo.hasExtension("GL_EXT_discard_framebuffer"); |
211 | 211 |
212 if (kDesktop_GrGLBinding == binding) { | 212 if (kDesktop_GrGLBinding == binding) { |
213 fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) || | 213 fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) || |
214 ctxInfo.hasExtension("GL_ARB_vertex_array_ob
ject"); | 214 ctxInfo.hasExtension("GL_ARB_vertex_array_ob
ject"); |
215 } else { | 215 } else { |
216 fVertexArrayObjectSupport = ctxInfo.hasExtension("GL_OES_vertex_array_ob
ject"); | 216 fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) || |
| 217 ctxInfo.hasExtension("GL_OES_vertex_array_ob
ject"); |
217 } | 218 } |
218 | 219 |
219 if (kES_GrGLBinding == binding) { | 220 if (kES_GrGLBinding == binding) { |
220 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) { | 221 if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) { |
221 fFBFetchType = kEXT_FBFetchType; | 222 fFBFetchType = kEXT_FBFetchType; |
222 } else if (ctxInfo.hasExtension("GL_NV_shader_framebuffer_fetch")) { | 223 } else if (ctxInfo.hasExtension("GL_NV_shader_framebuffer_fetch")) { |
223 fFBFetchType = kNV_FBFetchType; | 224 fFBFetchType = kNV_FBFetchType; |
224 } | 225 } |
225 } | 226 } |
226 | 227 |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); | 591 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); |
591 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 592 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
592 GrPrintf("Fragment coord conventions support: %s\n", | 593 GrPrintf("Fragment coord conventions support: %s\n", |
593 (fFragCoordsConventionSupport ? "YES": "NO")); | 594 (fFragCoordsConventionSupport ? "YES": "NO")); |
594 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "
YES": "NO")); | 595 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "
YES": "NO")); |
595 GrPrintf("Use non-VBO for dynamic data: %s\n", | 596 GrPrintf("Use non-VBO for dynamic data: %s\n", |
596 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 597 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
597 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); | 598 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); |
598 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "
NO")); | 599 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "
NO")); |
599 } | 600 } |
OLD | NEW |