Re: pixbuf<->cairo_surface_t conversion



Hi,

On Fri, Sep 3, 2010 at 12:59 AM, Matthias Clasen
<matthias clasen gmail com> wrote:
> On Thu, Sep 2, 2010 at 7:24 PM, Havoc Pennington <hp pobox com> wrote:
>
>> I was thinking about the problem of wasting memory, writing to one
>> internal representation and not changing the other, etc. How about
>> this: we only keep one representation around. If you get_pixels we
>> drop the surface, if you get_cairo_surface we drop the old-style
>> pixels.
>>
>> We deprecate get_pixels() which is the only call that can force the
>> old-style representation to be created. If you do use get_pixels(),
>> what's going to happen is that you do your pixel editing, and on the
>> next paint gdk_pixbuf_get_cairo_surface() will force conversion back
>> to cairo representation.
>>
>
> Here is an (untested) patch to implement this.
>

Oops. I just put one in bugzilla ;-) I should have worked on the
widget padding today I guess.

https://bugzilla.gnome.org/show_bug.cgi?id=491507

Havoc


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