| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 | 8 |
| 9 #ifndef SkScanPriv_DEFINED | 9 #ifndef SkScanPriv_DEFINED |
| 10 #define SkScanPriv_DEFINED | 10 #define SkScanPriv_DEFINED |
| 11 | 11 |
| 12 #include "SkScan.h" | 12 #include "SkScan.h" |
| 13 #include "SkBlitter.h" | 13 #include "SkBlitter.h" |
| 14 | 14 |
| 15 class SkScanClipper { | 15 class SkScanClipper { |
| 16 public: | 16 public: |
| 17 /** |
| 18 * boundsIsTruncated indicates that the blitter should be clipped even if |
| 19 * clip->contains(bounds) is true. |
| 20 */ |
| 17 SkScanClipper(SkBlitter* blitter, const SkRegion* clip, const SkIRect& bound
s, | 21 SkScanClipper(SkBlitter* blitter, const SkRegion* clip, const SkIRect& bound
s, |
| 18 bool skipRejectTest = false); | 22 bool skipRejectTest = false, bool boundsIsTruncated = false); |
| 19 | 23 |
| 20 SkBlitter* getBlitter() const { return fBlitter; } | 24 SkBlitter* getBlitter() const { return fBlitter; } |
| 21 const SkIRect* getClipRect() const { return fClipRect; } | 25 const SkIRect* getClipRect() const { return fClipRect; } |
| 22 | 26 |
| 23 private: | 27 private: |
| 24 SkRectClipBlitter fRectBlitter; | 28 SkRectClipBlitter fRectBlitter; |
| 25 SkRgnClipBlitter fRgnBlitter; | 29 SkRgnClipBlitter fRgnBlitter; |
| 26 SkBlitter* fBlitter; | 30 SkBlitter* fBlitter; |
| 27 const SkIRect* fClipRect; | 31 const SkIRect* fClipRect; |
| 28 }; | 32 }; |
| 29 | 33 |
| 30 // clipRect == null means path is entirely inside the clip | 34 // clipRect == null means path is entirely inside the clip |
| 31 void sk_fill_path(const SkPath& path, const SkIRect* clipRect, | 35 void sk_fill_path(const SkPath& path, const SkIRect* clipRect, |
| 32 SkBlitter* blitter, int start_y, int stop_y, int shiftEdgesUp, | 36 SkBlitter* blitter, int start_y, int stop_y, int shiftEdgesUp, |
| 33 const SkRegion& clipRgn); | 37 const SkRegion& clipRgn); |
| 34 | 38 |
| 35 // blit the rects above and below avoid, clipped to clip | 39 // blit the rects above and below avoid, clipped to clip |
| 36 void sk_blit_above(SkBlitter*, const SkIRect& avoid, const SkRegion& clip); | 40 void sk_blit_above(SkBlitter*, const SkIRect& avoid, const SkRegion& clip); |
| 37 void sk_blit_below(SkBlitter*, const SkIRect& avoid, const SkRegion& clip); | 41 void sk_blit_below(SkBlitter*, const SkIRect& avoid, const SkRegion& clip); |
| 38 | 42 |
| 39 #endif | 43 #endif |
| OLD | NEW |