| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 SKSL_GLSLCODEGENERATOR | 8 #ifndef SKSL_GLSLCODEGENERATOR |
| 9 #define SKSL_GLSLCODEGENERATOR | 9 #define SKSL_GLSLCODEGENERATOR |
| 10 | 10 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 void writeFunctionDeclaration(const FunctionDeclaration& f); | 108 void writeFunctionDeclaration(const FunctionDeclaration& f); |
| 109 | 109 |
| 110 void writeFunction(const FunctionDefinition& f); | 110 void writeFunction(const FunctionDefinition& f); |
| 111 | 111 |
| 112 void writeLayout(const Layout& layout); | 112 void writeLayout(const Layout& layout); |
| 113 | 113 |
| 114 void writeModifiers(const Modifiers& modifiers); | 114 void writeModifiers(const Modifiers& modifiers); |
| 115 | 115 |
| 116 void writeGlobalVars(const VarDeclaration& vs); | 116 void writeGlobalVars(const VarDeclaration& vs); |
| 117 | 117 |
| 118 void writeVarDeclaration(const VarDeclaration& decl); | 118 void writeVarDeclarations(const VarDeclarations& decl); |
| 119 | 119 |
| 120 void writeVariableReference(const VariableReference& ref); | 120 void writeVariableReference(const VariableReference& ref); |
| 121 | 121 |
| 122 void writeExpression(const Expression& expr, Precedence parentPrecedence); | 122 void writeExpression(const Expression& expr, Precedence parentPrecedence); |
| 123 | 123 |
| 124 void writeIntrinsicCall(const FunctionCall& c); | 124 void writeIntrinsicCall(const FunctionCall& c); |
| 125 | 125 |
| 126 void writeFunctionCall(const FunctionCall& c); | 126 void writeFunctionCall(const FunctionCall& c); |
| 127 | 127 |
| 128 void writeConstructor(const Constructor& c); | 128 void writeConstructor(const Constructor& c); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 bool fAtLineStart; | 168 bool fAtLineStart; |
| 169 // Keeps track of which struct types we have written. Given that we are unli
kely to ever write | 169 // Keeps track of which struct types we have written. Given that we are unli
kely to ever write |
| 170 // more than one or two structs per shader, a simple linear search will be f
aster than anything | 170 // more than one or two structs per shader, a simple linear search will be f
aster than anything |
| 171 // fancier. | 171 // fancier. |
| 172 std::vector<const Type*> fWrittenStructs; | 172 std::vector<const Type*> fWrittenStructs; |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 } | 175 } |
| 176 | 176 |
| 177 #endif | 177 #endif |
| OLD | NEW |