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 "SkScan.h" | 10 #include "SkScan.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 } | 46 } |
47 | 47 |
48 void SkScan::FillXRect(const SkXRect& xr, const SkRegion* clip, | 48 void SkScan::FillXRect(const SkXRect& xr, const SkRegion* clip, |
49 SkBlitter* blitter) { | 49 SkBlitter* blitter) { |
50 SkIRect r; | 50 SkIRect r; |
51 | 51 |
52 XRect_round(xr, &r); | 52 XRect_round(xr, &r); |
53 SkScan::FillIRect(r, clip, blitter); | 53 SkScan::FillIRect(r, clip, blitter); |
54 } | 54 } |
55 | 55 |
56 #ifdef SK_SCALAR_IS_FLOAT | |
57 | |
58 void SkScan::FillRect(const SkRect& r, const SkRegion* clip, | 56 void SkScan::FillRect(const SkRect& r, const SkRegion* clip, |
59 SkBlitter* blitter) { | 57 SkBlitter* blitter) { |
60 SkIRect ir; | 58 SkIRect ir; |
61 | 59 |
62 r.round(&ir); | 60 r.round(&ir); |
63 SkScan::FillIRect(ir, clip, blitter); | 61 SkScan::FillIRect(ir, clip, blitter); |
64 } | 62 } |
65 | 63 |
66 #endif | |
67 | |
68 /////////////////////////////////////////////////////////////////////////////// | 64 /////////////////////////////////////////////////////////////////////////////// |
69 | 65 |
70 void SkScan::FillIRect(const SkIRect& r, const SkRasterClip& clip, | 66 void SkScan::FillIRect(const SkIRect& r, const SkRasterClip& clip, |
71 SkBlitter* blitter) { | 67 SkBlitter* blitter) { |
72 if (clip.isEmpty() || r.isEmpty()) { | 68 if (clip.isEmpty() || r.isEmpty()) { |
73 return; | 69 return; |
74 } | 70 } |
75 | 71 |
76 if (clip.isBW()) { | 72 if (clip.isBW()) { |
77 FillIRect(r, &clip.bwRgn(), blitter); | 73 FillIRect(r, &clip.bwRgn(), blitter); |
(...skipping 12 matching lines...) Expand all Loading... |
90 | 86 |
91 if (clip.isBW()) { | 87 if (clip.isBW()) { |
92 FillXRect(xr, &clip.bwRgn(), blitter); | 88 FillXRect(xr, &clip.bwRgn(), blitter); |
93 return; | 89 return; |
94 } | 90 } |
95 | 91 |
96 SkAAClipBlitterWrapper wrapper(clip, blitter); | 92 SkAAClipBlitterWrapper wrapper(clip, blitter); |
97 FillXRect(xr, &wrapper.getRgn(), wrapper.getBlitter()); | 93 FillXRect(xr, &wrapper.getRgn(), wrapper.getBlitter()); |
98 } | 94 } |
99 | 95 |
100 #ifdef SK_SCALAR_IS_FLOAT | |
101 | |
102 void SkScan::FillRect(const SkRect& r, const SkRasterClip& clip, | 96 void SkScan::FillRect(const SkRect& r, const SkRasterClip& clip, |
103 SkBlitter* blitter) { | 97 SkBlitter* blitter) { |
104 if (clip.isEmpty() || r.isEmpty()) { | 98 if (clip.isEmpty() || r.isEmpty()) { |
105 return; | 99 return; |
106 } | 100 } |
107 | 101 |
108 if (clip.isBW()) { | 102 if (clip.isBW()) { |
109 FillRect(r, &clip.bwRgn(), blitter); | 103 FillRect(r, &clip.bwRgn(), blitter); |
110 return; | 104 return; |
111 } | 105 } |
112 | 106 |
113 SkAAClipBlitterWrapper wrapper(clip, blitter); | 107 SkAAClipBlitterWrapper wrapper(clip, blitter); |
114 FillRect(r, &wrapper.getRgn(), wrapper.getBlitter()); | 108 FillRect(r, &wrapper.getRgn(), wrapper.getBlitter()); |
115 } | 109 } |
116 | |
117 #endif | |
OLD | NEW |