Bug 7578

Summary: Drawing huge lines has hefty memory usage
Product: cairo Reporter: Simon Budig <simon>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: high    
Version: 1.2.0   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Testcase for the "freezing computer" problem.

Description Simon Budig 2006-07-20 10:14:48 UTC
When stumbeling on the limits of the internal 16.16 format and trying to figure
out when it fails I noticed, that drawing lines that come near to this limit
have a short but hefty impact on the memory usage - typically my computer
freezes for a second or so.

A testcase program is attached.

cworth mentioned that this might be a problem of the X-Server.

This is with the debian-testing package of libcairo, version 1.2.0-2  and the
X.Org version 7.0.0 (debian-testing package 1:7.0.22).
Comment 1 Simon Budig 2006-07-20 10:16:53 UTC
Created attachment 6289 [details]
Testcase for the "freezing computer" problem.
Comment 2 Owen Taylor 2006-07-20 10:54:15 UTC
Hmm, I vaguely thought this had already been dealt with. There are two
basic ways of attacking this:

 - Make sure that X server limits the size of any temporary surfaces
   created for XRenderCompositeTrapezoids to the size of the destination
   picture.

 - Have cairo create the temporary surfaces itself and use XRenderAddTraps
   rather than XRenderCompositeTrapezoids.

In fact, I thought we had already done *both*.
Comment 3 Chris Wilson 2012-04-03 14:04:46 UTC
We now do geometric clipping of the lines prior to computing mask extents.

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.