Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: src/sksl/SkSLGLSLCodeGenerator.h

Issue 2312233002: refactored SkSL VarDeclaration handling (Closed)
Patch Set: fixed nits Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/sksl/SkSLCompiler.cpp ('k') | src/sksl/SkSLGLSLCodeGenerator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/sksl/SkSLCompiler.cpp ('k') | src/sksl/SkSLGLSLCodeGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698