Bug 16847 - Allow to restrict filter to source picture only
Summary: Allow to restrict filter to source picture only
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xrender (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-25 06:04 UTC by Clemens Eisserer
Modified: 2008-07-31 11:32 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Image which illustrates the bleeding (3.28 KB, image/png)
2008-07-25 06:04 UTC, Clemens Eisserer
no flags Details
small program which illustrates the problem (2.75 KB, application/octet-stream)
2008-07-25 06:05 UTC, Clemens Eisserer
no flags Details

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.