From 0b7ab3bb49015c5316627d6893955596c59342b8 Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Tue, 29 Oct 2013 13:59:31 +0000 Subject: [PATCH] Fix bug in erosion filtering https://codereview.chromium.org/50813002/ git-svn-id: http://skia.googlecode.com/svn/trunk@11996 2bbb7eff-a529-9590-31e7-b0007b416f81 --- expectations/gm/ignored-tests.txt | 4 ++++ src/effects/SkMorphologyImageFilter.cpp | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/expectations/gm/ignored-tests.txt b/expectations/gm/ignored-tests.txt index f13e44a84f..209522a815 100644 --- a/expectations/gm/ignored-tests.txt +++ b/expectations/gm/ignored-tests.txt @@ -39,3 +39,7 @@ pdf-poppler # Added by bsalomon in https://codereview.chromium.org/31033002 verylargebitmap + +# Add by robertphillips in https://codereview.chromium.org/50813002/ +morphology + diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp index 08e0ab21b6..df015cac73 100644 --- a/src/effects/SkMorphologyImageFilter.cpp +++ b/src/effects/SkMorphologyImageFilter.cpp @@ -507,7 +507,9 @@ 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, 0x0); + context->clear(&clearRect, GrMorphologyEffect::kErode_MorphologyType == morphType ? + SK_ColorWHITE : + SK_ColorTRANSPARENT); src.reset(ast.detach()); srcRect = dstRect; }