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

Unified Diff: src/effects/SkDisplacementMapEffect.cpp

Issue 104853005: Accept displacement with no displacement input (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 7 years 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 | « gm/displacement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkDisplacementMapEffect.cpp
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index 8fc4c86ec5bad966a3407c81f0cdadd233a56b90..3087b63c7ab4a6d1473d182ffb0ec102104729c2 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -183,12 +183,11 @@ bool SkDisplacementMapEffect::onFilterImage(Proxy* proxy,
const SkMatrix& ctm,
SkBitmap* dst,
SkIPoint* offset) {
- SkBitmap displ, color = src;
+ SkBitmap displ = src, color = src;
SkImageFilter* colorInput = getColorInput();
SkImageFilter* displacementInput = getDisplacementInput();
- SkASSERT(NULL != displacementInput);
if ((colorInput && !colorInput->filterImage(proxy, src, ctm, &color, offset)) ||
- !displacementInput || !displacementInput->filterImage(proxy, src, ctm, &displ, offset)) {
+ (displacementInput && !displacementInput->filterImage(proxy, src, ctm, &displ, offset))) {
return false;
}
if ((displ.config() != SkBitmap::kARGB_8888_Config) ||
« no previous file with comments | « gm/displacement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698