| 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 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1991 void SkPath::dump() const { | 1991 void SkPath::dump() const { |
| 1992 this->dump(NULL, false, false); | 1992 this->dump(NULL, false, false); |
| 1993 } | 1993 } |
| 1994 | 1994 |
| 1995 void SkPath::dumpHex() const { | 1995 void SkPath::dumpHex() const { |
| 1996 this->dump(NULL, false, true); | 1996 this->dump(NULL, false, true); |
| 1997 } | 1997 } |
| 1998 | 1998 |
| 1999 #ifdef SK_DEBUG | 1999 #ifdef SK_DEBUG |
| 2000 void SkPath::validate() const { | 2000 void SkPath::validate() const { |
| 2001 SkASSERT(this != NULL); | |
| 2002 SkASSERT((fFillType & ~3) == 0); | 2001 SkASSERT((fFillType & ~3) == 0); |
| 2003 | 2002 |
| 2004 #ifdef SK_DEBUG_PATH | 2003 #ifdef SK_DEBUG_PATH |
| 2005 if (!fBoundsIsDirty) { | 2004 if (!fBoundsIsDirty) { |
| 2006 SkRect bounds; | 2005 SkRect bounds; |
| 2007 | 2006 |
| 2008 bool isFinite = compute_pt_bounds(&bounds, *fPathRef.get()); | 2007 bool isFinite = compute_pt_bounds(&bounds, *fPathRef.get()); |
| 2009 SkASSERT(SkToBool(fIsFinite) == isFinite); | 2008 SkASSERT(SkToBool(fIsFinite) == isFinite); |
| 2010 | 2009 |
| 2011 if (fPathRef->countPoints() <= 1) { | 2010 if (fPathRef->countPoints() <= 1) { |
| (...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2792 switch (this->getFillType()) { | 2791 switch (this->getFillType()) { |
| 2793 case SkPath::kEvenOdd_FillType: | 2792 case SkPath::kEvenOdd_FillType: |
| 2794 case SkPath::kInverseEvenOdd_FillType: | 2793 case SkPath::kInverseEvenOdd_FillType: |
| 2795 w &= 1; | 2794 w &= 1; |
| 2796 break; | 2795 break; |
| 2797 default: | 2796 default: |
| 2798 break; | 2797 break; |
| 2799 } | 2798 } |
| 2800 return SkToBool(w); | 2799 return SkToBool(w); |
| 2801 } | 2800 } |
| OLD | NEW |