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 /* | |
137 * A general function which enables an extension in a shader if the feature
bit is not present | 129 * A general function which enables an extension in a shader if the feature
bit is not present |
138 */ | 130 */ |
139 void addFeature(uint32_t featureBit, const char* extensionName); | 131 void addFeature(uint32_t featureBit, const char* extensionName); |
140 | 132 |
141 enum InterfaceQualifier { | 133 enum InterfaceQualifier { |
142 kOut_InterfaceQualifier, | 134 kOut_InterfaceQualifier, |
143 kLastInterfaceQualifier = kOut_InterfaceQualifier | 135 kLastInterfaceQualifier = kOut_InterfaceQualifier |
144 }; | 136 }; |
145 | 137 |
146 /* | 138 /* |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 VarArray fOutputs; | 191 VarArray fOutputs; |
200 uint32_t fFeaturesAddedMask; | 192 uint32_t fFeaturesAddedMask; |
201 SkSTArray<1, SkString> fLayoutParams[kLastInterfaceQualifier + 1]; | 193 SkSTArray<1, SkString> fLayoutParams[kLastInterfaceQualifier + 1]; |
202 int fCodeIndex; | 194 int fCodeIndex; |
203 bool fFinalized; | 195 bool fFinalized; |
204 | 196 |
205 friend class GrGLProgramBuilder; | 197 friend class GrGLProgramBuilder; |
206 friend class GrGLPathProgramBuilder; // to access fInputs. | 198 friend class GrGLPathProgramBuilder; // to access fInputs. |
207 }; | 199 }; |
208 #endif | 200 #endif |
OLD | NEW |