Re: Implementing cairo_read_func_t/cairo_write_func_t properly
Bernhard Fischer <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <2833733.eu10hONkY8@winnie> |
On Tuesday 05 January 2016 00:12:14 Enrico Weigelt, metux IT consult wrote: > On 04.01.2016 08:52, Bernhard Fischer wrote: > >> Images usually are only useful when already downloaded completely. At > >> that you dont need streaming anymore, as you already have everything > >> in memory or on-disk. > > > > *) Assume you are doing something on a file within your program and you > > have it already opened somewhere else... > > Well, just dup() the already opened fd ? It actually makes no difference if the stream function works on buffered IO (FILE*) or direct IO (file descriptor). However, Using both methods at the same time is NOT recommended according to the man pages. > > > *) You have an open stream in your software but no file name, e.g. a tcp > > stream, an unlinked file, a pipe to another process,... > > You'll have an fd then ... So what? The stream function can be implemented with an fd as well, it makes no difference. Bernhard -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo