Chromium Code Reviews| Index: src/core/SkBBoxRecord.cpp |
| diff --git a/src/core/SkBBoxRecord.cpp b/src/core/SkBBoxRecord.cpp |
| index 802eb669bf3effeca9de693b8c14ad9197c74a40..be842877910a1e20884b946ca010852723f22720 100644 |
| --- a/src/core/SkBBoxRecord.cpp |
| +++ b/src/core/SkBBoxRecord.cpp |
| @@ -293,10 +293,17 @@ void SkBBoxRecord::drawPatch(const SkPatch& patch, const SkPaint& paint) { |
| } |
| } |
| -void SkBBoxRecord::onDrawPicture(const SkPicture* picture) { |
| - if (picture->width() > 0 && picture->height() > 0 && |
| - this->transformBounds(SkRect::MakeWH(picture->width(), picture->height()), NULL)) { |
| - this->INHERITED::onDrawPicture(picture); |
| +void SkBBoxRecord::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix, |
| + const SkPaint* paint) { |
| + SkRect bounds = SkRect::MakeWH(SkIntToScalar(picture->width()), |
| + SkIntToScalar(picture->height())); |
| + // todo: wonder if we should allow passing an optional matrix to transformBounds so we don't |
| + // end up transforming the rect twice. |
| + if (matrix) { |
| + matrix->mapRect(&bounds); |
| + } |
| + if (this->transformBounds(bounds, NULL)) { |
|
mtklein
2014/08/07 21:25:19
NULL -> paint?
reed1
2014/08/08 13:57:29
Done.
|
| + this->INHERITED::onDrawPicture(picture, matrix, paint); |
| } |
| } |