| Index: src/effects/SkXfermodeImageFilter.cpp
|
| diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
|
| index 599fd42b12d0987bfa631f47d593d04f7b6296b2..190746d01cffbf2706f4caa9a266c74cdd68c9b6 100644
|
| --- a/src/effects/SkXfermodeImageFilter.cpp
|
| +++ b/src/effects/SkXfermodeImageFilter.cpp
|
| @@ -133,12 +133,12 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
|
| SkIPoint* offset) const {
|
| SkBitmap background = src;
|
| SkIPoint backgroundOffset = SkIPoint::Make(0, 0);
|
| - if (getInput(0) && !getInput(0)->getInputResultGPU(proxy, src, ctx, &background,
|
| - &backgroundOffset)) {
|
| - return onFilterImage(proxy, src, ctx, result, offset);
|
| + if (this->getInput(0) &&
|
| + !this->getInput(0)->getInputResultGPU(proxy, src, ctx, &background, &backgroundOffset)) {
|
| + return this->onFilterImage(proxy, src, ctx, result, offset);
|
| }
|
| - GrTexture* backgroundTex = background.getTexture();
|
|
|
| + GrTexture* backgroundTex = background.getTexture();
|
| if (NULL == backgroundTex) {
|
| SkASSERT(false);
|
| return false;
|
| @@ -146,9 +146,9 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
|
|
|
| SkBitmap foreground = src;
|
| SkIPoint foregroundOffset = SkIPoint::Make(0, 0);
|
| - if (getInput(1) && !getInput(1)->getInputResultGPU(proxy, src, ctx, &foreground,
|
| - &foregroundOffset)) {
|
| - return onFilterImage(proxy, src, ctx, result, offset);
|
| + if (this->getInput(1) &&
|
| + !this->getInput(1)->getInputResultGPU(proxy, src, ctx, &foreground, &foregroundOffset)) {
|
| + return this->onFilterImage(proxy, src, ctx, result, offset);
|
| }
|
| GrTexture* foregroundTex = foreground.getTexture();
|
| GrContext* context = foregroundTex->getContext();
|
| @@ -191,10 +191,12 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
|
| paint.addColorProcessor(foregroundDomain.get());
|
| paint.addColorProcessor(xferProcessor)->unref();
|
|
|
| - GrDrawContext* drawContext = context->drawContext();
|
| + GrDrawContext* drawContext = context->drawContext(dst->asRenderTarget());
|
| if (!drawContext) {
|
| return false;
|
| }
|
| + drawContext->uses(backgroundTex);
|
| + drawContext->uses(foregroundTex);
|
|
|
| drawContext->drawRect(dst->asRenderTarget(), GrClip::WideOpen(), paint,
|
| SkMatrix::I(), srcRect);
|
|
|