| 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 |
| 11 #include "SkRegion.h" | 11 #include "SkRegion.h" |
| 12 #include "SkAAClip.h" | 12 #include "SkAAClip.h" |
| 13 | 13 |
| 14 class SkRRect; |
| 15 |
| 14 class SkRasterClip { | 16 class SkRasterClip { |
| 15 public: | 17 public: |
| 16 SkRasterClip(bool forceConservativeRects = false); | 18 SkRasterClip(bool forceConservativeRects = false); |
| 17 SkRasterClip(const SkIRect&, bool forceConservativeRects = false); | 19 SkRasterClip(const SkIRect&, bool forceConservativeRects = false); |
| 18 SkRasterClip(const SkRasterClip&); | 20 SkRasterClip(const SkRasterClip&); |
| 19 ~SkRasterClip(); | 21 ~SkRasterClip(); |
| 20 | 22 |
| 21 bool isForceConservativeRects() const { return fForceConservativeRects; } | 23 bool isForceConservativeRects() const { return fForceConservativeRects; } |
| 22 | 24 |
| 23 bool isBW() const { return fIsBW; } | 25 bool isBW() const { return fIsBW; } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 37 | 39 |
| 38 bool isComplex() const; | 40 bool isComplex() const; |
| 39 const SkIRect& getBounds() const; | 41 const SkIRect& getBounds() const; |
| 40 | 42 |
| 41 bool setEmpty(); | 43 bool setEmpty(); |
| 42 bool setRect(const SkIRect&); | 44 bool setRect(const SkIRect&); |
| 43 | 45 |
| 44 bool op(const SkIRect&, SkRegion::Op); | 46 bool op(const SkIRect&, SkRegion::Op); |
| 45 bool op(const SkRegion&, SkRegion::Op); | 47 bool op(const SkRegion&, SkRegion::Op); |
| 46 bool op(const SkRect&, const SkISize&, SkRegion::Op, bool doAA); | 48 bool op(const SkRect&, const SkISize&, SkRegion::Op, bool doAA); |
| 49 bool op(const SkRRect&, const SkISize&, SkRegion::Op, bool doAA); |
| 47 bool op(const SkPath&, const SkISize&, SkRegion::Op, bool doAA); | 50 bool op(const SkPath&, const SkISize&, SkRegion::Op, bool doAA); |
| 48 | 51 |
| 49 void translate(int dx, int dy, SkRasterClip* dst) const; | 52 void translate(int dx, int dy, SkRasterClip* dst) const; |
| 50 void translate(int dx, int dy) { | 53 void translate(int dx, int dy) { |
| 51 this->translate(dx, dy, this); | 54 this->translate(dx, dy, this); |
| 52 } | 55 } |
| 53 | 56 |
| 54 bool quickContains(const SkIRect& rect) const; | 57 bool quickContains(const SkIRect& rect) const; |
| 55 bool quickContains(int left, int top, int right, int bottom) const { | 58 bool quickContains(int left, int top, int right, int bottom) const { |
| 56 return quickContains(SkIRect::MakeLTRB(left, top, right, bottom)); | 59 return quickContains(SkIRect::MakeLTRB(left, top, right, bottom)); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 169 |
| 167 private: | 170 private: |
| 168 SkRegion fBWRgn; | 171 SkRegion fBWRgn; |
| 169 SkAAClipBlitter fAABlitter; | 172 SkAAClipBlitter fAABlitter; |
| 170 // what we return | 173 // what we return |
| 171 const SkRegion* fClipRgn; | 174 const SkRegion* fClipRgn; |
| 172 SkBlitter* fBlitter; | 175 SkBlitter* fBlitter; |
| 173 }; | 176 }; |
| 174 | 177 |
| 175 #endif | 178 #endif |
| OLD | NEW |