| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #include "SkRecordDraw.h" | 8 #include "SkRecordDraw.h" |
| 9 #include "SkPatchUtils.h" | 9 #include "SkPatchUtils.h" |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 DRAW(DrawArc, drawArc(r.oval, r.startAngle, r.sweepAngle, r.useCenter, r.paint))
; | 99 DRAW(DrawArc, drawArc(r.oval, r.startAngle, r.sweepAngle, r.useCenter, r.paint))
; |
| 100 DRAW(DrawDRRect, drawDRRect(r.outer, r.inner, r.paint)); | 100 DRAW(DrawDRRect, drawDRRect(r.outer, r.inner, r.paint)); |
| 101 DRAW(DrawImage, drawImage(r.image.get(), r.left, r.top, r.paint)); | 101 DRAW(DrawImage, drawImage(r.image.get(), r.left, r.top, r.paint)); |
| 102 | 102 |
| 103 template <> void Draw::draw(const DrawImageLattice& r) { | 103 template <> void Draw::draw(const DrawImageLattice& r) { |
| 104 SkCanvas::Lattice lattice; | 104 SkCanvas::Lattice lattice; |
| 105 lattice.fXCount = r.xCount; | 105 lattice.fXCount = r.xCount; |
| 106 lattice.fXDivs = r.xDivs; | 106 lattice.fXDivs = r.xDivs; |
| 107 lattice.fYCount = r.yCount; | 107 lattice.fYCount = r.yCount; |
| 108 lattice.fYDivs = r.yDivs; | 108 lattice.fYDivs = r.yDivs; |
| 109 lattice.fFlags = (0 == r.flagCount) ? nullptr : r.flags; |
| 109 fCanvas->drawImageLattice(r.image.get(), lattice, r.dst, r.paint); | 110 fCanvas->drawImageLattice(r.image.get(), lattice, r.dst, r.paint); |
| 110 } | 111 } |
| 111 | 112 |
| 112 DRAW(DrawImageRect, legacy_drawImageRect(r.image.get(), r.src, r.dst, r.paint, r
.constraint)); | 113 DRAW(DrawImageRect, legacy_drawImageRect(r.image.get(), r.src, r.dst, r.paint, r
.constraint)); |
| 113 DRAW(DrawImageNine, drawImageNine(r.image.get(), r.center, r.dst, r.paint)); | 114 DRAW(DrawImageNine, drawImageNine(r.image.get(), r.center, r.dst, r.paint)); |
| 114 DRAW(DrawOval, drawOval(r.oval, r.paint)); | 115 DRAW(DrawOval, drawOval(r.oval, r.paint)); |
| 115 DRAW(DrawPaint, drawPaint(r.paint)); | 116 DRAW(DrawPaint, drawPaint(r.paint)); |
| 116 DRAW(DrawPath, drawPath(r.path, r.paint)); | 117 DRAW(DrawPath, drawPath(r.path, r.paint)); |
| 117 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode, r.paint)); | 118 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode, r.paint)); |
| 118 DRAW(DrawPicture, drawPicture(r.picture.get(), &r.matrix, r.paint)); | 119 DRAW(DrawPicture, drawPicture(r.picture.get(), &r.matrix, r.paint)); |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 | 630 |
| 630 void SkRecordFillBounds(const SkRect& cullRect, const SkRecord& record, SkRect b
ounds[]) { | 631 void SkRecordFillBounds(const SkRect& cullRect, const SkRecord& record, SkRect b
ounds[]) { |
| 631 SkRecords::FillBounds visitor(cullRect, record, bounds); | 632 SkRecords::FillBounds visitor(cullRect, record, bounds); |
| 632 for (int curOp = 0; curOp < record.count(); curOp++) { | 633 for (int curOp = 0; curOp < record.count(); curOp++) { |
| 633 visitor.setCurrentOp(curOp); | 634 visitor.setCurrentOp(curOp); |
| 634 record.visit(curOp, visitor); | 635 record.visit(curOp, visitor); |
| 635 } | 636 } |
| 636 visitor.cleanUp(); | 637 visitor.cleanUp(); |
| 637 } | 638 } |
| 638 | 639 |
| OLD | NEW |