Re: [cairo] Stroke vs. fill for rectilinear figures



On Fri, 2006-17-11 at 19:56 -0800, Carl Worth wrote: 
> 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.

This problem gets hit all over the place. Themes like ThinIce, Redmond,
Mist and Glider that are rectangular mostly of course see the largest
overall improvement. But also other like Clearlooks and Crux benefit in
some cases.

There is a benchmark available at
http://benjamin.sipsolutions.net/theme-perf/stroke-vs-fill/
(G4 1.6GHz, test run inside Xvfb)

Some examples from the benchmark:
Theme            Test                       before    after
Glider           button-box-normal-out       4.54ms    2.35ms
HighContrast     button-box-normal-out       0.71ms    0.96ms
Mist             button-box-normal-out       1.99ms    0.71ms
Redmond          button-box-normal-out       3.14ms    0.79ms
ThinIce          button-box-normal-out       1.96ms    0.73ms
Clearlooks       notebook-box               36.12ms   26.08ms
Crux             notebook-box               34.68ms    5.97ms
Glider           notebook-box               45.07ms    4.36ms

As you can see there are some pretty good improvements. In particular
the Glider notebook box is about 10x faster in this benchmark.
It is also interesting to see is that the performance of the
HighContrast theme was good before the change, and even seems to
decrease slightly. I guess this is because the line width in the theme
is 2px, so the pixel coordinates are also aligned for the stroke case.

Benjamin

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]