aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkMMapStream.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/SkMMapStream.h')
-rw-r--r--include/core/SkMMapStream.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/core/SkMMapStream.h b/include/core/SkMMapStream.h
new file mode 100644
index 0000000000..a3b35f2df8
--- /dev/null
+++ b/include/core/SkMMapStream.h
@@ -0,0 +1,30 @@
+
+/*
+ * Copyright 2008 The Android Open Source Project
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+
+#ifndef SkMMapStream_DEFINED
+#define SkMMapStream_DEFINED
+
+#include "SkStream.h"
+
+class SkMMAPStream : public SkMemoryStream {
+public:
+ SkMMAPStream(const char filename[]);
+ virtual ~SkMMAPStream();
+
+ virtual void setMemory(const void* data, size_t length, bool);
+private:
+ void* fAddr;
+ size_t fSize;
+
+ void closeMMap();
+
+ typedef SkMemoryStream INHERITED;
+};
+
+#endif