Bug 86554

Summary: Use cairo downscaling for cairo >= 1.14
Product: poppler Reporter: Adrian Johnson <ajohnson>
Component: cairo backendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: use cairo 1.14 downscaling

Description Adrian Johnson 2014-11-22 07:38:33 UTC
Created attachment 109836 [details] [review]
use cairo 1.14 downscaling

Now that cairo 1.14 has high quality downscaling we should use it instead of drawImageMaskPrescaled.

Note that the filter needs to be GOOD or BEST to activate the high quality scaling. I'm not sure which one we should default to.
Comment 1 Carlos Garcia Campos 2014-11-22 11:17:18 UTC
Comment on attachment 109836 [details] [review]
use cairo 1.14 downscaling

Review of attachment 109836 [details] [review]:
-----------------------------------------------------------------

We can also get rid of all the CairoRescaleBox thing. This should fix several bugs opened.

::: poppler/CairoOutputDev.cc
@@ +1805,4 @@
>  				    GBool interpolate)
>  {
>    if (interpolate)
> +    return CAIRO_FILTER_BEST;

Yes, let's try with BEST and if people complain about performance we can try with GOOD.
Comment 2 Adrian Johnson 2014-11-22 12:26:29 UTC
(In reply to Carlos Garcia Campos from comment #1)
> We can also get rid of all the CairoRescaleBox thing. This should fix
> several bugs opened.

We still need CairoRescaleBox for images with more than 32767 rows or columns (see 87fd5275). But for images that cairo can handle we can bypass CairoRescaleBox. And for images that are too big for cairo we can use CairoRescaleBox to reduce the width and height to 32768 and then let cairo do the rest of the downscaling.
Comment 3 Adrian Johnson 2017-08-16 11:52:44 UTC
Pushed

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.