Re: Implementing cairo_read_func_t/cairo_write_func_t properly
Behdad Esfahbod <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On 16-01-02 11:27 AM, Enrico Weigelt, metux IT consult wrote: > On 02.01.2016 11:24, Bernhard Fischer wrote: > > <snip> > > Actually, I really wonder what that stream API is really for. > Why not just let everything operate on an fd or directly mmap() > the whole file ? A very simple reason is language binding, or in general, hooking up to other IO libraries (gio, etc). > Instead I'd rather add some callbacks to the image surface, eg. for > example for releasing or duplicating the raw image data. There're > lots of interesting usecases for that, for example: > > * allocate image surfaces directly on an BO (or similar buffers on > other platforms) > * zero-copy initialization from already loaded pixmap data, etc. > * pixmap buffer sharing with other code (outside cairo itself) > ... > > By the way, I'm currently doing a bit research on using programmable > DMA controllers for buffer-copying, image composition, etc. > > > --mtx > > -- > Enrico Weigelt, > metux IT consulting > +49-151-27565287 > -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo