| 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 "SkLayerInfo.h" | 8 #include "SkLayerInfo.h" |
| 9 #include "SkRecordDraw.h" | 9 #include "SkRecordDraw.h" |
| 10 #include "SkPatchUtils.h" | 10 #include "SkPatchUtils.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 DRAW(ClipRegion, clipRegion(r.region, r.op)); | 96 DRAW(ClipRegion, clipRegion(r.region, r.op)); |
| 97 | 97 |
| 98 DRAW(BeginCommentGroup, beginCommentGroup(r.description)); | 98 DRAW(BeginCommentGroup, beginCommentGroup(r.description)); |
| 99 DRAW(AddComment, addComment(r.key, r.value)); | 99 DRAW(AddComment, addComment(r.key, r.value)); |
| 100 DRAW(EndCommentGroup, endCommentGroup()); | 100 DRAW(EndCommentGroup, endCommentGroup()); |
| 101 | 101 |
| 102 DRAW(DrawBitmap, drawBitmap(shallow_copy(r.bitmap), r.left, r.top, r.paint)); | 102 DRAW(DrawBitmap, drawBitmap(shallow_copy(r.bitmap), r.left, r.top, r.paint)); |
| 103 DRAW(DrawBitmapMatrix, drawBitmapMatrix(shallow_copy(r.bitmap), r.matrix, r.pain
t)); | 103 DRAW(DrawBitmapMatrix, drawBitmapMatrix(shallow_copy(r.bitmap), r.matrix, r.pain
t)); |
| 104 DRAW(DrawBitmapNine, drawBitmapNine(shallow_copy(r.bitmap), r.center, r.dst, r.p
aint)); | 104 DRAW(DrawBitmapNine, drawBitmapNine(shallow_copy(r.bitmap), r.center, r.dst, r.p
aint)); |
| 105 DRAW(DrawBitmapRectToRect, | 105 DRAW(DrawBitmapRectToRect, |
| 106 drawBitmapRectToRect(shallow_copy(r.bitmap), r.src, r.dst, r.paint, r.fl
ags)); | 106 drawBitmapRectToRect(shallow_copy(r.bitmap), r.src, r.dst, r.paint, |
| 107 SkCanvas::kNone_DrawBitmapRectFlag)); |
| 108 DRAW(DrawBitmapRectToRectBleed, |
| 109 drawBitmapRectToRect(shallow_copy(r.bitmap), r.src, r.dst, r.paint, |
| 110 SkCanvas::kBleed_DrawBitmapRectFlag)); |
| 107 DRAW(DrawDRRect, drawDRRect(r.outer, r.inner, r.paint)); | 111 DRAW(DrawDRRect, drawDRRect(r.outer, r.inner, r.paint)); |
| 108 DRAW(DrawImage, drawImage(r.image, r.left, r.top, r.paint)); | 112 DRAW(DrawImage, drawImage(r.image, r.left, r.top, r.paint)); |
| 109 DRAW(DrawImageRect, drawImageRect(r.image, r.src, r.dst, r.paint)); | 113 DRAW(DrawImageRect, drawImageRect(r.image, r.src, r.dst, r.paint)); |
| 110 DRAW(DrawOval, drawOval(r.oval, r.paint)); | 114 DRAW(DrawOval, drawOval(r.oval, r.paint)); |
| 111 DRAW(DrawPaint, drawPaint(r.paint)); | 115 DRAW(DrawPaint, drawPaint(r.paint)); |
| 112 DRAW(DrawPath, drawPath(r.path, r.paint)); | 116 DRAW(DrawPath, drawPath(r.path, r.paint)); |
| 113 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode, r.paint)); | 117 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode, r.paint)); |
| 114 DRAW(DrawPicture, drawPicture(r.picture, r.matrix, r.paint)); | 118 DRAW(DrawPicture, drawPicture(r.picture, r.matrix, r.paint)); |
| 115 DRAW(DrawPoints, drawPoints(r.mode, r.count, r.pts, r.paint)); | 119 DRAW(DrawPoints, drawPoints(r.mode, r.count, r.pts, r.paint)); |
| 116 DRAW(DrawPosText, drawPosText(r.text, r.byteLength, r.pos, r.paint)); | 120 DRAW(DrawPosText, drawPosText(r.text, r.byteLength, r.pos, r.paint)); |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 SkRect rect = SkRect::MakeXYWH(op.left, op.top, image->width(), image->h
eight()); | 412 SkRect rect = SkRect::MakeXYWH(op.left, op.top, image->width(), image->h
eight()); |
| 409 | 413 |
| 410 return this->adjustAndMap(rect, op.paint); | 414 return this->adjustAndMap(rect, op.paint); |
| 411 } | 415 } |
| 412 Bounds bounds(const DrawImageRect& op) const { | 416 Bounds bounds(const DrawImageRect& op) const { |
| 413 return this->adjustAndMap(op.dst, op.paint); | 417 return this->adjustAndMap(op.dst, op.paint); |
| 414 } | 418 } |
| 415 Bounds bounds(const DrawBitmapRectToRect& op) const { | 419 Bounds bounds(const DrawBitmapRectToRect& op) const { |
| 416 return this->adjustAndMap(op.dst, op.paint); | 420 return this->adjustAndMap(op.dst, op.paint); |
| 417 } | 421 } |
| 422 Bounds bounds(const DrawBitmapRectToRectBleed& op) const { |
| 423 return this->adjustAndMap(op.dst, op.paint); |
| 424 } |
| 418 Bounds bounds(const DrawBitmapNine& op) const { | 425 Bounds bounds(const DrawBitmapNine& op) const { |
| 419 return this->adjustAndMap(op.dst, op.paint); | 426 return this->adjustAndMap(op.dst, op.paint); |
| 420 } | 427 } |
| 421 Bounds bounds(const DrawBitmap& op) const { | 428 Bounds bounds(const DrawBitmap& op) const { |
| 422 const SkBitmap& bm = op.bitmap; | 429 const SkBitmap& bm = op.bitmap; |
| 423 return this->adjustAndMap(SkRect::MakeXYWH(op.left, op.top, bm.width(),
bm.height()), | 430 return this->adjustAndMap(SkRect::MakeXYWH(op.left, op.top, bm.width(),
bm.height()), |
| 424 op.paint); | 431 op.paint); |
| 425 } | 432 } |
| 426 Bounds bounds(const DrawBitmapMatrix& op) const { | 433 Bounds bounds(const DrawBitmapMatrix& op) const { |
| 427 const SkBitmap& bm = op.bitmap; | 434 const SkBitmap& bm = op.bitmap; |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 SkRecords::CollectLayers visitor(cullRect, record, data); | 765 SkRecords::CollectLayers visitor(cullRect, record, data); |
| 759 | 766 |
| 760 for (unsigned curOp = 0; curOp < record.count(); curOp++) { | 767 for (unsigned curOp = 0; curOp < record.count(); curOp++) { |
| 761 visitor.setCurrentOp(curOp); | 768 visitor.setCurrentOp(curOp); |
| 762 record.visit<void>(curOp, visitor); | 769 record.visit<void>(curOp, visitor); |
| 763 } | 770 } |
| 764 | 771 |
| 765 visitor.cleanUp(bbh); | 772 visitor.cleanUp(bbh); |
| 766 } | 773 } |
| 767 | 774 |
| OLD | NEW |