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

Side by Side Diff: src/utils/android/ashmem.h

Issue 319533004: remove ashmem from skia (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: AnotherPatchSet Created 6 years, 6 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
« no previous file with comments | « src/ports/SkDiscardableMemory_ashmem.cpp ('k') | src/utils/android/ashmem.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2008 The Android Open Source Project
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef _CUTILS_ASHMEM_H
9 #define _CUTILS_ASHMEM_H
10
11 #include <stddef.h>
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 int ashmem_create_region(const char *name, size_t size);
18 int ashmem_set_prot_region(int fd, int prot);
19
20 /**
21 * @return ASHMEM_NOT_PURGED if the memory was not purged.
22 * ASHMEM_WAS_PURGED if the memory was purged.
23 * -1 on error.
24 */
25 int ashmem_pin_region(int fd, size_t offset, size_t len);
26 int ashmem_unpin_region(int fd, size_t offset, size_t len);
27 int ashmem_get_size_region(int fd);
28 int ashmem_purge_all_caches(int fd);
29
30 #ifdef __cplusplus
31 }
32 #endif
33
34 #ifndef __ASHMEMIOC /* in case someone included <linux/ashmem.h> too */
35
36 #define ASHMEM_NAME_LEN 256
37
38 #define ASHMEM_NAME_DEF "dev/ashmem"
39
40 /* Return values from ASHMEM_PIN: Was the mapping purged while unpinned? */
41 #define ASHMEM_NOT_PURGED 0
42 #define ASHMEM_WAS_PURGED 1
43
44 /* Return values from ASHMEM_UNPIN: Is the mapping now pinned or unpinned? */
45 #define ASHMEM_IS_UNPINNED 0
46 #define ASHMEM_IS_PINNED 1
47
48 #endif /* ! __ASHMEMIOC */
49
50 #endif /* _CUTILS_ASHMEM_H */
OLDNEW
« no previous file with comments | « src/ports/SkDiscardableMemory_ashmem.cpp ('k') | src/utils/android/ashmem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698