| 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 | 10 |
| 11 #include "GrContextOptions.h" | 11 #include "GrContextOptions.h" |
| 12 #include "GrGLContext.h" | 12 #include "GrGLContext.h" |
| 13 #include "GrGLRenderTarget.h" | 13 #include "GrGLRenderTarget.h" |
| 14 #include "glsl/GrGLSLCaps.h" | 14 #include "glsl/GrGLSLCaps.h" |
| 15 #include "SkTSearch.h" | 15 #include "SkTSearch.h" |
| 16 #include "SkTSort.h" | 16 #include "SkTSort.h" |
| 17 | 17 |
| 18 GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions, | 18 GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions, |
| 19 const GrGLContextInfo& ctxInfo, | 19 const GrGLContextInfo& ctxInfo, |
| 20 const GrGLInterface* glInterface) : INHERITED(contextOptions)
{ | 20 const GrGLInterface* glInterface) : INHERITED(contextOptions)
{ |
| 21 fStandard = ctxInfo.standard(); | 21 fStandard = ctxInfo.standard(); |
| 22 | 22 |
| 23 fStencilFormats.reset(); | 23 fStencilFormats.reset(); |
| 24 fMSFBOType = kNone_MSFBOType; | 24 fMSFBOType = kNone_MSFBOType; |
| 25 fInvalidateFBType = kNone_InvalidateFBType; | 25 fInvalidateFBType = kNone_InvalidateFBType; |
| 26 fMapBufferType = kNone_MapBufferType; | 26 fMapBufferType = kNone_MapBufferType; |
| 27 fTransferBufferType = kNone_TransferBufferType; | 27 fTransferBufferType = kNone_TransferBufferType; |
| 28 fMaxFragmentUniformVectors = 0; | 28 fMaxFragmentUniformVectors = 0; |
| 29 fMaxVertexAttributes = 0; | |
| 30 fUnpackRowLengthSupport = false; | 29 fUnpackRowLengthSupport = false; |
| 31 fUnpackFlipYSupport = false; | 30 fUnpackFlipYSupport = false; |
| 32 fPackRowLengthSupport = false; | 31 fPackRowLengthSupport = false; |
| 33 fPackFlipYSupport = false; | 32 fPackFlipYSupport = false; |
| 34 fTextureUsageSupport = false; | 33 fTextureUsageSupport = false; |
| 35 fTextureRedSupport = false; | 34 fTextureRedSupport = false; |
| 36 fImagingSupport = false; | 35 fImagingSupport = false; |
| 37 fVertexArrayObjectSupport = false; | 36 fVertexArrayObjectSupport = false; |
| 38 fDirectStateAccessSupport = false; | 37 fDirectStateAccessSupport = false; |
| 39 fDebugSupport = false; | 38 fDebugSupport = false; |
| (...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 GR_STATIC_ASSERT(1 == kMapBuffer_MapBufferType); | 1056 GR_STATIC_ASSERT(1 == kMapBuffer_MapBufferType); |
| 1058 GR_STATIC_ASSERT(2 == kMapBufferRange_MapBufferType); | 1057 GR_STATIC_ASSERT(2 == kMapBufferRange_MapBufferType); |
| 1059 GR_STATIC_ASSERT(3 == kChromium_MapBufferType); | 1058 GR_STATIC_ASSERT(3 == kChromium_MapBufferType); |
| 1060 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kMapBufferTypeStr) == kLast_MapBufferType +
1); | 1059 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kMapBufferTypeStr) == kLast_MapBufferType +
1); |
| 1061 | 1060 |
| 1062 r.appendf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); | 1061 r.appendf("Core Profile: %s\n", (fIsCoreProfile ? "YES" : "NO")); |
| 1063 r.appendf("MSAA Type: %s\n", kMSFBOExtStr[fMSFBOType]); | 1062 r.appendf("MSAA Type: %s\n", kMSFBOExtStr[fMSFBOType]); |
| 1064 r.appendf("Invalidate FB Type: %s\n", kInvalidateFBTypeStr[fInvalidateFBType
]); | 1063 r.appendf("Invalidate FB Type: %s\n", kInvalidateFBTypeStr[fInvalidateFBType
]); |
| 1065 r.appendf("Map Buffer Type: %s\n", kMapBufferTypeStr[fMapBufferType]); | 1064 r.appendf("Map Buffer Type: %s\n", kMapBufferTypeStr[fMapBufferType]); |
| 1066 r.appendf("Max FS Uniform Vectors: %d\n", fMaxFragmentUniformVectors); | 1065 r.appendf("Max FS Uniform Vectors: %d\n", fMaxFragmentUniformVectors); |
| 1067 r.appendf("Max Vertex Attributes: %d\n", fMaxVertexAttributes); | |
| 1068 r.appendf("Unpack Row length support: %s\n", (fUnpackRowLengthSupport ? "YES
": "NO")); | 1066 r.appendf("Unpack Row length support: %s\n", (fUnpackRowLengthSupport ? "YES
": "NO")); |
| 1069 r.appendf("Unpack Flip Y support: %s\n", (fUnpackFlipYSupport ? "YES": "NO")
); | 1067 r.appendf("Unpack Flip Y support: %s\n", (fUnpackFlipYSupport ? "YES": "NO")
); |
| 1070 r.appendf("Pack Row length support: %s\n", (fPackRowLengthSupport ? "YES": "
NO")); | 1068 r.appendf("Pack Row length support: %s\n", (fPackRowLengthSupport ? "YES": "
NO")); |
| 1071 r.appendf("Pack Flip Y support: %s\n", (fPackFlipYSupport ? "YES": "NO")); | 1069 r.appendf("Pack Flip Y support: %s\n", (fPackFlipYSupport ? "YES": "NO")); |
| 1072 | 1070 |
| 1073 r.appendf("Texture Usage support: %s\n", (fTextureUsageSupport ? "YES": "NO"
)); | 1071 r.appendf("Texture Usage support: %s\n", (fTextureUsageSupport ? "YES": "NO"
)); |
| 1074 r.appendf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO")); | 1072 r.appendf("GL_R support: %s\n", (fTextureRedSupport ? "YES": "NO")); |
| 1075 r.appendf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); | 1073 r.appendf("GL_ARB_imaging support: %s\n", (fImagingSupport ? "YES": "NO")); |
| 1076 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 1074 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
| 1077 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ?
"YES": "NO")); | 1075 r.appendf("Direct state access support: %s\n", (fDirectStateAccessSupport ?
"YES": "NO")); |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1869 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { | 1867 for (int j = 0; j < kExternalFormatUsageCnt; ++j) { |
| 1870 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != | 1868 SkASSERT(defaultEntry.fFormats.fExternalFormat[j] != |
| 1871 fConfigTable[i].fFormats.fExternalFormat[j]); | 1869 fConfigTable[i].fFormats.fExternalFormat[j]); |
| 1872 } | 1870 } |
| 1873 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); | 1871 SkASSERT(defaultEntry.fFormats.fExternalType != fConfigTable[i].fFormats
.fExternalType); |
| 1874 } | 1872 } |
| 1875 #endif | 1873 #endif |
| 1876 } | 1874 } |
| 1877 | 1875 |
| 1878 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} | 1876 void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {} |
| OLD | NEW |