| Index: src/effects/SkRectShaderImageFilter.cpp
|
| diff --git a/src/effects/SkRectShaderImageFilter.cpp b/src/effects/SkRectShaderImageFilter.cpp
|
| index cdf03131c1cd89f1e0cf2ec2f97aaef9f4cf5983..9e684b5e0c421b117c280de0060e935d3a9150eb 100644
|
| --- a/src/effects/SkRectShaderImageFilter.cpp
|
| +++ b/src/effects/SkRectShaderImageFilter.cpp
|
| @@ -49,9 +49,9 @@ SkRectShaderImageFilter::~SkRectShaderImageFilter() {
|
| }
|
|
|
| bool SkRectShaderImageFilter::onFilterImage(Proxy* proxy,
|
| - const SkBitmap& source,
|
| + const SkImage* source,
|
| const Context& ctx,
|
| - SkBitmap* result,
|
| + SkAutoTUnref<const SkImage>& result,
|
| SkIPoint* offset) const {
|
| SkIRect bounds;
|
| if (!this->applyCropRect(ctx, source, SkIPoint::Make(0, 0), &bounds)) {
|
| @@ -72,8 +72,12 @@ bool SkRectShaderImageFilter::onFilterImage(Proxy* proxy,
|
|
|
| SkRect rect = SkRect::MakeWH(SkIntToScalar(bounds.width()), SkIntToScalar(bounds.height()));
|
| canvas.drawRect(rect, paint);
|
| + SkImage* image = device->newImageSnapshot();
|
| + if (NULL == image) {
|
| + return false;
|
| + }
|
| + result.reset(image);
|
|
|
| - *result = device.get()->accessBitmap(false);
|
| offset->fX = bounds.fLeft;
|
| offset->fY = bounds.fTop;
|
| return true;
|
|
|