Index: src/effects/SkDisplacementMapEffect.cpp |
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp |
index 4b26a5f846083f55de3e6707fcc9adf700ed9e7f..0200cabff85bf942a1b6d697d2e0370fd2672c6d 100644 |
--- a/src/effects/SkDisplacementMapEffect.cpp |
+++ b/src/effects/SkDisplacementMapEffect.cpp |
@@ -384,8 +384,8 @@ bool SkDisplacementMapEffect::filterImageGPU(Proxy* proxy, const SkBitmap& src, |
GrTextureDesc desc; |
desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit; |
- desc.fWidth = colorBM.width(); |
- desc.fHeight = colorBM.height(); |
+ desc.fWidth = bounds.width(); |
+ desc.fHeight = bounds.height(); |
desc.fConfig = kSkia8888_GrPixelConfig; |
GrAutoScratchTexture ast(context, desc); |
@@ -410,6 +410,8 @@ bool SkDisplacementMapEffect::filterImageGPU(Proxy* proxy, const SkBitmap& src, |
color))->unref(); |
SkIRect colorBounds = bounds; |
colorBounds.offset(-colorOffset); |
+ GrContext::AutoMatrix am; |
+ am.setIdentity(context); |
SkMatrix matrix; |
matrix.setTranslate(-SkIntToScalar(colorBounds.x()), |
-SkIntToScalar(colorBounds.y())); |