Fix variable shadowing in SkMorphologyImageFilter
Review URL: https://codereview.chromium.org/1245883005
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 388dfcd..30ba251 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -662,9 +662,9 @@
SkIRect srcRect = rect;
if (radius.fWidth > 0) {
- GrTexture* dst = context->textureProvider()->refScratchTexture(
+ GrTexture* scratch = context->textureProvider()->refScratchTexture(
desc, GrTextureProvider::kApprox_ScratchTexMatch);
- if (NULL == dst) {
+ if (NULL == scratch) {
return false;
}
GrDrawContext* dstDrawContext = context->drawContext();
@@ -672,7 +672,7 @@
return false;
}
- apply_morphology_pass(dstDrawContext, dst->asRenderTarget(), clip, srcTexture,
+ apply_morphology_pass(dstDrawContext, scratch->asRenderTarget(), clip, srcTexture,
srcRect, dstRect, radius.fWidth, morphType,
Gr1DKernelEffect::kX_Direction);
SkIRect clearRect = SkIRect::MakeXYWH(dstRect.fLeft, dstRect.fBottom,
@@ -680,15 +680,15 @@
GrColor clearColor = GrMorphologyEffect::kErode_MorphologyType == morphType ?
SK_ColorWHITE :
SK_ColorTRANSPARENT;
- dstDrawContext->clear(dst->asRenderTarget(), &clearRect, clearColor, false);
+ dstDrawContext->clear(scratch->asRenderTarget(), &clearRect, clearColor, false);
- srcTexture.reset(dst);
+ srcTexture.reset(scratch);
srcRect = dstRect;
}
if (radius.fHeight > 0) {
- GrTexture* dst = context->textureProvider()->refScratchTexture(desc,
+ GrTexture* scratch = context->textureProvider()->refScratchTexture(desc,
GrTextureProvider::kApprox_ScratchTexMatch);
- if (NULL == dst) {
+ if (NULL == scratch) {
return false;
}
GrDrawContext* dstDrawContext = context->drawContext();
@@ -696,11 +696,11 @@
return false;
}
- apply_morphology_pass(dstDrawContext, dst->asRenderTarget(), clip, srcTexture,
+ apply_morphology_pass(dstDrawContext, scratch->asRenderTarget(), clip, srcTexture,
srcRect, dstRect, radius.fHeight, morphType,
Gr1DKernelEffect::kY_Direction);
- srcTexture.reset(dst);
+ srcTexture.reset(scratch);
}
SkImageFilter::WrapTexture(srcTexture, rect.width(), rect.height(), dst);
return true;