1
2/*
3 * Copyright 2008 The Android Open Source Project
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9
10#ifndef SkMMapStream_DEFINED
11#define SkMMapStream_DEFINED
12
13#include "SkStream.h"
14
15class SkMMAPStream : public SkMemoryStream {
16public:
17    SkMMAPStream(const char filename[]);
18    virtual ~SkMMAPStream();
19
20    virtual void setMemory(const void* data, size_t length, bool);
21private:
22    void*   fAddr;
23    size_t  fSize;
24
25    void closeMMap();
26
27    typedef SkMemoryStream INHERITED;
28};
29
30#endif
31