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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 2357273002: Add output format properties to SkImageFilter::Context (Closed)
Patch Set: Made constructor explicit, fixed call sites 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
Index: src/pdf/SkPDFDevice.cpp
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index e79c915283a2cbdb420e700ab5d67a8b876c9521..eed4992c6c87e4b4a662f3b966a6d5387ffd2363 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -2288,7 +2288,10 @@ void SkPDFDevice::drawSpecial(const SkDraw& draw, SkSpecialImage* srcImg, int x,
matrix.postTranslate(SkIntToScalar(-x), SkIntToScalar(-y));
const SkIRect clipBounds = draw.fRC->getBounds().makeOffset(-x, -y);
SkAutoTUnref<SkImageFilterCache> cache(this->getImageFilterCache());
- SkImageFilter::Context ctx(matrix, clipBounds, cache.get());
+ // TODO: Should PDF be operating in a specified color space? For now, run the filter
+ // in the same color space as the source (this is different from all other backends).
robertphillips 2016/09/21 18:44:09 nullptr here too ?
+ SkImageFilter::OutputProperties outputProperties(srcImg->getColorSpace());
+ SkImageFilter::Context ctx(matrix, clipBounds, cache.get(), outputProperties);
sk_sp<SkSpecialImage> resultImg(filter->filterImage(srcImg, ctx, &offset));
if (resultImg) {

Powered by Google App Engine
This is Rietveld 408576698