Re: State of gdk-pixbuf
- From: Bastien Nocera <hadess hadess net>
- To: Emmanuele Bassi <ebassi gmail com>
- Cc: "gtk-devel-list gnome org" <gtk-devel-list gnome org>
- Subject: Re: State of gdk-pixbuf
- Date: Thu, 23 Oct 2014 17:29:37 +0200
On Thu, 2014-10-23 at 13:02 +0100, Emmanuele Bassi wrote:
hi;
On 23 October 2014 11:55, Matthias Clasen <matthias clasen gmail com> wrote:
I'm particularly interested to know what cairo, pixman and other image
manipulation libraries can do for us. Benjamin surely has comments[2] :)
When I last talked to Soeren about it (several years ago), pixman
didn't support the pixel format that gdk-pixbuf is using.
pixman supports RGBA (r8g8b8a8 and r8g8b8x8) since 2011, because it's
used on big-endian architectures as well as being a requirement for
OpenGL ES 2.0.
this means that it should be possible to feed a GdkPixbuf pixel buffer
to a pixman_image_t internally back and forth without copies, or, even
better, to replace the GdkPixbuf internal storage and pixops with
pixman_image_t and pixman operators.
Indeed, that's one of the options we can take that wouldn't break ABI
compatibility.
it should also be possible to
create a tiled buffer composed by pixman_image_t tiles for large image
data.
I have no idea what the API would look like for that.
There's still the problem of handling huge files, especially the ones in
grayscale or b&w. The uncompressed in-memory usage would balloon
compared to what it could use if we kept it in grayscale/b&w [1].
Which gets us to the problem discussed in:
https://bugzilla.gnome.org/show_bug.cgi?id=491507
We could start hiding the backing store and use cairo or pixman
internally.
gdk_pixbuf_get_pixels() would need to convert from whatever is the
native format, to the GdkPixbuf format. Which would break applications
expecting it to change the backing storage (say, adding borders to
pixbufs). I'd probably do that with a slight ABI break, adding API to
change the internal representation to the GdkPixbuf native format.
Applications that used to call _get_pixels() could be ported with a
one-liner. Applications that want to be able to handle bigger images can
then do their modifications at the drawing stage.
In any case, short-term, fixing all the pixops buglets by using pixman
would be a great step forward, and would lower our maintenance burden
(not that pixops bugs saw much more than inhaling through clenched teeth
and words of kind-of-encouragement).
Cheers
[1]: https://bugzilla.gnome.org/show_bug.cgi?id=666391 and all the dupes
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]