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

Unified Diff: src/effects/SkMorphologyImageFilter.cpp

Issue 680413005: Don't allow renderTarget==NULL to GrContext::clear() and friends. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 6 years, 1 month 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 | « src/effects/SkGpuBlurUtils.cpp ('k') | src/gpu/GrContext.cpp » ('j') | 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 05fc1fdb211fc028ccea6a1a2ee61ac2d6238b76..72c98dd97eaa1592ee7aeb5ef5e60ac20858f4f1 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -530,9 +530,10 @@ bool apply_morphology(const SkBitmap& input,
morphType, Gr1DKernelEffect::kX_Direction);
SkIRect clearRect = SkIRect::MakeXYWH(dstRect.fLeft, dstRect.fBottom,
dstRect.width(), radius.fHeight);
- context->clear(&clearRect, GrMorphologyEffect::kErode_MorphologyType == morphType ?
- SK_ColorWHITE :
- SK_ColorTRANSPARENT, false);
+ GrColor clearColor = GrMorphologyEffect::kErode_MorphologyType == morphType ?
+ SK_ColorWHITE :
+ SK_ColorTRANSPARENT;
+ context->clear(&clearRect, clearColor, false, texture->asRenderTarget());
srcTexture.reset(texture);
srcRect = dstRect;
}
« no previous file with comments | « src/effects/SkGpuBlurUtils.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698