Chromium Code Reviews| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 SkAutoPathBoundsUpdate(SkPath* path, const SkRect& r) : fRect(r) { | 89 SkAutoPathBoundsUpdate(SkPath* path, const SkRect& r) : fRect(r) { |
| 90 this->init(path); | 90 this->init(path); |
| 91 } | 91 } |
| 92 | 92 |
| 93 SkAutoPathBoundsUpdate(SkPath* path, SkScalar left, SkScalar top, | 93 SkAutoPathBoundsUpdate(SkPath* path, SkScalar left, SkScalar top, |
| 94 SkScalar right, SkScalar bottom) { | 94 SkScalar right, SkScalar bottom) { |
| 95 fRect.set(left, top, right, bottom); | 95 fRect.set(left, top, right, bottom); |
| 96 this->init(path); | 96 this->init(path); |
| 97 } | 97 } |
| 98 | 98 |
| 99 ~SkAutoPathBoundsUpdate() { | 99 ~SkAutoPathBoundsUpdate() { |
|
robertphillips
2013/10/30 21:54:08
I think this is wrong!
reed1
2013/10/31 15:23:23
Done.
| |
| 100 fPath->setIsConvex(fDegenerate); | 100 fPath->setConvexity(fDegenerate ? SkPath::kUnknown_Convexity |
| 101 : SkPath::kConvex_Convexity); | |
| 101 if (fEmpty || fHasValidBounds) { | 102 if (fEmpty || fHasValidBounds) { |
| 102 fPath->setBounds(fRect); | 103 fPath->setBounds(fRect); |
| 103 } | 104 } |
| 104 } | 105 } |
| 105 | 106 |
| 106 private: | 107 private: |
| 107 SkPath* fPath; | 108 SkPath* fPath; |
| 108 SkRect fRect; | 109 SkRect fRect; |
| 109 bool fHasValidBounds; | 110 bool fHasValidBounds; |
| 110 bool fDegenerate; | 111 bool fDegenerate; |
| (...skipping 2894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3005 switch (this->getFillType()) { | 3006 switch (this->getFillType()) { |
| 3006 case SkPath::kEvenOdd_FillType: | 3007 case SkPath::kEvenOdd_FillType: |
| 3007 case SkPath::kInverseEvenOdd_FillType: | 3008 case SkPath::kInverseEvenOdd_FillType: |
| 3008 w &= 1; | 3009 w &= 1; |
| 3009 break; | 3010 break; |
| 3010 default: | 3011 default: |
| 3011 break; | 3012 break; |
| 3012 } | 3013 } |
| 3013 return SkToBool(w); | 3014 return SkToBool(w); |
| 3014 } | 3015 } |
| OLD | NEW |