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" |
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 } else { | 1111 } else { |
1112 this->moveTo(bounds.fLeft, | 1112 this->moveTo(bounds.fLeft, |
1113 bounds.fTop + rrect.fRadii[SkRRect::kUpperLeft_Corner].
fY); | 1113 bounds.fTop + rrect.fRadii[SkRRect::kUpperLeft_Corner].
fY); |
1114 add_corner_quads(this, rrect, SkRRect::kLowerLeft_Corner, dir); | 1114 add_corner_quads(this, rrect, SkRRect::kLowerLeft_Corner, dir); |
1115 add_corner_quads(this, rrect, SkRRect::kLowerRight_Corner, dir); | 1115 add_corner_quads(this, rrect, SkRRect::kLowerRight_Corner, dir); |
1116 add_corner_quads(this, rrect, SkRRect::kUpperRight_Corner, dir); | 1116 add_corner_quads(this, rrect, SkRRect::kUpperRight_Corner, dir); |
1117 add_corner_quads(this, rrect, SkRRect::kUpperLeft_Corner, dir); | 1117 add_corner_quads(this, rrect, SkRRect::kUpperLeft_Corner, dir); |
1118 } | 1118 } |
1119 this->close(); | 1119 this->close(); |
1120 } | 1120 } |
| 1121 SkDEBUGCODE(fPathRef->validate();) |
1121 } | 1122 } |
1122 | 1123 |
1123 bool SkPath::hasOnlyMoveTos() const { | 1124 bool SkPath::hasOnlyMoveTos() const { |
1124 int count = fPathRef->countVerbs(); | 1125 int count = fPathRef->countVerbs(); |
1125 const uint8_t* verbs = const_cast<const SkPathRef*>(fPathRef.get())->verbsMe
mBegin(); | 1126 const uint8_t* verbs = const_cast<const SkPathRef*>(fPathRef.get())->verbsMe
mBegin(); |
1126 for (int i = 0; i < count; ++i) { | 1127 for (int i = 0; i < count; ++i) { |
1127 if (*verbs == kLine_Verb || | 1128 if (*verbs == kLine_Verb || |
1128 *verbs == kQuad_Verb || | 1129 *verbs == kQuad_Verb || |
1129 *verbs == kConic_Verb || | 1130 *verbs == kConic_Verb || |
1130 *verbs == kCubic_Verb) { | 1131 *verbs == kCubic_Verb) { |
(...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2866 switch (this->getFillType()) { | 2867 switch (this->getFillType()) { |
2867 case SkPath::kEvenOdd_FillType: | 2868 case SkPath::kEvenOdd_FillType: |
2868 case SkPath::kInverseEvenOdd_FillType: | 2869 case SkPath::kInverseEvenOdd_FillType: |
2869 w &= 1; | 2870 w &= 1; |
2870 break; | 2871 break; |
2871 default: | 2872 default: |
2872 break; | 2873 break; |
2873 } | 2874 } |
2874 return SkToBool(w); | 2875 return SkToBool(w); |
2875 } | 2876 } |
OLD | NEW |