diff options
author | 2016-09-22 07:15:37 -0700 | |
---|---|---|
committer | 2016-09-22 07:15:37 -0700 | |
commit | 2a75e5df300a2838f943ca52a52a85a5cf69802b (patch) | |
tree | ef64ee5043762606de08fde3da60b39777c3bc22 /src/effects/SkDisplacementMapEffect.cpp | |
parent | 4be0e7cfe0efceeaf4c7a4d598d77c27cfd3e69b (diff) |
Add output format properties to SkImageFilter::Context
For now, this is just the color space (of the original
requesting device). This is used when constructing
intermediate rendering surfaces, so that we ensure we
land in a surface that's similar/compatible to the
final consumer of the DAG's output.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357273002
Review-Url: https://codereview.chromium.org/2357273002
Diffstat (limited to 'src/effects/SkDisplacementMapEffect.cpp')
-rw-r--r-- | src/effects/SkDisplacementMapEffect.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp index 0f49a991c2..8fc0ec1366 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; } |