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 #include "SkScanPriv.h" | 8 #include "SkScanPriv.h" |
9 #include "SkBlitter.h" | 9 #include "SkBlitter.h" |
10 #include "SkEdge.h" | 10 #include "SkEdge.h" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 SkFixed rite = riteE->fX; | 253 SkFixed rite = riteE->fX; |
254 SkFixed dRite = riteE->fDX; | 254 SkFixed dRite = riteE->fDX; |
255 int count = local_bot - local_top; | 255 int count = local_bot - local_top; |
256 SkASSERT(count >= 0); | 256 SkASSERT(count >= 0); |
257 if (0 == (dLeft | dRite)) { | 257 if (0 == (dLeft | dRite)) { |
258 int L = SkFixedRoundToInt(left); | 258 int L = SkFixedRoundToInt(left); |
259 int R = SkFixedRoundToInt(rite); | 259 int R = SkFixedRoundToInt(rite); |
260 if (L < R) { | 260 if (L < R) { |
261 count += 1; | 261 count += 1; |
262 blitter->blitRect(L, local_top, R - L, count); | 262 blitter->blitRect(L, local_top, R - L, count); |
263 left += count * dLeft; | |
264 rite += count * dRite; | |
265 } | 263 } |
266 local_top = local_bot + 1; | 264 local_top = local_bot + 1; |
267 } else { | 265 } else { |
268 do { | 266 do { |
269 int L = SkFixedRoundToInt(left); | 267 int L = SkFixedRoundToInt(left); |
270 int R = SkFixedRoundToInt(rite); | 268 int R = SkFixedRoundToInt(rite); |
271 if (L < R) { | 269 if (L < R) { |
272 blitter->blitH(L, local_top, R - L); | 270 blitter->blitH(L, local_top, R - L); |
273 } | 271 } |
274 left += dLeft; | 272 left += dLeft; |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 clipRgn = &wrap.getRgn(); | 722 clipRgn = &wrap.getRgn(); |
725 blitter = wrap.getBlitter(); | 723 blitter = wrap.getBlitter(); |
726 } | 724 } |
727 | 725 |
728 SkScanClipper clipper(blitter, clipRgn, ir); | 726 SkScanClipper clipper(blitter, clipRgn, ir); |
729 blitter = clipper.getBlitter(); | 727 blitter = clipper.getBlitter(); |
730 if (blitter) { | 728 if (blitter) { |
731 sk_fill_triangle(pts, clipper.getClipRect(), blitter, ir); | 729 sk_fill_triangle(pts, clipper.getClipRect(), blitter, ir); |
732 } | 730 } |
733 } | 731 } |
OLD | NEW |