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

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

Issue 2442063002: Reduced skslc memory consumption (Closed)
Patch Set: improved error reporting Created 4 years, 2 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 | « no previous file | src/sksl/SkSLIRGenerator.cpp » ('j') | src/sksl/ir/SkSLFunctionDeclaration.h » ('J')
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_CONTEXT 8 #ifndef SKSL_CONTEXT
9 #define SKSL_CONTEXT 9 #define SKSL_CONTEXT
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 fUVec4_Type.get() })) 103 fUVec4_Type.get() }))
104 , fGenBType_Type(new Type("$genBType", { fBool_Type.get(), fBVec2_Type.get() , fBVec3_Type.get(), 104 , fGenBType_Type(new Type("$genBType", { fBool_Type.get(), fBVec2_Type.get() , fBVec3_Type.get(),
105 fBVec4_Type.get() })) 105 fBVec4_Type.get() }))
106 , fMat_Type(new Type("$mat")) 106 , fMat_Type(new Type("$mat"))
107 , fVec_Type(new Type("$vec", { fVec2_Type.get(), fVec2_Type.get(), fVec3_Typ e.get(), 107 , fVec_Type(new Type("$vec", { fVec2_Type.get(), fVec2_Type.get(), fVec3_Typ e.get(),
108 fVec4_Type.get() })) 108 fVec4_Type.get() }))
109 , fGVec_Type(new Type("$gvec")) 109 , fGVec_Type(new Type("$gvec"))
110 , fGVec2_Type(new Type("$gvec2")) 110 , fGVec2_Type(new Type("$gvec2"))
111 , fGVec3_Type(new Type("$gvec3")) 111 , fGVec3_Type(new Type("$gvec3"))
112 , fGVec4_Type(new Type("$gvec4", static_type(*fVec4_Type))) 112 , fGVec4_Type(new Type("$gvec4", static_type(*fVec4_Type)))
113 , fDVec_Type(new Type("$dvec")) 113 , fDVec_Type(new Type("$dvec", { fDVec2_Type.get(), fDVec2_Type.get(), fDVec 3_Type.get(),
dogben 2016/10/25 13:56:50 Is it allowed/supported to use a $genType (or $gen
114 , fIVec_Type(new Type("$ivec")) 114 fDVec4_Type.get() }))
115 , fUVec_Type(new Type("$uvec")) 115 , fIVec_Type(new Type("$ivec", { fIVec2_Type.get(), fIVec2_Type.get(), fIVec 3_Type.get(),
116 fIVec4_Type.get() }))
117 , fUVec_Type(new Type("$uvec", { fUVec2_Type.get(), fUVec2_Type.get(), fUVec 3_Type.get(),
118 fUVec4_Type.get() }))
116 , fBVec_Type(new Type("$bvec", { fBVec2_Type.get(), fBVec2_Type.get(), fBVec 3_Type.get(), 119 , fBVec_Type(new Type("$bvec", { fBVec2_Type.get(), fBVec2_Type.get(), fBVec 3_Type.get(),
117 fBVec4_Type.get() })) 120 fBVec4_Type.get() }))
118 , fInvalid_Type(new Type("<INVALID>")) 121 , fInvalid_Type(new Type("<INVALID>"))
119 , fDefined_Expression(new Defined(*fInvalid_Type)) {} 122 , fDefined_Expression(new Defined(*fInvalid_Type)) {}
120 123
121 static std::vector<const Type*> static_type(const Type& t) { 124 static std::vector<const Type*> static_type(const Type& t) {
122 return { &t, &t, &t, &t }; 125 return { &t, &t, &t, &t };
123 } 126 }
124 127
125 const std::unique_ptr<Type> fVoid_Type; 128 const std::unique_ptr<Type> fVoid_Type;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 return "<defined>"; 243 return "<defined>";
241 } 244 }
242 245
243 typedef Expression INHERITED; 246 typedef Expression INHERITED;
244 }; 247 };
245 }; 248 };
246 249
247 } // namespace 250 } // namespace
248 251
249 #endif 252 #endif
OLDNEW
« no previous file with comments | « no previous file | src/sksl/SkSLIRGenerator.cpp » ('j') | src/sksl/ir/SkSLFunctionDeclaration.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698