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

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

Issue 2489673002: added constant folding & branch elimination to skslc (Closed)
Patch Set: textureProj on rectangle textures now working Created 3 years, 8 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/gpu/glsl/GrGLSLShaderBuilder.cpp ('k') | src/sksl/SkSLIRGenerator.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_IRGENERATOR 8 #ifndef SKSL_IRGENERATOR
9 #define SKSL_IRGENERATOR 9 #define SKSL_IRGENERATOR
10 10
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 std::unique_ptr<Expression> getCap(Position position, String name); 157 std::unique_ptr<Expression> getCap(Position position, String name);
158 std::unique_ptr<Expression> convertSuffixExpression(const ASTSuffixExpressio n& expression); 158 std::unique_ptr<Expression> convertSuffixExpression(const ASTSuffixExpressio n& expression);
159 std::unique_ptr<Expression> convertField(std::unique_ptr<Expression> base, 159 std::unique_ptr<Expression> convertField(std::unique_ptr<Expression> base,
160 const String& field); 160 const String& field);
161 std::unique_ptr<Expression> convertSwizzle(std::unique_ptr<Expression> base, 161 std::unique_ptr<Expression> convertSwizzle(std::unique_ptr<Expression> base,
162 const String& fields); 162 const String& fields);
163 std::unique_ptr<Expression> convertTernaryExpression(const ASTTernaryExpress ion& expression); 163 std::unique_ptr<Expression> convertTernaryExpression(const ASTTernaryExpress ion& expression);
164 std::unique_ptr<Statement> convertVarDeclarationStatement(const ASTVarDeclar ationStatement& s); 164 std::unique_ptr<Statement> convertVarDeclarationStatement(const ASTVarDeclar ationStatement& s);
165 std::unique_ptr<Statement> convertWhile(const ASTWhileStatement& w); 165 std::unique_ptr<Statement> convertWhile(const ASTWhileStatement& w);
166 166
167 void fixRectSampling(std::vector<std::unique_ptr<Expression>>& arguments);
167 void checkValid(const Expression& expr); 168 void checkValid(const Expression& expr);
168 void markWrittenTo(const Expression& expr, bool readWrite); 169 void markWrittenTo(const Expression& expr, bool readWrite);
169 170
170 const FunctionDeclaration* fCurrentFunction; 171 const FunctionDeclaration* fCurrentFunction;
171 const Program::Settings* fSettings; 172 const Program::Settings* fSettings;
172 std::unordered_map<String, CapValue> fCapsMap; 173 std::unordered_map<String, CapValue> fCapsMap;
173 std::shared_ptr<SymbolTable> fSymbolTable; 174 std::shared_ptr<SymbolTable> fSymbolTable;
174 int fLoopLevel; 175 int fLoopLevel;
175 int fSwitchLevel; 176 int fSwitchLevel;
176 ErrorReporter& fErrors; 177 ErrorReporter& fErrors;
177 178
178 friend class AutoSymbolTable; 179 friend class AutoSymbolTable;
179 friend class AutoLoopLevel; 180 friend class AutoLoopLevel;
180 friend class AutoSwitchLevel; 181 friend class AutoSwitchLevel;
181 friend class Compiler; 182 friend class Compiler;
182 }; 183 };
183 184
184 } 185 }
185 186
186 #endif 187 #endif
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLShaderBuilder.cpp ('k') | src/sksl/SkSLIRGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698