| Index: src/effects/SkColorFilterImageFilter.cpp
|
| diff --git a/src/effects/SkColorFilterImageFilter.cpp b/src/effects/SkColorFilterImageFilter.cpp
|
| index 8b7b390ea8fbd01288cabfc05a7575bc4ad251ee..d648b6c4a7eeb8cf4478c1bf694911e49bcb33bf 100755
|
| --- a/src/effects/SkColorFilterImageFilter.cpp
|
| +++ b/src/effects/SkColorFilterImageFilter.cpp
|
| @@ -100,14 +100,16 @@ SkColorFilterImageFilter::~SkColorFilterImageFilter() {
|
| bool SkColorFilterImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& source,
|
| const SkMatrix& matrix,
|
| SkBitmap* result,
|
| - SkIPoint* loc) {
|
| + SkIPoint* offset) {
|
| SkBitmap src = source;
|
| - if (getInput(0) && !getInput(0)->filterImage(proxy, source, matrix, &src, loc)) {
|
| + SkIPoint srcOffset = SkIPoint::Make(0, 0);
|
| + if (getInput(0) && !getInput(0)->filterImage(proxy, source, matrix, &src, &srcOffset)) {
|
| return false;
|
| }
|
|
|
| SkIRect bounds;
|
| src.getBounds(&bounds);
|
| + bounds.offset(srcOffset);
|
| if (!this->applyCropRect(&bounds, matrix)) {
|
| return false;
|
| }
|
| @@ -121,11 +123,11 @@ bool SkColorFilterImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& sourc
|
|
|
| paint.setXfermodeMode(SkXfermode::kSrc_Mode);
|
| paint.setColorFilter(fColorFilter);
|
| - canvas.drawSprite(src, -bounds.fLeft, -bounds.fTop, &paint);
|
| + canvas.drawSprite(src, srcOffset.fX - bounds.fLeft, srcOffset.fY - bounds.fTop, &paint);
|
|
|
| *result = device.get()->accessBitmap(false);
|
| - loc->fX += bounds.fLeft;
|
| - loc->fY += bounds.fTop;
|
| + offset->fX = bounds.fLeft;
|
| + offset->fY = bounds.fTop;
|
| return true;
|
| }
|
|
|
|
|