[cairo] Implementing cairo_read_func_t/cairo_write_func_t properly

Enrico Weigelt, metux IT consult enrico.weigelt at gr13.net
Sat Jan 2 03:27:40 PST 2016


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 ?

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


More information about the cairo mailing list