OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #ifndef SkScript2_DEFINED | 8 #ifndef SkScript2_DEFINED |
9 #define SkScript2_DEFINED | 9 #define SkScript2_DEFINED |
10 | 10 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 unsigned int fLeftType : 3; // SkOpType union, but only lower values | 181 unsigned int fLeftType : 3; // SkOpType union, but only lower values |
182 unsigned int fRightType : 3; // SkOpType union, but only lower value
s | 182 unsigned int fRightType : 3; // SkOpType union, but only lower value
s |
183 OpBias fBias : 1; | 183 OpBias fBias : 1; |
184 ResultIsBoolean fResultIsBoolean : 1; | 184 ResultIsBoolean fResultIsBoolean : 1; |
185 }; | 185 }; |
186 | 186 |
187 struct Branch { | 187 struct Branch { |
188 Branch() { | 188 Branch() { |
189 } | 189 } |
190 | 190 |
191 Branch(Op op, int depth, unsigned offset) : fOffset(offset), fOpStackDep
th(depth), fOperator(op), | 191 Branch(Op op, int depth, size_t offset) |
192 fPrimed(kIsNotPrimed), fDone(kIsNotDone) { | 192 : fOffset(SkToU16(offset)), fOpStackDepth(depth), fOperator(op) |
| 193 , fPrimed(kIsNotPrimed), fDone(kIsNotDone) { |
193 } | 194 } |
194 | 195 |
195 enum Primed { | 196 enum Primed { |
196 kIsNotPrimed, | 197 kIsNotPrimed, |
197 kIsPrimed | 198 kIsPrimed |
198 }; | 199 }; |
199 | 200 |
200 enum Done { | 201 enum Done { |
201 kIsNotDone, | 202 kIsNotDone, |
202 kIsDone, | 203 kIsDone, |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 SkOperand2::OpType fType; | 283 SkOperand2::OpType fType; |
283 int32_t fIntAnswer; | 284 int32_t fIntAnswer; |
284 SkScalar fScalarAnswer; | 285 SkScalar fScalarAnswer; |
285 const char* fStringAnswer; | 286 const char* fStringAnswer; |
286 }; | 287 }; |
287 | 288 |
288 #endif | 289 #endif |
289 | 290 |
290 | 291 |
291 #endif // SkScript2_DEFINED | 292 #endif // SkScript2_DEFINED |
OLD | NEW |