Bug 16847

Summary: Allow to restrict filter to source picture only
Product: xorg Reporter: Clemens Eisserer <linuxhippy>
Component: Lib/XrenderAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Image which illustrates the bleeding
none
small program which illustrates the problem none

Description Clemens Eisserer 2008-07-25 06:04:21 UTC
Created attachment 17888 [details]
Image which illustrates the bleeding

The billinear (or better) filters provided by XRender currently interpolate pixels which are on the source-border with transparent (when RepeatNone is set).
This results for large scale factors in serioud bleeding.
The image attached is a 2x2 image, scaled with 100/10.

Therefor its not possible to Composite with billinear interpolation without blurry edges.
Cairo-1.6.4 introduced support for RepeatPad on image-surfaces (not supported on x-surfaces):
> This mode allows applications to use `cairo_rectangle` and
> `cairo_fill` to draw scaled images with high-quality bilinear filtering
> for the internal of the image, but without any objectionably blurry
> edges, (as would happen with the default `EXTEND_NONE` and cairo_paint).

They currently implement RepeatPad, and then filter billinear.
However its often required to just draw a single image rotated, it imposes quite a lot of overhead to generate a mask only to preserve the rotated rectangular geometry the image has.

Would it be possible via XRenderSetPictureFilter's params-field to not interpolate out of the src-bounds?
Comment 1 Clemens Eisserer 2008-07-25 06:05:33 UTC
Created attachment 17889 [details]
small program which illustrates the problem
Comment 2 Clemens Eisserer 2008-07-31 11:32:14 UTC
ok, forget about that feature request.
However RepeatPad would be nice.

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.