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

Unified Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 1972213002: Fix bug & add code to catch ImageFilter clearing bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: switch #define Created 4 years, 7 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 | « src/core/SkSpecialSurface.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkXfermodeImageFilter.cpp
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index 99ce24f1295b8c80818a62d54663c92e69fad1a2..d4756e8e788305c9ba58235d0b6b0069339bf76c 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -104,6 +104,8 @@ sk_sp<SkSpecialImage> SkXfermodeImageFilter::onFilterImage(SkSpecialImage* sourc
SkCanvas* canvas = surf->getCanvas();
SkASSERT(canvas);
+ canvas->clear(0x0); // can't count on background to fully clear the background
+
canvas->translate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top()));
SkPaint paint;
« no previous file with comments | « src/core/SkSpecialSurface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698