aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-24 20:03:00 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-24 20:03:00 +0000
commit9711e446676e6bf84b3fff916fd1d7537933a110 (patch)
tree652dc51c7f8ad24dcd205b6663be6ca14519c190 /include/core
parentd0419019de2a15a87d390fb0eed929acf9029d75 (diff)
Move MMap to SkData.
R=reed@google.com Author: bungeman@google.com Review URL: https://chromiumcodereview.appspot.com/14336003 git-svn-id: http://skia.googlecode.com/svn/trunk@8848 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkData.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/core/SkData.h b/include/core/SkData.h
index fdd3a57efe..0e8ee2219e 100644
--- a/include/core/SkData.h
+++ b/include/core/SkData.h
@@ -13,6 +13,8 @@
#include "SkFlattenable.h"
+struct SkFILE;
+
/**
* SkData holds an immutable data buffer. Not only is the data immutable,
* but the actual ptr that is returned (by data() or bytes()) is guaranteed
@@ -89,10 +91,12 @@ public:
static SkData* NewFromMalloc(const void* data, size_t length);
/**
- * Create a new dataref from a pointer allocated by mmap. The Data object
- * will handle calling munmap().
+ * Create a new dataref from a SkFILE.
+ * This does not take ownership of the SkFILE, nor close it.
+ * The SkFILE must be open for reading only.
+ * Returns NULL on failure.
*/
- static SkData* NewFromMMap(const void* data, size_t length);
+ static SkData* NewFromFILE(SkFILE* f);
/**
* Create a new dataref using a subset of the data in the specified