Home
last modified time | relevance | path

Searched refs:ashmemFd (Results 1 – 9 of 9) sorted by relevance

/frameworks/native/libs/ui/
DBufferHubMetadata.cpp55 unique_fd ashmemFd{fd}; in create() local
57 if (ashmem_set_prot_region(ashmemFd.get(), kAshmemProt) != 0) { in create()
62 return BufferHubMetadata::import(std::move(ashmemFd)); in create()
66 BufferHubMetadata BufferHubMetadata::import(unique_fd ashmemFd) { in import() argument
67 if (!ashmem_valid(ashmemFd.get())) { in import()
72 size_t metadataSize = static_cast<size_t>(ashmem_get_size_region(ashmemFd.get())); in import()
79 MAP_SHARED, ashmemFd.get(), in import()
86 return BufferHubMetadata(userMetadataSize, std::move(ashmemFd), metadataHeader); in import()
89 BufferHubMetadata::BufferHubMetadata(size_t userMetadataSize, unique_fd ashmemFd, in BufferHubMetadata() argument
92 mAshmemFd(std::move(ashmemFd)), in BufferHubMetadata()
DBufferHubBuffer.cpp170 unique_fd ashmemFd(fcntl(bufferTraits.bufferInfo->data[0], F_DUPFD_CLOEXEC, 0)); in initWithBufferTraits() local
171 mMetadata = BufferHubMetadata::import(std::move(ashmemFd)); in initWithBufferTraits()
/frameworks/av/media/bufferpool/1.0/vts/
Dallocator.cpp35 HandleAshmem(int ashmemFd, size_t size) in HandleAshmem()
37 mFds{ ashmemFd }, in HandleAshmem()
40 int ashmemFd() const { return mFds.mAshmem; } in ashmemFd() function
85 AllocationAshmem(int ashmemFd, size_t capacity, bool res) in AllocationAshmem() argument
86 : mHandle(ashmemFd, capacity), in AllocationAshmem()
92 int ashmemFd = ashmem_create_region(kAllocationTag, size); in Alloc() local
93 return new AllocationAshmem(ashmemFd, size, ashmemFd >= 0); in Alloc()
170 NULL, o->size(), PROT_READ|PROT_WRITE, MAP_SHARED, o->ashmemFd(), 0); in Fill()
188 NULL, o->size(), PROT_READ, MAP_SHARED, o->ashmemFd(), 0); in Verify()
/frameworks/av/media/bufferpool/2.0/tests/
Dallocator.cpp35 HandleAshmem(int ashmemFd, size_t size) in HandleAshmem()
37 mFds{ ashmemFd }, in HandleAshmem()
40 int ashmemFd() const { return mFds.mAshmem; } in ashmemFd() function
85 AllocationAshmem(int ashmemFd, size_t capacity, bool res) in AllocationAshmem() argument
86 : mHandle(ashmemFd, capacity), in AllocationAshmem()
92 int ashmemFd = ashmem_create_region(kAllocationTag, size); in Alloc() local
93 return new AllocationAshmem(ashmemFd, size, ashmemFd >= 0); in Alloc()
170 NULL, o->size(), PROT_READ|PROT_WRITE, MAP_SHARED, o->ashmemFd(), 0); in Fill()
188 NULL, o->size(), PROT_READ, MAP_SHARED, o->ashmemFd(), 0); in Verify()
/frameworks/native/libs/ui/tests/
DBufferHubMetadata_test.cpp43 unique_fd h2 = unique_fd(dup(m1.ashmemFd().get())); in TEST_F()
69 EXPECT_NE(m1.ashmemFd().get(), -1); in TEST_F()
78 EXPECT_EQ(m1.ashmemFd().get(), -1); in TEST_F()
79 EXPECT_NE(m2.ashmemFd().get(), -1); in TEST_F()
90 EXPECT_EQ(m2.ashmemFd().get(), -1); in TEST_F()
91 EXPECT_NE(m3.ashmemFd().get(), -1); in TEST_F()
/frameworks/base/libs/androidfw/
DCursorWindow.cpp33 CursorWindow::CursorWindow(const String8& name, int ashmemFd, in CursorWindow() argument
35 mName(name), mAshmemFd(ashmemFd), mData(data), mSize(size), mReadOnly(readOnly) { in CursorWindow()
49 int ashmemFd = ashmem_create_region(ashmemName.string(), size); in create() local
50 if (ashmemFd < 0) { in create()
54 result = ashmem_set_prot_region(ashmemFd, PROT_READ | PROT_WRITE); in create()
58 void* data = ::mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, ashmemFd, 0); in create()
63 result = ashmem_set_prot_region(ashmemFd, PROT_READ); in create()
67 CursorWindow* window = new CursorWindow(name, ashmemFd, in create()
85 ::close(ashmemFd); in create()
96 int ashmemFd = parcel->readFileDescriptor(); in createFromParcel() local
[all …]
/frameworks/native/libs/ui/include/ui/
DBufferHubMetadata.h41 static BufferHubMetadata import(unique_fd ashmemFd);
71 const unique_fd& ashmemFd() const { return mAshmemFd; } in ashmemFd() function
75 BufferHubMetadata(size_t userMetadataSize, unique_fd ashmemFd,
/frameworks/base/libs/androidfw/include/androidfw/
DCursorWindow.h53 CursorWindow(const String8& name, int ashmemFd,
/frameworks/native/services/bufferhub/
DBufferHubService.cpp74 node->userMetadataSize(), node->metadata().ashmemFd(), in allocateBuffer()
173 node->userMetadataSize(), node->metadata().ashmemFd(), in importBuffer()