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

Unified Diff: src/effects/SkDisplacementMapEffect.cpp

Issue 2366723004: Revert of Create special surfaces according to original device (not always in N32) (Closed)
Patch Set: Created 4 years, 3 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/effects/SkColorFilterImageFilter.cpp ('k') | src/effects/SkDropShadowImageFilter.cpp » ('j') | 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 4f6386d92e94c478bf3bca6938768fd5a46a48a0..8d068072a7454dd0f1f914ecdcae587d86b815f7 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -279,18 +279,7 @@
}
SkIPoint displOffset = SkIPoint::Make(0, 0);
- // Creation of the displacement map should happen in a non-colorspace aware context. This
- // texture is a purely mathematical construct, so we want to just operate on the stored
- // values. Consider:
- // User supplies an sRGB displacement map. If we're rendering to a wider gamut, then we could
- // end up filtering the displacement map into that gamut, which has the effect of reducing
- // the amount of displacement that it represents (as encoded values move away from the
- // primaries).
- // With a more complex DAG attached to this input, it's not clear that working in ANY specific
- // color space makes sense, so we ignore color spaces (and gamma) entirely. This may not be
- // ideal, but it's at least consistent and predictable.
- Context displContext(ctx.ctm(), ctx.clipBounds(), ctx.cache(), OutputProperties(nullptr));
- sk_sp<SkSpecialImage> displ(this->filterInput(0, source, displContext, &displOffset));
+ sk_sp<SkSpecialImage> displ(this->filterInput(0, source, ctx, &displOffset));
if (!displ) {
return nullptr;
}
« no previous file with comments | « src/effects/SkColorFilterImageFilter.cpp ('k') | src/effects/SkDropShadowImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698