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

Side by Side Diff: src/sksl/ir/SkSLModifiers.h

Issue 2187433003: added support for push_constant layout (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: minor cleanups, added some matrix tests 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
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_MODIFIERS 8 #ifndef SKSL_MODIFIERS
9 #define SKSL_MODIFIERS 9 #define SKSL_MODIFIERS
10 10
(...skipping 20 matching lines...) Expand all
31 }; 31 };
32 32
33 Modifiers(const ASTModifiers& modifiers) 33 Modifiers(const ASTModifiers& modifiers)
34 : fLayout(modifiers.fLayout) 34 : fLayout(modifiers.fLayout)
35 , fFlags(modifiers.fFlags) {} 35 , fFlags(modifiers.fFlags) {}
36 36
37 Modifiers(Layout& layout, int flags) 37 Modifiers(Layout& layout, int flags)
38 : fLayout(layout) 38 : fLayout(layout)
39 , fFlags(flags) {} 39 , fFlags(flags) {}
40 40
41 Modifiers()
42 : fLayout(Layout())
43 , fFlags(0) {}
44
41 std::string description() const { 45 std::string description() const {
42 std::string result = fLayout.description(); 46 std::string result = fLayout.description();
43 if (fFlags & kUniform_Flag) { 47 if (fFlags & kUniform_Flag) {
44 result += "uniform "; 48 result += "uniform ";
45 } 49 }
46 if (fFlags & kConst_Flag) { 50 if (fFlags & kConst_Flag) {
47 result += "const "; 51 result += "const ";
48 } 52 }
49 if (fFlags & kLowp_Flag) { 53 if (fFlags & kLowp_Flag) {
50 result += "lowp "; 54 result += "lowp ";
(...skipping 30 matching lines...) Expand all
81 return !(*this == other); 85 return !(*this == other);
82 } 86 }
83 87
84 Layout fLayout; 88 Layout fLayout;
85 int fFlags; 89 int fFlags;
86 }; 90 };
87 91
88 } // namespace 92 } // namespace
89 93
90 #endif 94 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698