Index: src/effects/SkPictureImageFilter.cpp |
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp |
index c28175af8222e56e145b3451eecb4be690f309c9..3ca0c099b78f5919172e4f78dd9bb4f392b8a46d 100644 |
--- a/src/effects/SkPictureImageFilter.cpp |
+++ b/src/effects/SkPictureImageFilter.cpp |
@@ -13,19 +13,16 @@ |
#include "SkValidationUtils.h" |
SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, uint32_t uniqueID) |
- : INHERITED(0, 0, NULL, uniqueID), |
- fPicture(picture), |
- fCropRect(SkRect::MakeWH(picture ? SkIntToScalar(picture->width()) : 0, |
- picture ? SkIntToScalar(picture->height()) : 0)) { |
- SkSafeRef(fPicture); |
+ : INHERITED(0, 0, NULL, uniqueID) |
+ , fPicture(SkSafeRef(picture)) |
+ , fCropRect(NULL != picture ? picture->cullRect() : SkRect::MakeEmpty()) { |
} |
SkPictureImageFilter::SkPictureImageFilter(const SkPicture* picture, const SkRect& cropRect, |
uint32_t uniqueID) |
- : INHERITED(0, 0, NULL, uniqueID), |
- fPicture(picture), |
- fCropRect(cropRect) { |
- SkSafeRef(fPicture); |
+ : INHERITED(0, 0, NULL, uniqueID) |
+ , fPicture(SkSafeRef(picture)) |
+ , fCropRect(cropRect) { |
} |
SkPictureImageFilter::~SkPictureImageFilter() { |