| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 if (supportsPackedDS) { | 473 if (supportsPackedDS) { |
| 474 fStencilFormats.push_back() = gDS; | 474 fStencilFormats.push_back() = gDS; |
| 475 } | 475 } |
| 476 } else { | 476 } else { |
| 477 // ES2 has STENCIL_INDEX8 without extensions but requires extensions | 477 // ES2 has STENCIL_INDEX8 without extensions but requires extensions |
| 478 // for other formats. | 478 // for other formats. |
| 479 // ES doesn't support using the unsized format. | 479 // ES doesn't support using the unsized format. |
| 480 | 480 |
| 481 fStencilFormats.push_back() = gS8; | 481 fStencilFormats.push_back() = gS8; |
| 482 //fStencilFormats.push_back() = gS16; | 482 //fStencilFormats.push_back() = gS16; |
| 483 if (ctxInfo.hasExtension("GL_OES_packed_depth_stencil")) { | 483 if (ctxInfo.version() >= GR_GL_VER(3,0) || |
| 484 ctxInfo.hasExtension("GL_OES_packed_depth_stencil")) { |
| 484 fStencilFormats.push_back() = gD24S8; | 485 fStencilFormats.push_back() = gD24S8; |
| 485 } | 486 } |
| 486 if (ctxInfo.hasExtension("GL_OES_stencil4")) { | 487 if (ctxInfo.hasExtension("GL_OES_stencil4")) { |
| 487 fStencilFormats.push_back() = gS4; | 488 fStencilFormats.push_back() = gS4; |
| 488 } | 489 } |
| 489 } | 490 } |
| 490 SkASSERT(0 == fStencilVerifiedColorConfigs.count()); | 491 SkASSERT(0 == fStencilVerifiedColorConfigs.count()); |
| 491 fStencilVerifiedColorConfigs.push_back_n(fStencilFormats.count()); | 492 fStencilVerifiedColorConfigs.push_back_n(fStencilFormats.count()); |
| 492 } | 493 } |
| 493 | 494 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); | 595 GrPrintf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); |
| 595 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); | 596 GrPrintf("Two Format Limit: %s\n", (fTwoFormatLimit ? "YES": "NO")); |
| 596 GrPrintf("Fragment coord conventions support: %s\n", | 597 GrPrintf("Fragment coord conventions support: %s\n", |
| 597 (fFragCoordsConventionSupport ? "YES": "NO")); | 598 (fFragCoordsConventionSupport ? "YES": "NO")); |
| 598 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "
YES": "NO")); | 599 GrPrintf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ? "
YES": "NO")); |
| 599 GrPrintf("Use non-VBO for dynamic data: %s\n", | 600 GrPrintf("Use non-VBO for dynamic data: %s\n", |
| 600 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 601 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
| 601 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); | 602 GrPrintf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); |
| 602 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "
NO")); | 603 GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "
NO")); |
| 603 } | 604 } |
| OLD | NEW |