| 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 #include "SkParse.h" | 8 #include "SkParse.h" |
| 9 #include "SkParsePath.h" | 9 #include "SkParsePath.h" |
| 10 | 10 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 fPath.moveTo(c); | 160 fPath.moveTo(c); |
| 161 fPath.lineTo(f); | 161 fPath.lineTo(f); |
| 162 fPath.close(); | 162 fPath.close(); |
| 163 } | 163 } |
| 164 #endif | 164 #endif |
| 165 c = f; | 165 c = f; |
| 166 op = '\0'; | 166 op = '\0'; |
| 167 break; | 167 break; |
| 168 case '~': { | 168 case '~': { |
| 169 SkPoint args[2]; | 169 SkPoint args[2]; |
| 170 data = find_points(data, args, 2, false, NULL); | 170 data = find_points(data, args, 2, false, nullptr); |
| 171 path.moveTo(args[0].fX, args[0].fY); | 171 path.moveTo(args[0].fX, args[0].fY); |
| 172 path.lineTo(args[1].fX, args[1].fY); | 172 path.lineTo(args[1].fX, args[1].fY); |
| 173 } break; | 173 } break; |
| 174 default: | 174 default: |
| 175 return false; | 175 return false; |
| 176 } | 176 } |
| 177 if (previousOp == 0) { | 177 if (previousOp == 0) { |
| 178 f = c; | 178 f = c; |
| 179 } | 179 } |
| 180 previousOp = op; | 180 previousOp = op; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 case SkPath::kClose_Verb: | 242 case SkPath::kClose_Verb: |
| 243 stream.write("Z", 1); | 243 stream.write("Z", 1); |
| 244 break; | 244 break; |
| 245 case SkPath::kDone_Verb: | 245 case SkPath::kDone_Verb: |
| 246 str->resize(stream.getOffset()); | 246 str->resize(stream.getOffset()); |
| 247 stream.copyTo(str->writable_str()); | 247 stream.copyTo(str->writable_str()); |
| 248 return; | 248 return; |
| 249 } | 249 } |
| 250 } | 250 } |
| 251 } | 251 } |
| OLD | NEW |