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

Side by Side Diff: platform_tools/android/third_party/ashmem/cutils/ashmem.h

Issue 1108013002: Make Skia for Android libjpeg use ashmem (Closed) Base URL: https://skia.googlesource.com/skia.git@jpeg-scanline
Patch Set: Moving README and LICENSE up one dir Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 /* third_party/ashmem/ashmem.h
2 **
3 ** Copyright 2008 The Android Open Source Project
4 **
5 ** This file is dual licensed. It may be redistributed and/or modified
6 ** under the terms of the Apache 2.0 License OR version 2 of the GNU
7 ** General Public License.
8 */
9
10 #ifndef _THIRD_PARTY_ASHMEM_H
11 #define _THIRD_PARTY_ASHMEM_H
12
13 #include <stddef.h>
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 int ashmem_create_region(const char *name, size_t size);
20 int ashmem_set_prot_region(int fd, int prot);
21 int ashmem_pin_region(int fd, size_t offset, size_t len);
22 int ashmem_unpin_region(int fd, size_t offset, size_t len);
23 int ashmem_get_size_region(int fd);
24 int ashmem_purge_all(void);
25
26 #ifdef __cplusplus
27 }
28 #endif
29
30 #ifndef __ASHMEMIOC /* in case someone included <linux/ashmem.h> too */
31
32 #define ASHMEM_NAME_LEN 256
33
34 #define ASHMEM_NAME_DEF "dev/ashmem"
35
36 /* Return values from ASHMEM_PIN: Was the mapping purged while unpinned? */
37 #define ASHMEM_NOT_PURGED 0
38 #define ASHMEM_WAS_PURGED 1
39
40 /* Return values from ASHMEM_UNPIN: Is the mapping now pinned or unpinned? */
41 #define ASHMEM_IS_UNPINNED 0
42 #define ASHMEM_IS_PINNED 1
43
44 #endif /* ! __ASHMEMIOC */
45
46 #endif /* _THIRD_PARTY_ASHMEM_H */
OLDNEW
« no previous file with comments | « platform_tools/android/third_party/ashmem/README.skia ('k') | platform_tools/android/third_party/ashmem/cutils/ashmem-dev.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698