Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(937)

Unified Diff: src/effects/SkMorphologyImageFilter.cpp

Issue 1245883005: Fix variable shadowing in SkMorphologyImageFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkMorphologyImageFilter.cpp
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 388dfcd2bc3112b888264b6f0616428aad409a88..30ba25159d27b00bc454e67f36f960e77e01b1fa 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -662,9 +662,9 @@ bool apply_morphology(const SkBitmap& input,
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 @@ bool apply_morphology(const SkBitmap& input,
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 @@ bool apply_morphology(const SkBitmap& input,
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 @@ bool apply_morphology(const SkBitmap& input,
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698