| OLD | NEW |
| (Empty) | |
| 1 /* |
| 2 * Copyright 2015 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #include "SkPathIter.h" |
| 9 |
| 10 bool SkPathIter::next() { |
| 11 if (fStopVerbs == fVerbs) { |
| 12 return false; |
| 13 } |
| 14 |
| 15 #if 0 |
| 16 const uint8_t gPtsPerVerb[] = { |
| 17 1, // Move |
| 18 1, // Line |
| 19 2, // Quad |
| 20 2, // Conic |
| 21 3, // Cubic |
| 22 0, // Close |
| 23 }; |
| 24 #endif |
| 25 |
| 26 fCurrPts += fPrevPtsPerVerb; |
| 27 SkPathVerb verb = (SkPathVerb)(*--fVerbs); |
| 28 #if 0 |
| 29 fPrevPtsPerVerb = gPtsPerVerb[verb]; |
| 30 #elif 0 |
| 31 fPrevPtsPerVerb = ((verb >> 1) + 1) & -(kClose_SkPathVerb == verb); |
| 32 #else |
| 33 fPrevPtsPerVerb = (verb >> 4) & 7; |
| 34 #endif |
| 35 fNextPts += fPrevPtsPerVerb; |
| 36 fConicW += (verb >> 7);//(kConic_SkPathVerb == verb); |
| 37 return true; |
| 38 } |
| 39 |
| OLD | NEW |