Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Unified Diff: include/core/SkData.h

Issue 15941025: Add SkData::NewFromFD. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Remove an indentation level. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/core/SkOSFile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkData.h
===================================================================
--- include/core/SkData.h (revision 9384)
+++ include/core/SkData.h (working copy)
@@ -93,12 +93,22 @@
/**
* Create a new dataref from a SkFILE.
* This does not take ownership of the SkFILE, nor close it.
+ * The caller is free to close the SkFILE at its convenience.
* The SkFILE must be open for reading only.
* Returns NULL on failure.
*/
static SkData* NewFromFILE(SkFILE* f);
/**
+ * Create a new dataref from a file descriptor.
+ * This does not take ownership of the file descriptor, nor close it.
+ * The caller is free to close the file descriptor at its convenience.
+ * The file descriptor must be open for reading only.
+ * Returns NULL on failure.
+ */
+ static SkData* NewFromFD(int fd);
+
+ /**
* Create a new dataref using a subset of the data in the specified
* src dataref.
*/
« no previous file with comments | « no previous file | include/core/SkOSFile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698