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/ir/SkSLType.h

Issue 2442063002: Reduced skslc memory consumption (Closed)
Patch Set: added a few more functions Created 4 years, 1 month 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/ir/SkSLFunctionDeclaration.h ('k') | src/sksl/sksl.include » ('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 SKIASL_TYPE 8 #ifndef SKIASL_TYPE
9 #define SKIASL_TYPE 9 #define SKIASL_TYPE
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 kSampler_Kind, 50 kSampler_Kind,
51 kOther_Kind 51 kOther_Kind
52 }; 52 };
53 53
54 // Create an "other" (special) type with the given name. These types cannot be directly 54 // Create an "other" (special) type with the given name. These types cannot be directly
55 // referenced from user code. 55 // referenced from user code.
56 Type(std::string name) 56 Type(std::string name)
57 : INHERITED(Position(), kType_Kind, std::move(name)) 57 : INHERITED(Position(), kType_Kind, std::move(name))
58 , fTypeKind(kOther_Kind) {} 58 , fTypeKind(kOther_Kind) {}
59 59
60 // Create a generic type which maps to the listed types. 60 // Create a generic type which maps to the listed types. As currently implem ented, there are
61 // always exactly four coercion targets, mapping to the scalar, vec2, vec3, and vec4 versions of
62 // a type.
61 Type(std::string name, std::vector<const Type*> types) 63 Type(std::string name, std::vector<const Type*> types)
62 : INHERITED(Position(), kType_Kind, std::move(name)) 64 : INHERITED(Position(), kType_Kind, std::move(name))
63 , fTypeKind(kGeneric_Kind) 65 , fTypeKind(kGeneric_Kind)
64 , fCoercibleTypes(std::move(types)) { 66 , fCoercibleTypes(std::move(types)) {
65 ASSERT(fCoercibleTypes.size() == 4); 67 ASSERT(fCoercibleTypes.size() == 4);
66 } 68 }
67 69
68 // Create a struct type with the given fields. 70 // Create a struct type with the given fields.
69 Type(std::string name, std::vector<Field> fields) 71 Type(std::string name, std::vector<Field> fields)
70 : INHERITED(Position(), kType_Kind, std::move(name)) 72 : INHERITED(Position(), kType_Kind, std::move(name))
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 const SpvDim_ fDimensions = SpvDim1D; 338 const SpvDim_ fDimensions = SpvDim1D;
337 const bool fIsDepth = false; 339 const bool fIsDepth = false;
338 const bool fIsArrayed = false; 340 const bool fIsArrayed = false;
339 const bool fIsMultisampled = false; 341 const bool fIsMultisampled = false;
340 const bool fIsSampled = false; 342 const bool fIsSampled = false;
341 }; 343 };
342 344
343 } // namespace 345 } // namespace
344 346
345 #endif 347 #endif
OLDNEW
« no previous file with comments | « src/sksl/ir/SkSLFunctionDeclaration.h ('k') | src/sksl/sksl.include » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698