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

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

Issue 2288033003: Turned on SkSL->GLSL compiler (Closed)
Patch Set: wording cleanup 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
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_COMPILER 8 #ifndef SKSL_COMPILER
9 #define SKSL_COMPILER 9 #define SKSL_COMPILER
10 10
11 #include <vector> 11 #include <vector>
12 #include "ir/SkSLProgram.h" 12 #include "ir/SkSLProgram.h"
13 #include "ir/SkSLSymbolTable.h" 13 #include "ir/SkSLSymbolTable.h"
14 #include "SkSLContext.h" 14 #include "SkSLContext.h"
15 #include "SkSLErrorReporter.h" 15 #include "SkSLErrorReporter.h"
16 #include "SkSLGLSLCodeGenerator.h" 16 #include "SkSLGLSLCodeGenerator.h"
17 17
18 namespace SkSL { 18 namespace SkSL {
19 19
20 class IRGenerator; 20 class IRGenerator;
21 21
22 /** 22 /**
23 * Main compiler entry point. This is a traditional compiler design which first parses the .sksl 23 * Main compiler entry point. This is a traditional compiler design which first parses the .sksl
24 * file into an abstract syntax tree (a tree of ASTNodes), then performs semanti c analysis to 24 * file into an abstract syntax tree (a tree of ASTNodes), then performs semanti c analysis to
25 * produce a Program (a tree of IRNodes), then feeds the Program into a CodeGene rator to produce 25 * produce a Program (a tree of IRNodes), then feeds the Program into a CodeGene rator to produce
26 * compiled output. 26 * compiled output.
27 *
28 * See the README for information about SkSL.
27 */ 29 */
28 class Compiler : public ErrorReporter { 30 class Compiler : public ErrorReporter {
29 public: 31 public:
30 Compiler(); 32 Compiler();
31 33
32 ~Compiler(); 34 ~Compiler();
33 35
34 std::unique_ptr<Program> convertProgram(Program::Kind kind, std::string text ); 36 std::unique_ptr<Program> convertProgram(Program::Kind kind, std::string text );
35 37
36 bool toSPIRV(Program::Kind kind, const std::string& text, std::ostream& out) ; 38 bool toSPIRV(Program::Kind kind, const std::string& text, std::ostream& out) ;
(...skipping 20 matching lines...) Expand all
57 std::string fSkiaVertText; // FIXME store parsed version instead 59 std::string fSkiaVertText; // FIXME store parsed version instead
58 60
59 Context fContext; 61 Context fContext;
60 int fErrorCount; 62 int fErrorCount;
61 std::string fErrorText; 63 std::string fErrorText;
62 }; 64 };
63 65
64 } // namespace 66 } // namespace
65 67
66 #endif 68 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698