Bug 2462 - Intermediate regions in EXA aren't clipped to image
Summary: Intermediate regions in EXA aren't clipped to image
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Acceleration/EXA (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high major
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard: 2011BRB_Reviewed
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-02 19:02 UTC by Owen Taylor
Modified: 2018-12-13 18:22 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Intersect trapezoids bounds with destination surface bounds before creating intermediate surface. (2.31 KB, patch)
2005-03-04 07:58 UTC, Carl Worth
no flags Details | Splinter Review

Description Owen Taylor 2005-02-02 19:02:03 UTC
In libpixman/ictrap.c:pixman_composite_trapezoids(), the bounding
box of the intermediate surface needs to be intersected with the
bounding box of the image (bailing immediately on empty intersection).

This should help a *lot* when zoomed in on a larger image.
Comment 1 Carl Worth 2005-03-04 07:58:25 UTC
Created attachment 2017 [details] [review]
Intersect trapezoids bounds with destination surface bounds before creating intermediate surface.

Here's a patch that I just committed to libpixman.

It seems to do the job. When I render objects entirely "off-screen"
libpixman disappears completely from profile results. (Currently, with
cairo this means that drawing out-of-bounds objects is about twice as fast
as drawing visible objects, since libpixman was at about 50% in the profile
before. More work will be needed in cairo to increase that performance
further.)
Comment 2 Carl Worth 2005-03-04 07:59:46 UTC
Now that the attached patch is committed to libpixman, this bug is fixed.

But, I'm leaving it open here until we have the same fix in the xserver tree,
(or at the very least a bug entry there with the same patch).
Comment 3 Billy Biggs 2005-08-22 18:53:57 UTC
Can't we just change the product to 'xserver'?
Comment 4 Søren Sandmann Pedersen 2007-06-20 11:22:17 UTC
The bug here is in miTrapezoids, where a patch similar to the one attached here should be applied.

Cairo doesn't actually use the pixman_composite_trapezoids() anymore; the problem there is now fixed in a different ways. Some relevant commits:

<cworth> ssp: Yeah, the bug came back again later, and I fixed it again here:
<cworth> c96a71e709e537f690da6d4a184aa4c64fe11028
<cworth> See also this commit which is the more recent thing that changes the geometry and avoids the server bug:
<cworth> 8286b8741675ae163fc40187cd04e84395954c6e
Comment 5 Alan Coopersmith 2009-09-01 06:50:11 UTC
Was this fixed by the conversion of the X server to use the pixman
trapezoid code?
Comment 6 Søren Sandmann Pedersen 2009-09-01 08:30:24 UTC
No, the issue still exists. When the X server creates the intermediate alpha pixmap, it should restrict the size of it to the underlying destination. That way, it won't have to rasterize a bunch of invisible trapezoids. 

I think cairo may clip the traps itself these days though, so it's not a huge issue.
Comment 7 Søren Sandmann Pedersen 2011-03-22 08:35:43 UTC
The software version of this bug has moved to pixman - see bug 35547. There is still an issue in the server because EXA has cutted and pasted the code in question.

Specifically, exaTrapezoids() and exaTriangles() should clip the intermediate alpha picture to the extents (and ideally clip region) of the destination picture.
Comment 8 GitLab Migration User 2018-12-13 18:22:56 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/78.


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.