| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 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 | 8 |
| 9 | 9 |
| 10 #include "SkScript.h" | 10 #include "SkScript.h" |
| (...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 op = (SkOp) (op + 2); | 1349 op = (SkOp) (op + 2); |
| 1350 switch(op) { | 1350 switch(op) { |
| 1351 case kAddInt: | 1351 case kAddInt: |
| 1352 operand2.fS32 += operand1.fS32; | 1352 operand2.fS32 += operand1.fS32; |
| 1353 break; | 1353 break; |
| 1354 case kAddScalar: | 1354 case kAddScalar: |
| 1355 operand2.fScalar += operand1.fScalar; | 1355 operand2.fScalar += operand1.fScalar; |
| 1356 break; | 1356 break; |
| 1357 case kAddString: | 1357 case kAddString: |
| 1358 if (fTrackString.find(operand1.fString) < 0) { | 1358 if (fTrackString.find(operand1.fString) < 0) { |
| 1359 operand1.fString = SkNEW_ARGS(SkString, (*operand1.fString)); | 1359 operand1.fString = new SkString(*operand1.fString); |
| 1360 track(operand1.fString); | 1360 track(operand1.fString); |
| 1361 } | 1361 } |
| 1362 operand1.fString->append(*operand2.fString); | 1362 operand1.fString->append(*operand2.fString); |
| 1363 operand2 = operand1; | 1363 operand2 = operand1; |
| 1364 break; | 1364 break; |
| 1365 case kBitAnd: | 1365 case kBitAnd: |
| 1366 operand2.fS32 &= operand1.fS32; | 1366 operand2.fS32 &= operand1.fS32; |
| 1367 break; | 1367 break; |
| 1368 case kBitNot: | 1368 case kBitNot: |
| 1369 operand2.fS32 = ~operand2.fS32; | 1369 operand2.fS32 = ~operand2.fS32; |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1881 break; | 1881 break; |
| 1882 case SkType_String: | 1882 case SkType_String: |
| 1883 SkASSERT(strcmp(value.fOperand.fString->c_str(), scriptTests[ind
ex].fStringAnswer) == 0); | 1883 SkASSERT(strcmp(value.fOperand.fString->c_str(), scriptTests[ind
ex].fStringAnswer) == 0); |
| 1884 break; | 1884 break; |
| 1885 default: | 1885 default: |
| 1886 SkASSERT(0); | 1886 SkASSERT(0); |
| 1887 } | 1887 } |
| 1888 } | 1888 } |
| 1889 } | 1889 } |
| 1890 #endif | 1890 #endif |
| OLD | NEW |