| 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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 if (path.isConvex() && (nullptr == proc)) { | 503 if (path.isConvex() && (nullptr == proc)) { |
| 504 SkASSERT(count >= 2); // convex walker does not handle missing right e
dges | 504 SkASSERT(count >= 2); // convex walker does not handle missing right e
dges |
| 505 walk_convex_edges(&headEdge, path.getFillType(), blitter, start_y, stop_
y, nullptr); | 505 walk_convex_edges(&headEdge, path.getFillType(), blitter, start_y, stop_
y, nullptr); |
| 506 } else { | 506 } else { |
| 507 int rightEdge; | 507 int rightEdge; |
| 508 if (clipRect) { | 508 if (clipRect) { |
| 509 rightEdge = clipRect->right(); | 509 rightEdge = clipRect->right(); |
| 510 } else { | 510 } else { |
| 511 rightEdge = SkScalarRoundToInt(path.getBounds().right()) << shiftEdg
esUp; | 511 rightEdge = SkScalarRoundToInt(path.getBounds().right()) << shiftEdg
esUp; |
| 512 } | 512 } |
| 513 | 513 |
| 514 walk_edges(&headEdge, path.getFillType(), blitter, start_y, stop_y, proc
, rightEdge); | 514 walk_edges(&headEdge, path.getFillType(), blitter, start_y, stop_y, proc
, rightEdge); |
| 515 } | 515 } |
| 516 } | 516 } |
| 517 | 517 |
| 518 void sk_blit_above(SkBlitter* blitter, const SkIRect& ir, const SkRegion& clip)
{ | 518 void sk_blit_above(SkBlitter* blitter, const SkIRect& ir, const SkRegion& clip)
{ |
| 519 const SkIRect& cr = clip.getBounds(); | 519 const SkIRect& cr = clip.getBounds(); |
| 520 SkIRect tmp; | 520 SkIRect tmp; |
| 521 | 521 |
| 522 tmp.fLeft = cr.fLeft; | 522 tmp.fLeft = cr.fLeft; |
| 523 tmp.fRight = cr.fRight; | 523 tmp.fRight = cr.fRight; |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 clipRgn = &wrap.getRgn(); | 768 clipRgn = &wrap.getRgn(); |
| 769 blitter = wrap.getBlitter(); | 769 blitter = wrap.getBlitter(); |
| 770 } | 770 } |
| 771 | 771 |
| 772 SkScanClipper clipper(blitter, clipRgn, ir); | 772 SkScanClipper clipper(blitter, clipRgn, ir); |
| 773 blitter = clipper.getBlitter(); | 773 blitter = clipper.getBlitter(); |
| 774 if (blitter) { | 774 if (blitter) { |
| 775 sk_fill_triangle(pts, clipper.getClipRect(), blitter, ir); | 775 sk_fill_triangle(pts, clipper.getClipRect(), blitter, ir); |
| 776 } | 776 } |
| 777 } | 777 } |
| OLD | NEW |