Re: Floating point in pango



On 7/14/06, Federico Mena Quintero <federico ximian com> wrote:
On Fri, 2006-07-14 at 10:57 +0300, Jorn Baayen wrote:
> >   gtk_widget_get_draw_rectangle()
> >      calls gtk_widget_style_get (widget, "draw-border", &draw_border, NULL);
> >
> > And gtk_widget_get_draw_rectangle() gets called pretty often, pretty
> > much every time a widget gets painted.
>
> Ok, but why isn't this taking 7% using 2.6?

Sorry, I should have explained a bit more.  That thing got added between
GTK+ 2.6 and 2.8:

2005-04-28  Owen Taylor  <otaylor redhat com>

        * gtk/gtkwidget.c: Add a draw-border style property to allow
        themes to draw outside the widget's allocation.

I'm not completely sure where this is needed, but apparently some
specific themes need it.  It may be the Win32 or the MacOS X theme.

This obviously hurts quite a bit when repainting a single button many
times.  I wonder if it even shows up in the profile when exposing a
"real" window with many different widgets.

I'd be interested in knowing how much time the children of that call
take up in the profile.  Is the problem finding out the correct style
structure?  Or is it asking the style if it has that property?  Etc.


I think I put a patch to optimize the draw-border stuff somewhere in bugzilla.



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