| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 #include "SkBuffer.h" | 8 #include "SkBuffer.h" |
| 9 #include "SkErrorInternals.h" | 9 #include "SkErrorInternals.h" |
| 10 #include "SkGeometry.h" | 10 #include "SkGeometry.h" |
| (...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1834 case kClose_Verb: | 1834 case kClose_Verb: |
| 1835 break; | 1835 break; |
| 1836 case kDone_Verb: | 1836 case kDone_Verb: |
| 1837 SkASSERT(fVerbs == fVerbStop); | 1837 SkASSERT(fVerbs == fVerbStop); |
| 1838 break; | 1838 break; |
| 1839 } | 1839 } |
| 1840 fPts = srcPts; | 1840 fPts = srcPts; |
| 1841 return (Verb)verb; | 1841 return (Verb)verb; |
| 1842 } | 1842 } |
| 1843 | 1843 |
| 1844 #include "SkPathIter.h" |
| 1845 |
| 1846 SkPathIter::SkPathIter(const SkPath& path) |
| 1847 : fCurrPts(path.fPathRef->points()) |
| 1848 , fNextPts(path.fPathRef->points() + 1) |
| 1849 , fConicW(path.fPathRef->conicWeights() - 1) |
| 1850 , fVerbs(path.fPathRef->verbs()) |
| 1851 , fStopVerbs(path.fPathRef->verbsMemBegin()) |
| 1852 , fPrevPtsPerVerb(0) |
| 1853 { |
| 1854 if (fVerbs != fStopVerbs) { |
| 1855 SkASSERT(kMove_SkPathVerb == fVerbs[-1]); |
| 1856 } |
| 1857 } |
| 1858 |
| 1844 /////////////////////////////////////////////////////////////////////////////// | 1859 /////////////////////////////////////////////////////////////////////////////// |
| 1845 | 1860 |
| 1846 /* | 1861 /* |
| 1847 Format in compressed buffer: [ptCount, verbCount, pts[], verbs[]] | 1862 Format in compressed buffer: [ptCount, verbCount, pts[], verbs[]] |
| 1848 */ | 1863 */ |
| 1849 | 1864 |
| 1850 size_t SkPath::writeToMemory(void* storage) const { | 1865 size_t SkPath::writeToMemory(void* storage) const { |
| 1851 SkDEBUGCODE(this->validate();) | 1866 SkDEBUGCODE(this->validate();) |
| 1852 | 1867 |
| 1853 if (nullptr == storage) { | 1868 if (nullptr == storage) { |
| (...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2808 switch (this->getFillType()) { | 2823 switch (this->getFillType()) { |
| 2809 case SkPath::kEvenOdd_FillType: | 2824 case SkPath::kEvenOdd_FillType: |
| 2810 case SkPath::kInverseEvenOdd_FillType: | 2825 case SkPath::kInverseEvenOdd_FillType: |
| 2811 w &= 1; | 2826 w &= 1; |
| 2812 break; | 2827 break; |
| 2813 default: | 2828 default: |
| 2814 break; | 2829 break; |
| 2815 } | 2830 } |
| 2816 return SkToBool(w); | 2831 return SkToBool(w); |
| 2817 } | 2832 } |
| OLD | NEW |