| 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 <cmath> | 8 #include <cmath> |
| 9 #include "SkBuffer.h" | 9 #include "SkBuffer.h" |
| 10 #include "SkCubicClipper.h" | 10 #include "SkCubicClipper.h" |
| (...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1776 } | 1776 } |
| 1777 | 1777 |
| 1778 SkPath::Iter::Iter(const SkPath& path, bool forceClose) { | 1778 SkPath::Iter::Iter(const SkPath& path, bool forceClose) { |
| 1779 this->setPath(path, forceClose); | 1779 this->setPath(path, forceClose); |
| 1780 } | 1780 } |
| 1781 | 1781 |
| 1782 void SkPath::Iter::setPath(const SkPath& path, bool forceClose) { | 1782 void SkPath::Iter::setPath(const SkPath& path, bool forceClose) { |
| 1783 fPts = path.fPathRef->points(); | 1783 fPts = path.fPathRef->points(); |
| 1784 fVerbs = path.fPathRef->verbs(); | 1784 fVerbs = path.fPathRef->verbs(); |
| 1785 fVerbStop = path.fPathRef->verbsMemBegin(); | 1785 fVerbStop = path.fPathRef->verbsMemBegin(); |
| 1786 fConicWeights = path.fPathRef->conicWeights() - 1; // begin one behind | 1786 fConicWeights = path.fPathRef->conicWeights(); |
| 1787 if (fConicWeights) { |
| 1788 fConicWeights -= 1; // begin one behind |
| 1789 } |
| 1787 fLastPt.fX = fLastPt.fY = 0; | 1790 fLastPt.fX = fLastPt.fY = 0; |
| 1788 fMoveTo.fX = fMoveTo.fY = 0; | 1791 fMoveTo.fX = fMoveTo.fY = 0; |
| 1789 fForceClose = SkToU8(forceClose); | 1792 fForceClose = SkToU8(forceClose); |
| 1790 fNeedClose = false; | 1793 fNeedClose = false; |
| 1791 fSegmentState = kEmptyContour_SegmentState; | 1794 fSegmentState = kEmptyContour_SegmentState; |
| 1792 } | 1795 } |
| 1793 | 1796 |
| 1794 bool SkPath::Iter::isClosedContour() const { | 1797 bool SkPath::Iter::isClosedContour() const { |
| 1795 if (fVerbs == nullptr || fVerbs == fVerbStop) { | 1798 if (fVerbs == nullptr || fVerbs == fVerbStop) { |
| 1796 return false; | 1799 return false; |
| (...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3363 *direction = SkPath::kCW_Direction; | 3366 *direction = SkPath::kCW_Direction; |
| 3364 *start = firstDir; | 3367 *start = firstDir; |
| 3365 } else { | 3368 } else { |
| 3366 SkASSERT(((secondDir + 1) & 0b11) == firstDir); | 3369 SkASSERT(((secondDir + 1) & 0b11) == firstDir); |
| 3367 *direction = SkPath::kCCW_Direction; | 3370 *direction = SkPath::kCCW_Direction; |
| 3368 *start = secondDir; | 3371 *start = secondDir; |
| 3369 } | 3372 } |
| 3370 *rect = tempRect; | 3373 *rect = tempRect; |
| 3371 return true; | 3374 return true; |
| 3372 } | 3375 } |
| OLD | NEW |