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

Unified Diff: src/effects/SkDisplacementMapEffect.cpp

Issue 2357273002: Add output format properties to SkImageFilter::Context (Closed)
Patch Set: Spelling 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/SkComposeImageFilter.cpp ('k') | src/effects/SkLightingImageFilter.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 0f49a991c22e9a0c6c938d0b5409b7fb62042f47..8fc0ec1366c877bcdfdc02842cfa95558aa906a8 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -336,10 +336,11 @@ sk_sp<SkSpecialImage> SkDisplacementMapEffect::onFilterImage(SkSpecialImage* sou
SkMatrix matrix;
matrix.setTranslate(-SkIntToScalar(colorBounds.x()), -SkIntToScalar(colorBounds.y()));
+ SkColorSpace* colorSpace = ctx.outputProperties().colorSpace();
sk_sp<GrDrawContext> drawContext(
context->makeDrawContext(SkBackingFit::kApprox, bounds.width(), bounds.height(),
- GrRenderableConfigForColorSpace(source->getColorSpace()),
- sk_ref_sp(source->getColorSpace())));
+ GrRenderableConfigForColorSpace(colorSpace),
+ sk_ref_sp(colorSpace)));
if (!drawContext) {
return nullptr;
}
« no previous file with comments | « src/effects/SkComposeImageFilter.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698