Chromium Code Reviews| 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 #ifndef GrGLSLCaps_DEFINED | 9 #ifndef GrGLSLCaps_DEFINED |
| 10 #define GrGLSLCaps_DEFINED | 10 #define GrGLSLCaps_DEFINED |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 return fGLSLGeneration > k110_GrGLSLGeneration; | 67 return fGLSLGeneration > k110_GrGLSLGeneration; |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool usesPrecisionModifiers() const { return fUsesPrecisionModifiers; } | 70 bool usesPrecisionModifiers() const { return fUsesPrecisionModifiers; } |
| 71 | 71 |
| 72 // Returns whether we can use the glsl funciton any() in our shader code. | 72 // Returns whether we can use the glsl funciton any() in our shader code. |
| 73 bool canUseAnyFunctionInShader() const { return fCanUseAnyFunctionInShader; } | 73 bool canUseAnyFunctionInShader() const { return fCanUseAnyFunctionInShader; } |
| 74 | 74 |
| 75 bool forceHighPrecisionNDSTransform() const { return fForceHighPrecisionNDST ransform; } | 75 bool forceHighPrecisionNDSTransform() const { return fForceHighPrecisionNDST ransform; } |
| 76 | 76 |
| 77 bool textureSwizzleSupport() const { return fTextureSwizzleSupport; } | |
|
bsalomon
2015/10/30 17:10:53
These two seem like features of the API and not of
| |
| 78 | |
| 79 bool textureRedSupport() const { return fTextureRedSupport; } | |
| 80 | |
| 81 // Returns the string of an extension that must be enabled in the shader to support | |
| 82 // derivatives. If nullptr is returned then no extension needs to be enabled . Before calling | |
| 83 // this function, the caller should check that shaderDerivativeSupport exist s. | |
| 84 const char* shaderDerivativeExtensionString() const { | |
| 85 SkASSERT(this->shaderDerivativeSupport()); | |
| 86 return fShaderDerivativeExtensionString; | |
| 87 } | |
| 88 | |
| 77 GrGLSLGeneration generation() const { return fGLSLGeneration; } | 89 GrGLSLGeneration generation() const { return fGLSLGeneration; } |
| 78 | 90 |
| 79 /** | 91 /** |
| 80 * Returns a string containing the caps info. | 92 * Returns a string containing the caps info. |
| 81 */ | 93 */ |
| 82 SkString dump() const override; | 94 SkString dump() const override; |
| 83 | 95 |
| 84 private: | 96 private: |
| 85 GrGLSLGeneration fGLSLGeneration; | 97 GrGLSLGeneration fGLSLGeneration; |
| 86 | 98 |
| 87 bool fDropsTileOnZeroDivide : 1; | 99 bool fDropsTileOnZeroDivide : 1; |
| 88 bool fFBFetchSupport : 1; | 100 bool fFBFetchSupport : 1; |
| 89 bool fFBFetchNeedsCustomOutput : 1; | 101 bool fFBFetchNeedsCustomOutput : 1; |
| 90 bool fBindlessTextureSupport : 1; | 102 bool fBindlessTextureSupport : 1; |
| 91 bool fUsesPrecisionModifiers : 1; | 103 bool fUsesPrecisionModifiers : 1; |
| 92 bool fCanUseAnyFunctionInShader : 1; | 104 bool fCanUseAnyFunctionInShader : 1; |
| 93 bool fForceHighPrecisionNDSTransform : 1; | 105 bool fForceHighPrecisionNDSTransform : 1; |
| 106 bool fTextureSwizzleSupport : 1; | |
| 107 bool fTextureRedSupport : 1; | |
| 94 | 108 |
| 95 const char* fVersionDeclString; | 109 const char* fVersionDeclString; |
| 96 | 110 |
| 111 const char* fShaderDerivativeExtensionString; | |
| 112 | |
| 97 const char* fFBFetchColorName; | 113 const char* fFBFetchColorName; |
| 98 const char* fFBFetchExtensionString; | 114 const char* fFBFetchExtensionString; |
| 99 | 115 |
| 100 AdvBlendEqInteraction fAdvBlendEqInteraction; | 116 AdvBlendEqInteraction fAdvBlendEqInteraction; |
| 101 | 117 |
| 102 friend class GrGLCaps; // For initialization. | 118 friend class GrGLCaps; // For initialization. |
| 103 | 119 |
| 104 typedef GrShaderCaps INHERITED; | 120 typedef GrShaderCaps INHERITED; |
| 105 }; | 121 }; |
| 106 | 122 |
| 107 | 123 |
| 108 #endif | 124 #endif |
| OLD | NEW |