pixbuf write detection



Hi,

It could be useful for GdkPixbuf to cache information that's dependent
on the pixel values in the pixbuf. For example, whether the alpha in
the pixbuf is really one-bit, or you could cache the XRender picture
object being used to draw the pixbuf to the screen.

Right now, people can just mess with the pixels without informing
GdkPixbuf, so it's not feasible to keep any such cache.

Requiring an accessor function (gdk_pixbuf_set_pixel() or something)
is just far too slow.

One proposed solution is to have a call gdk_pixbuf_pixels_changed()
which emits a pixels_changed signal. Users who write to the pixels
directly would be required to call this function when they finish
writing to the pixels.

This would mean that some existing code would be broken, though not
too severely.

Comments?

Havoc




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