OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #ifndef GrGLShaderBuilder_DEFINED | 8 #ifndef GrGLShaderBuilder_DEFINED |
9 #define GrGLShaderBuilder_DEFINED | 9 #define GrGLShaderBuilder_DEFINED |
10 | 10 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 } | 119 } |
120 private: | 120 private: |
121 GrGLShaderBuilder* fBuilder; | 121 GrGLShaderBuilder* fBuilder; |
122 }; | 122 }; |
123 | 123 |
124 protected: | 124 protected: |
125 typedef GrTAllocator<GrGLSLShaderVar> VarArray; | 125 typedef GrTAllocator<GrGLSLShaderVar> VarArray; |
126 void appendDecls(const VarArray& vars, SkString* out) const; | 126 void appendDecls(const VarArray& vars, SkString* out) const; |
127 | 127 |
128 /* | 128 /* |
| 129 * this super low level function is just for use internally to builders |
| 130 */ |
| 131 void appendTextureLookup(const char* samplerName, |
| 132 const char* coordName, |
| 133 uint32_t configComponentMask, |
| 134 const char* swizzle); |
| 135 |
| 136 /* |
129 * A general function which enables an extension in a shader if the feature
bit is not present | 137 * A general function which enables an extension in a shader if the feature
bit is not present |
130 */ | 138 */ |
131 void addFeature(uint32_t featureBit, const char* extensionName); | 139 void addFeature(uint32_t featureBit, const char* extensionName); |
132 | 140 |
133 enum InterfaceQualifier { | 141 enum InterfaceQualifier { |
134 kOut_InterfaceQualifier, | 142 kOut_InterfaceQualifier, |
135 kLastInterfaceQualifier = kOut_InterfaceQualifier | 143 kLastInterfaceQualifier = kOut_InterfaceQualifier |
136 }; | 144 }; |
137 | 145 |
138 /* | 146 /* |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 VarArray fOutputs; | 199 VarArray fOutputs; |
192 uint32_t fFeaturesAddedMask; | 200 uint32_t fFeaturesAddedMask; |
193 SkSTArray<1, SkString> fLayoutParams[kLastInterfaceQualifier + 1]; | 201 SkSTArray<1, SkString> fLayoutParams[kLastInterfaceQualifier + 1]; |
194 int fCodeIndex; | 202 int fCodeIndex; |
195 bool fFinalized; | 203 bool fFinalized; |
196 | 204 |
197 friend class GrGLProgramBuilder; | 205 friend class GrGLProgramBuilder; |
198 friend class GrGLPathProgramBuilder; // to access fInputs. | 206 friend class GrGLPathProgramBuilder; // to access fInputs. |
199 }; | 207 }; |
200 #endif | 208 #endif |
OLD | NEW |