aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkMMapStream.h
blob: a3b35f2df86b31ef5428d8035292e6cd208f62b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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