OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
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 #ifndef SkRasterClip_DEFINED | 8 #ifndef SkRasterClip_DEFINED |
9 #define SkRasterClip_DEFINED | 9 #define SkRasterClip_DEFINED |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 void translate(int dx, int dy, SkRasterClip* dst) const; | 52 void translate(int dx, int dy, SkRasterClip* dst) const; |
53 void translate(int dx, int dy) { | 53 void translate(int dx, int dy) { |
54 this->translate(dx, dy, this); | 54 this->translate(dx, dy, this); |
55 } | 55 } |
56 | 56 |
57 bool quickContains(const SkIRect& rect) const; | 57 bool quickContains(const SkIRect& rect) const; |
58 bool quickContains(int left, int top, int right, int bottom) const { | 58 bool quickContains(int left, int top, int right, int bottom) const { |
59 return quickContains(SkIRect::MakeLTRB(left, top, right, bottom)); | 59 return quickContains(SkIRect::MakeLTRB(left, top, right, bottom)); |
60 } | 60 } |
| 61 bool quickContains(const SkRect& rect) const; |
61 | 62 |
62 /** | 63 /** |
63 * Return true if this region is empty, or if the specified rectangle does | 64 * Return true if this region is empty, or if the specified rectangle does |
64 * not intersect the region. Returning false is not a guarantee that they | 65 * not intersect the region. Returning false is not a guarantee that they |
65 * intersect, but returning true is a guarantee that they do not. | 66 * intersect, but returning true is a guarantee that they do not. |
66 */ | 67 */ |
67 bool quickReject(const SkIRect& rect) const { | 68 bool quickReject(const SkIRect& rect) const { |
68 return !SkIRect::Intersects(this->getBounds(), rect); | 69 return !SkIRect::Intersects(this->getBounds(), rect); |
69 } | 70 } |
| 71 bool quickReject(const SkRect& rect) const; |
70 | 72 |
71 // hack for SkCanvas::getTotalClip | 73 // hack for SkCanvas::getTotalClip |
72 const SkRegion& forceGetBW(); | 74 const SkRegion& forceGetBW(); |
73 | 75 |
74 #ifdef SK_DEBUG | 76 #ifdef SK_DEBUG |
75 void validate() const; | 77 void validate() const; |
76 #else | 78 #else |
77 void validate() const {} | 79 void validate() const {} |
78 #endif | 80 #endif |
79 | 81 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 171 |
170 private: | 172 private: |
171 SkRegion fBWRgn; | 173 SkRegion fBWRgn; |
172 SkAAClipBlitter fAABlitter; | 174 SkAAClipBlitter fAABlitter; |
173 // what we return | 175 // what we return |
174 const SkRegion* fClipRgn; | 176 const SkRegion* fClipRgn; |
175 SkBlitter* fBlitter; | 177 SkBlitter* fBlitter; |
176 }; | 178 }; |
177 | 179 |
178 #endif | 180 #endif |
OLD | NEW |