| Index: src/effects/SkDisplacementMapEffect.cpp
|
| diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
|
| index d7d92c82b9476487ed009011cb02e8f973064e79..794da2aea601bd7289f7d951f8e4e4fe2ab8e268 100644
|
| --- a/src/effects/SkDisplacementMapEffect.cpp
|
| +++ b/src/effects/SkDisplacementMapEffect.cpp
|
| @@ -395,15 +395,15 @@ bool SkDisplacementMapEffect::filterImageGPU(Proxy* proxy, const SkBitmap& src,
|
| SkBitmap* result, SkIPoint* offset) const {
|
| SkBitmap colorBM = src;
|
| SkIPoint colorOffset = SkIPoint::Make(0, 0);
|
| - if (getColorInput() && !getColorInput()->getInputResultGPU(proxy, src, ctx, &colorBM,
|
| - &colorOffset)) {
|
| + if (this->getColorInput() &&
|
| + !this->getColorInput()->getInputResultGPU(proxy, src, ctx, &colorBM, &colorOffset)) {
|
| return false;
|
| }
|
| SkBitmap displacementBM = src;
|
| SkIPoint displacementOffset = SkIPoint::Make(0, 0);
|
| - if (getDisplacementInput() &&
|
| - !getDisplacementInput()->getInputResultGPU(proxy, src, ctx, &displacementBM,
|
| - &displacementOffset)) {
|
| + if (this->getDisplacementInput() &&
|
| + !this->getDisplacementInput()->getInputResultGPU(proxy, src, ctx, &displacementBM,
|
| + &displacementOffset)) {
|
| return false;
|
| }
|
| SkIRect bounds;
|
| @@ -459,10 +459,12 @@ bool SkDisplacementMapEffect::filterImageGPU(Proxy* proxy, const SkBitmap& src,
|
| matrix.setTranslate(-SkIntToScalar(colorBounds.x()),
|
| -SkIntToScalar(colorBounds.y()));
|
|
|
| - GrDrawContext* drawContext = context->drawContext();
|
| + GrDrawContext* drawContext = context->drawContext(dst->asRenderTarget());
|
| if (!drawContext) {
|
| return false;
|
| }
|
| + drawContext->uses(displacement);
|
| + drawContext->uses(color);
|
|
|
| drawContext->drawRect(dst->asRenderTarget(), GrClip::WideOpen(), paint, matrix,
|
| SkRect::Make(colorBounds));
|
|
|