diff options
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/SkBlendImageFilter.cpp | 5 | ||||
-rw-r--r-- | src/effects/SkMorphologyImageFilter.cpp | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/effects/SkBlendImageFilter.cpp b/src/effects/SkBlendImageFilter.cpp index a1ad8ec1b4..7933e27999 100644 --- a/src/effects/SkBlendImageFilter.cpp +++ b/src/effects/SkBlendImageFilter.cpp @@ -196,7 +196,10 @@ GrTexture* SkBlendImageFilter::onFilterImageGPU(Proxy* proxy, GrTexture* src, co GrAutoScratchTexture ast(context, desc); GrTexture* dst = ast.detach(); - GrContext::AutoMatrix avm(context, GrMatrix::I()); + + GrContext::AutoMatrix am; + am.setIdentity(context); + GrContext::AutoRenderTarget art(context, dst->asRenderTarget()); GrContext::AutoClip ac(context, rect); diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp index e00d94a754..64d22be56e 100644 --- a/src/effects/SkMorphologyImageFilter.cpp +++ b/src/effects/SkMorphologyImageFilter.cpp @@ -442,14 +442,19 @@ GrTexture* apply_morphology(GrTexture* srcTexture, SkISize radius) { GrContext* context = srcTexture->getContext(); srcTexture->ref(); - GrContext::AutoMatrix avm(context, GrMatrix::I()); + + GrContext::AutoMatrix am; + am.setIdentity(context); + GrContext::AutoClip acs(context, GrRect::MakeWH(SkIntToScalar(srcTexture->width()), SkIntToScalar(srcTexture->height()))); + GrTextureDesc desc; desc.fFlags = kRenderTarget_GrTextureFlagBit | kNoStencil_GrTextureFlagBit; desc.fWidth = SkScalarCeilToInt(rect.width()); desc.fHeight = SkScalarCeilToInt(rect.height()); desc.fConfig = kRGBA_8888_GrPixelConfig; + if (radius.fWidth > 0) { GrAutoScratchTexture ast(context, desc); GrContext::AutoRenderTarget art(context, ast.texture()->asRenderTarget()); |