[Cogl] [PATCH] cogl-gst: allocate textures synchronously

Robert Bragg robert at sixbynine.org
Mon Jan 13 06:53:03 PST 2014


On Mon, Jan 13, 2014 at 2:24 PM, Neil Roberts <neil at linux.intel.com> wrote:
> Robert Bragg <robert at sixbynine.org> writes:
>
>> On a side note; It would be nice at some point to add a
>> cogl_bitmap_new_from_data_full() function that lets us pass a
>> destroy_notify callback for when the CoglBitmap is freed to make it
>> more convenient to wrap ref-counted data such as a GstBuffer.
>
> Could you not just use cogl_object_set_user_data for this? That is meant
> to work as a our general-purpose destroy notification mechanism for
> CoglObjects, right?

Yeah, I think we've used that for this use case before, it just seems
a bit inconvenient for this case where it should be normal to want to
wrap ref-counted data. Maybe we could at least add an example to the
bitmap api docs introducing how to use _set_user_data() for this case
since it's not currently very discoverable.

Regards,
Robert


More information about the Cogl mailing list