[cairo] Stroke vs. fill for rectilinear figures
Carl Worth
cworth at cworth.org
Fri Nov 17 19:56:07 PST 2006
[GNOME performance folks, I'm pulling you in on this thread since I'm
curious at how often the bug mentioned is getting hit. For detailed
background on this performance bug (and several others we're looking
at in cairo right now), see:
http://lists.freedesktop.org/archives/cairo/2006-November/008433.html
]
On Thu, 16 Nov 2006 12:17:22 -0800, Carl Worth wrote:
> * Stroke vs. fill for rectilinear figures
>
> *Help wanted*: Need the trivial performance test case
I wrote this test and pushed it out. As expected, the stroke code is
quite a bit slower (5-15x slower in fact). Here are some image and
xlib backend numbers from my laptop:
backend-content test-size min(ticks) min(ms) median(ms) stddev.
image-rgba box-outline-stroke-100 301321 0.218 0.219 0.39%
image-rgba box-outline-fill-100 18178 0.013 0.013 0.43%
xlib-rgba box-outline-stroke-100 379177 0.275 0.276 1.39%
xlib-rgba box-outline-fill-100 83355 0.060 0.060 0.17%
So, the stroke is equally slow for both image and xlib, while the fast
path that fill gets is 15x faster for the image backend and 5x faster
for the xlib backend, (why the xlib fast path isn't as fast as the
image backend's is another issue we could look into next).
So this will definitely be an interesting thing to fix.
I am curious to know how often this bug is getting hit. I would
imagine that rectilinear elements like this are extremely common. But
when I mentioned this bug to Owen once he said that GTK+ (in the
default theme at least) doesn't actually use cairo for drawing box
outlines. But for other themes, who knows?
I know some theme authors have definitely hit this bug, since they're
the ones who originally pointed it out to me.
Who's going to be the first to fix it? (You can probably get a nice
head start on me as one of my son's has his 7th birthday tomorrow).
See you all on Monday,
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20061117/f189c69a/attachment-0001.pgp
More information about the cairo
mailing list