GNOME Bugzilla – Bug 105322
gdk_draw_layout_line_with_colors performance
Last modified: 2005-11-09 02:34:40 UTC
Gnumeric currently used pango layouts for drawing. They all have a fore- ground colour set. Therefore, about 10% of gnumeric's time is spent copying graphics contexts: fg_gc = gdk_pango_get_gc (drawable, context, (fg_set || foreground) ? &tmp : NULL, stipple, gc); there has got to be some cheaper way of doing this, especially considering that the foreground colour often matches the existing gc's colour.
All 3 backends included with GDK currently save the foreground pixel value on the client side. I'm sure a sufficiently determined person could come up with a patch that: - Moved the caching of the foreground pixel value to the generic layer. - Added an accessor for it - Made gdk_pango_get_gc() return a ref'ed copy of the GC rather than a new GC if the passed in foreground color is NULL, or the pixel from gdk_rgb_find_color() matches the current foreground color.
Closing as obsolete. These kind of things are done in cairo these days, right?