| 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 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 fES2CompatibilitySupport = false; | 42 fES2CompatibilitySupport = false; |
| 43 fMultisampleDisableSupport = false; | 43 fMultisampleDisableSupport = false; |
| 44 fUseNonVBOVertexAndIndexDynamicData = false; | 44 fUseNonVBOVertexAndIndexDynamicData = false; |
| 45 fIsCoreProfile = false; | 45 fIsCoreProfile = false; |
| 46 fFullClearIsFree = false; | 46 fFullClearIsFree = false; |
| 47 | 47 |
| 48 fReadPixelsSupportedCache.reset(); | 48 fReadPixelsSupportedCache.reset(); |
| 49 | 49 |
| 50 this->init(ctxInfo, glInterface); | 50 this->init(ctxInfo, glInterface); |
| 51 | 51 |
| 52 fShaderCaps.reset(SkNEW_ARGS(GrGLSLCaps, (ctxInfo, glInterface, *this))); | 52 fShaderCaps.reset(SkNEW_ARGS(GrGLSLCaps, (contextOptions, |
| 53 ctxInfo, glInterface, *this))); |
| 54 |
| 55 this->applyOptionsOverrides(contextOptions); |
| 53 } | 56 } |
| 54 | 57 |
| 55 void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { | 58 void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) { |
| 56 GrGLStandard standard = ctxInfo.standard(); | 59 GrGLStandard standard = ctxInfo.standard(); |
| 57 GrGLVersion version = ctxInfo.version(); | 60 GrGLVersion version = ctxInfo.version(); |
| 58 | 61 |
| 59 /************************************************************************** | 62 /************************************************************************** |
| 60 * Caps specific to GrGLCaps | 63 * Caps specific to GrGLCaps |
| 61 **************************************************************************/ | 64 **************************************************************************/ |
| 62 | 65 |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); | 889 r.appendf("Vertex array object support: %s\n", (fVertexArrayObjectSupport ?
"YES": "NO")); |
| 887 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ?
"YES" : "NO")); | 890 r.appendf("Multisample disable support: %s\n", (fMultisampleDisableSupport ?
"YES" : "NO")); |
| 888 r.appendf("Use non-VBO for dynamic data: %s\n", | 891 r.appendf("Use non-VBO for dynamic data: %s\n", |
| 889 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); | 892 (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO")); |
| 890 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); | 893 r.appendf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO
")); |
| 891 return r; | 894 return r; |
| 892 } | 895 } |
| 893 | 896 |
| 894 ////////////////////////////////////////////////////////////////////////////////
//////////// | 897 ////////////////////////////////////////////////////////////////////////////////
//////////// |
| 895 | 898 |
| 896 GrGLSLCaps::GrGLSLCaps(const GrGLContextInfo& ctxInfo, | 899 GrGLSLCaps::GrGLSLCaps(const GrContextOptions& options, |
| 900 const GrGLContextInfo& ctxInfo, |
| 897 const GrGLInterface* gli, | 901 const GrGLInterface* gli, |
| 898 const GrGLCaps& glCaps) { | 902 const GrGLCaps& glCaps) { |
| 899 fDropsTileOnZeroDivide = false; | 903 fDropsTileOnZeroDivide = false; |
| 900 fFBFetchSupport = false; | 904 fFBFetchSupport = false; |
| 901 fFBFetchNeedsCustomOutput = false; | 905 fFBFetchNeedsCustomOutput = false; |
| 902 fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction; | 906 fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction; |
| 903 fFBFetchColorName = NULL; | 907 fFBFetchColorName = NULL; |
| 904 fFBFetchExtensionString = NULL; | 908 fFBFetchExtensionString = NULL; |
| 905 this->init(ctxInfo, gli, glCaps); | 909 this->init(ctxInfo, gli, glCaps); |
| 910 this->applyOptionsOverrides(options); |
| 906 } | 911 } |
| 907 | 912 |
| 908 void GrGLSLCaps::init(const GrGLContextInfo& ctxInfo, | 913 void GrGLSLCaps::init(const GrGLContextInfo& ctxInfo, |
| 909 const GrGLInterface* gli, | 914 const GrGLInterface* gli, |
| 910 const GrGLCaps& glCaps) { | 915 const GrGLCaps& glCaps) { |
| 911 GrGLStandard standard = ctxInfo.standard(); | 916 GrGLStandard standard = ctxInfo.standard(); |
| 912 GrGLVersion version = ctxInfo.version(); | 917 GrGLVersion version = ctxInfo.version(); |
| 913 | 918 |
| 914 /************************************************************************** | 919 /************************************************************************** |
| 915 * Caps specific to GrGLSLCaps | 920 * Caps specific to GrGLSLCaps |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 if (fGeometryShaderSupport) { | 1109 if (fGeometryShaderSupport) { |
| 1105 for (int p = 0; p < kGrSLPrecisionCount; ++p) { | 1110 for (int p = 0; p < kGrSLPrecisionCount; ++p) { |
| 1106 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; | 1111 fFloatPrecisions[kGeometry_GrShaderType][p] = fFloatPrecisions[kVert
ex_GrShaderType][p]; |
| 1107 } | 1112 } |
| 1108 } | 1113 } |
| 1109 } | 1114 } |
| 1110 | 1115 |
| 1111 | 1116 |
| 1112 | 1117 |
| 1113 | 1118 |
| OLD | NEW |