| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 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 | 8 |
| 9 | 9 |
| 10 #include "SkBuffer.h" | 10 #include "SkBuffer.h" |
| 11 #include "SkErrorInternals.h" | 11 #include "SkErrorInternals.h" |
| 12 #include "SkMath.h" | 12 #include "SkMath.h" |
| 13 #include "SkPath.h" | 13 #include "SkPath.h" |
| 14 #include "SkPathRef.h" | 14 #include "SkPathRef.h" |
| 15 #include "SkRRect.h" | 15 #include "SkRRect.h" |
| 16 #include "SkThread.h" | 16 #include "SkThread.h" |
| 17 | 17 |
| 18 SK_DEFINE_INST_COUNT(SkPath); | |
| 19 | |
| 20 // This value is just made-up for now. When count is 4, calling memset was much | 18 // This value is just made-up for now. When count is 4, calling memset was much |
| 21 // slower than just writing the loop. This seems odd, and hopefully in the | 19 // slower than just writing the loop. This seems odd, and hopefully in the |
| 22 // future this we appear to have been a fluke... | 20 // future this we appear to have been a fluke... |
| 23 #define MIN_COUNT_FOR_MEMSET_TO_BE_FAST 16 | 21 #define MIN_COUNT_FOR_MEMSET_TO_BE_FAST 16 |
| 24 | 22 |
| 25 //////////////////////////////////////////////////////////////////////////// | 23 //////////////////////////////////////////////////////////////////////////// |
| 26 | 24 |
| 27 /** | 25 /** |
| 28 * Path.bounds is defined to be the bounds of all the control points. | 26 * Path.bounds is defined to be the bounds of all the control points. |
| 29 * If we called bounds.join(r) we would skip r if r was empty, which breaks | 27 * If we called bounds.join(r) we would skip r if r was empty, which breaks |
| (...skipping 2874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2904 switch (this->getFillType()) { | 2902 switch (this->getFillType()) { |
| 2905 case SkPath::kEvenOdd_FillType: | 2903 case SkPath::kEvenOdd_FillType: |
| 2906 case SkPath::kInverseEvenOdd_FillType: | 2904 case SkPath::kInverseEvenOdd_FillType: |
| 2907 w &= 1; | 2905 w &= 1; |
| 2908 break; | 2906 break; |
| 2909 default: | 2907 default: |
| 2910 break; | 2908 break; |
| 2911 } | 2909 } |
| 2912 return SkToBool(w); | 2910 return SkToBool(w); |
| 2913 } | 2911 } |
| OLD | NEW |