Chromium Code Reviews| Index: src/core/SkRecordDraw.cpp |
| diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp |
| index bdebcb7c1560fce0ef6fe0f91306e528f7aadaf9..1c4e18873e3d9fa5b894644b5e8b35dd510eec34 100644 |
| --- a/src/core/SkRecordDraw.cpp |
| +++ b/src/core/SkRecordDraw.cpp |
| @@ -94,6 +94,8 @@ DRAW(DrawBitmapNine, drawBitmapNine(shallow_copy(r.bitmap), r.center, r.dst, r.p |
| DRAW(DrawBitmapRectToRect, |
| drawBitmapRectToRect(shallow_copy(r.bitmap), r.src, r.dst, r.paint, r.flags)); |
| DRAW(DrawDRRect, drawDRRect(r.outer, r.inner, r.paint)); |
| +DRAW(DrawImage, drawImage(r.image, r.left, r.top, r.paint)); |
| +DRAW(DrawImageRect, drawImageRect(r.image, r.src, r.dst, r.paint)); |
| DRAW(DrawOval, drawOval(r.oval, r.paint)); |
| DRAW(DrawPaint, drawPaint(r.paint)); |
| DRAW(DrawPath, drawPath(r.path, r.paint)); |
| @@ -339,7 +341,14 @@ private: |
| Bounds bounds(const DrawDRRect& op) const { |
| return this->adjustAndMap(op.outer.rect(), &op.paint); |
| } |
| - |
| + Bounds bounds(const DrawImage& op) const { |
| + const SkImage* image = op.image; |
| + return this->adjustAndMap(SkRect::MakeXYWH(op.left, op.top, image->width(), image->height()), |
|
mtklein
2014/09/27 15:41:22
May be over 100 cols here?
Rémi Piotaix
2014/09/29 17:57:54
Yes, 101 :-@
Done.
|
| + op.paint); |
| + } |
| + Bounds bounds(const DrawImageRect& op) const { |
| + return this->adjustAndMap(op.dst, op.paint); |
| + } |
| Bounds bounds(const DrawBitmapRectToRect& op) const { |
| return this->adjustAndMap(op.dst, op.paint); |
| } |