| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 return fSecondaryOutputExtensionString; | 101 return fSecondaryOutputExtensionString; |
| 102 } | 102 } |
| 103 | 103 |
| 104 const char* externalTextureExtensionString() const { | 104 const char* externalTextureExtensionString() const { |
| 105 return fExternalTextureExtensionString; | 105 return fExternalTextureExtensionString; |
| 106 } | 106 } |
| 107 | 107 |
| 108 /** | 108 /** |
| 109 * Given a texture's config, this determines what swizzle must be appended t
o accesses to the | 109 * Given a texture's config, this determines what swizzle must be appended t
o accesses to the |
| 110 * texture in generated shader code. Swizzling may be implemented in texture
parameters or a | 110 * texture in generated shader code. Swizzling may be implemented in texture
parameters or a |
| 111 * sampler rather than in the shader. In this case the shader swizzle will a
lways be "rgba". | 111 * sampler rather than in the shader. In this case the returned swizzle will
always be "rgba". |
| 112 */ | 112 */ |
| 113 const GrSwizzle& configTextureSwizzle(GrPixelConfig config) const { | 113 const GrSwizzle& configTextureSwizzle(GrPixelConfig config) const { |
| 114 return fConfigTextureSwizzle[config]; | 114 return fConfigTextureSwizzle[config]; |
| 115 } | 115 } |
| 116 | 116 |
| 117 /** Swizzle that should occur on the fragment shader outputs for a given con
fig. */ |
| 118 const GrSwizzle& configOutputSwizzle(GrPixelConfig config) const { |
| 119 return fConfigOutputSwizzle[config]; |
| 120 } |
| 121 |
| 117 GrGLSLGeneration generation() const { return fGLSLGeneration; } | 122 GrGLSLGeneration generation() const { return fGLSLGeneration; } |
| 118 | 123 |
| 119 /** | 124 /** |
| 120 * Returns a string containing the caps info. | 125 * Returns a string containing the caps info. |
| 121 */ | 126 */ |
| 122 SkString dump() const override; | 127 SkString dump() const override; |
| 123 | 128 |
| 124 private: | 129 private: |
| 125 void onApplyOptionsOverrides(const GrContextOptions& options) override; | 130 void onApplyOptionsOverrides(const GrContextOptions& options) override; |
| 126 | 131 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 143 const char* fFragCoordConventionsExtensionString; | 148 const char* fFragCoordConventionsExtensionString; |
| 144 const char* fSecondaryOutputExtensionString; | 149 const char* fSecondaryOutputExtensionString; |
| 145 const char* fExternalTextureExtensionString; | 150 const char* fExternalTextureExtensionString; |
| 146 | 151 |
| 147 const char* fFBFetchColorName; | 152 const char* fFBFetchColorName; |
| 148 const char* fFBFetchExtensionString; | 153 const char* fFBFetchExtensionString; |
| 149 | 154 |
| 150 AdvBlendEqInteraction fAdvBlendEqInteraction; | 155 AdvBlendEqInteraction fAdvBlendEqInteraction; |
| 151 | 156 |
| 152 GrSwizzle fConfigTextureSwizzle[kGrPixelConfigCnt]; | 157 GrSwizzle fConfigTextureSwizzle[kGrPixelConfigCnt]; |
| 158 GrSwizzle fConfigOutputSwizzle[kGrPixelConfigCnt]; |
| 153 | 159 |
| 154 friend class GrGLCaps; // For initialization. | 160 friend class GrGLCaps; // For initialization. |
| 155 | 161 |
| 156 typedef GrShaderCaps INHERITED; | 162 typedef GrShaderCaps INHERITED; |
| 157 }; | 163 }; |
| 158 | 164 |
| 159 #endif | 165 #endif |
| OLD | NEW |