Home
last modified time | relevance | path

Searched refs:bufferHandle (Results 1 – 25 of 35) sorted by relevance

12

/hardware/interfaces/graphics/mapper/4.0/utils/vts/
DMapperVts.cpp56 for (auto bufferHandle : mClonedBuffers) { in ~Gralloc() local
57 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
63 for (auto bufferHandle : mImportedBuffers) { in ~Gralloc() local
64 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
76 const native_handle_t* bufferHandle = native_handle_clone(rawHandle.getNativeHandle()); in cloneBuffer() local
77 EXPECT_NE(nullptr, bufferHandle); in cloneBuffer()
79 if (bufferHandle) { in cloneBuffer()
80 mClonedBuffers.insert(bufferHandle); in cloneBuffer()
83 return bufferHandle; in cloneBuffer()
102 const native_handle_t* bufferHandle = nullptr; in allocate() local
[all …]
/hardware/interfaces/sensors/common/vts/utils/
DGrallocWrapper.cpp64 virtual void freeBuffer(native_handle_t* bufferHandle) = 0;
67 virtual void* lock(native_handle_t* bufferHandle) = 0;
68 virtual void unlock(native_handle_t* bufferHandle) = 0;
111 virtual void freeBuffer(native_handle_t* bufferHandle) override;
113 virtual void* lock(native_handle_t* bufferHandle) override;
114 virtual void unlock(native_handle_t* bufferHandle) override;
135 native_handle_t* bufferHandle = nullptr; in allocate() local
144 bufferHandle = importBuffer(buffers[0]); in allocate()
149 return bufferHandle; in allocate()
153 void GrallocHalWrapper<AllocatorT, MapperT>::freeBuffer(native_handle_t* bufferHandle) { in freeBuffer() argument
[all …]
/hardware/interfaces/graphics/mapper/3.0/utils/vts/
DMapperVts.cpp55 for (auto bufferHandle : mClonedBuffers) { in ~Gralloc() local
56 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
62 for (auto bufferHandle : mImportedBuffers) { in ~Gralloc() local
63 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
81 const native_handle_t* bufferHandle = native_handle_clone(rawHandle.getNativeHandle()); in cloneBuffer() local
82 EXPECT_NE(nullptr, bufferHandle); in cloneBuffer()
84 if (bufferHandle) { in cloneBuffer()
85 mClonedBuffers.insert(bufferHandle); in cloneBuffer()
88 return bufferHandle; in cloneBuffer()
152 const native_handle_t* bufferHandle = nullptr; in importBuffer() local
[all …]
/hardware/interfaces/graphics/mapper/2.0/utils/vts/
DMapperVts.cpp40 for (auto bufferHandle : mClonedBuffers) { in ~Gralloc() local
41 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
47 for (auto bufferHandle : mImportedBuffers) { in ~Gralloc() local
48 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
66 const native_handle_t* bufferHandle = native_handle_clone(rawHandle.getNativeHandle()); in cloneBuffer() local
67 EXPECT_NE(nullptr, bufferHandle); in cloneBuffer()
69 if (bufferHandle) { in cloneBuffer()
70 mClonedBuffers.insert(bufferHandle); in cloneBuffer()
73 return bufferHandle; in cloneBuffer()
137 const native_handle_t* bufferHandle = nullptr; in importBuffer() local
[all …]
/hardware/interfaces/graphics/mapper/2.0/utils/passthrough/include/mapper-passthrough/2.0/
DGralloc0Hal.h78 native_handle_t* bufferHandle = native_handle_clone(rawHandle); in importBuffer() local
79 if (!bufferHandle) { in importBuffer()
83 if (mModule->registerBuffer(mModule, bufferHandle)) { in importBuffer()
84 native_handle_close(bufferHandle); in importBuffer()
85 native_handle_delete(bufferHandle); in importBuffer()
89 *outBufferHandle = bufferHandle; in importBuffer()
94 Error freeBuffer(native_handle_t* bufferHandle) override { in freeBuffer() argument
95 if (mModule->unregisterBuffer(mModule, bufferHandle)) { in freeBuffer()
99 native_handle_close(bufferHandle); in freeBuffer()
100 native_handle_delete(bufferHandle); in freeBuffer()
[all …]
DGralloc1Hal.h98 native_handle_t* bufferHandle = native_handle_clone(rawHandle); in importBuffer() local
99 if (!bufferHandle) { in importBuffer()
103 int32_t error = mDispatch.retain(mDevice, bufferHandle); in importBuffer()
105 native_handle_close(bufferHandle); in importBuffer()
106 native_handle_delete(bufferHandle); in importBuffer()
110 *outBufferHandle = bufferHandle; in importBuffer()
115 Error freeBuffer(native_handle_t* bufferHandle) override { in freeBuffer() argument
116 int32_t error = mDispatch.release(mDevice, bufferHandle); in freeBuffer()
118 native_handle_close(bufferHandle); in freeBuffer()
119 native_handle_delete(bufferHandle); in freeBuffer()
[all …]
/hardware/interfaces/graphics/mapper/2.0/utils/hal/include/mapper-hal/2.0/
DMapper.h64 native_handle_t* bufferHandle = nullptr; in importBuffer() local
65 Error error = mHal->importBuffer(rawHandle.getNativeHandle(), &bufferHandle); in importBuffer()
71 void* buffer = addImportedBuffer(bufferHandle); in importBuffer()
73 mHal->freeBuffer(bufferHandle); in importBuffer()
83 native_handle_t* bufferHandle = getImportedBuffer(buffer); in freeBuffer() local
84 if (!bufferHandle) { in freeBuffer()
88 Error error = mHal->freeBuffer(bufferHandle); in freeBuffer()
97 const native_handle_t* bufferHandle = getConstImportedBuffer(buffer); in lock() local
98 if (!bufferHandle) { in lock()
111 error = mHal->lock(bufferHandle, cpuUsage, accessRegion, std::move(fenceFd), &data); in lock()
[all …]
DMapperHal.h42 virtual Error freeBuffer(native_handle_t* bufferHandle) = 0;
45 virtual Error lock(const native_handle_t* bufferHandle, uint64_t cpuUsage,
50 virtual Error lockYCbCr(const native_handle_t* bufferHandle, uint64_t cpuUsage,
55 virtual Error unlock(const native_handle_t* bufferHandle, base::unique_fd* outFenceFd) = 0;
/hardware/interfaces/graphics/mapper/4.0/vts/functional/
DVtsHalGraphicsMapperV4_0TargetTest.cpp85 const native_handle_t* bufferHandle = nullptr; in testGet() local
86 ASSERT_NO_FATAL_FAILURE(bufferHandle = mGralloc->allocate(descriptorInfo, true)); in testGet()
89 ASSERT_EQ(Error::NONE, mGralloc->get(bufferHandle, metadataType, &vec)); in testGet()
97 const native_handle_t* bufferHandle = nullptr; in testSet() local
98 ASSERT_NO_FATAL_FAILURE(bufferHandle = mGralloc->allocate(descriptorInfo, true)); in testSet()
100 Error err = mGralloc->set(bufferHandle, metadataType, metadata); in testSet()
108 ASSERT_EQ(Error::NONE, mGralloc->get(bufferHandle, metadataType, &vec)); in testSet()
161 const native_handle_t* bufferHandle = nullptr) { in verifyBufferDump() argument
183 if (!bufferHandle) { in verifyBufferDump()
188 ASSERT_EQ(Error::NONE, mGralloc->get(bufferHandle, metadataType, &metadataFromGet)); in verifyBufferDump()
[all …]
/hardware/interfaces/graphics/mapper/2.1/vts/functional/
DVtsHalGraphicsMapperV2_1TargetTest.cpp64 const native_handle_t* bufferHandle; in TEST_P() local
66 ASSERT_NO_FATAL_FAILURE(bufferHandle = mGralloc->allocate(mDummyDescriptorInfo, true, &stride)); in TEST_P()
68 ASSERT_TRUE(mGralloc->validateBufferSize(bufferHandle, mDummyDescriptorInfo, stride)); in TEST_P()
70 ASSERT_NO_FATAL_FAILURE(mGralloc->freeBuffer(bufferHandle)); in TEST_P()
110 native_handle_t* bufferHandle; in TEST_P() local
113 bufferHandle = const_cast<native_handle_t*>(mGralloc->allocate(info, true, &stride))); in TEST_P()
117 Error ret = mGralloc->getMapper()->validateBufferSize(bufferHandle, info, stride); in TEST_P()
123 ret = mGralloc->getMapper()->validateBufferSize(bufferHandle, info, stride); in TEST_P()
129 ret = mGralloc->getMapper()->validateBufferSize(bufferHandle, info, stride); in TEST_P()
135 ret = mGralloc->getMapper()->validateBufferSize(bufferHandle, info, stride); in TEST_P()
[all …]
/hardware/interfaces/graphics/mapper/4.0/utils/vts/include/mapper-vts/4.0/
DMapperVts.h95 void freeBuffer(const native_handle_t* bufferHandle);
100 void* lock(const native_handle_t* bufferHandle, uint64_t cpuUsage,
102 int unlock(const native_handle_t* bufferHandle);
104 int flushLockedBuffer(const native_handle_t* bufferHandle);
105 void rereadLockedBuffer(const native_handle_t* bufferHandle);
107 bool validateBufferSize(const native_handle_t* bufferHandle,
109 void getTransportSize(const native_handle_t* bufferHandle, uint32_t* outNumFds,
114 Error get(const native_handle_t* bufferHandle, const IMapper::MetadataType& metadataType,
117 Error set(const native_handle_t* bufferHandle, const IMapper::MetadataType& metadataType,
124 Error getReservedRegion(const native_handle_t* bufferHandle, void** outReservedRegion,
/hardware/interfaces/graphics/mapper/2.0/vts/functional/
DVtsHalGraphicsMapperV2_0TargetTest.cpp85 for (auto bufferHandle : bufferHandles) { in TEST_P() local
86 mGralloc->freeBuffer(bufferHandle); in TEST_P()
112 auto bufferHandle = mGralloc->allocate(info, false); in TEST_P() local
113 mGralloc->freeBuffer(bufferHandle); in TEST_P()
169 const native_handle_t* bufferHandle; in TEST_P() local
170 ASSERT_NO_FATAL_FAILURE(bufferHandle = mGralloc->allocate(mDummyDescriptorInfo, true)); in TEST_P()
171 ASSERT_NO_FATAL_FAILURE(mGralloc->freeBuffer(bufferHandle)); in TEST_P()
224 auto bufferHandle = mGralloc->allocate(info, true); in TEST_P() local
225 mGralloc->freeBuffer(bufferHandle); in TEST_P()
276 const native_handle_t* bufferHandle; in TEST_P() local
[all …]
/hardware/interfaces/graphics/mapper/2.1/utils/hal/include/mapper-hal/2.1/
DMapper.h44 const native_handle_t* bufferHandle = getImportedBuffer(buffer); in validateBufferSize() local
45 if (!bufferHandle) { in validateBufferSize()
49 return mHal->validateBufferSize(bufferHandle, descriptorInfo, stride); in validateBufferSize()
53 const native_handle_t* bufferHandle = getImportedBuffer(buffer); in getTransportSize() local
54 if (!bufferHandle) { in getTransportSize()
61 Error error = mHal->getTransportSize(bufferHandle, &numFds, &numInts); in getTransportSize()
DMapperHal.h49 virtual Error validateBufferSize(const native_handle_t* bufferHandle,
55 virtual Error getTransportSize(const native_handle_t* bufferHandle, uint32_t* outNumFds,
/hardware/interfaces/graphics/mapper/3.0/vts/functional/
DVtsHalGraphicsMapperV3_0TargetTest.cpp85 for (auto bufferHandle : bufferHandles) { in TEST_P() local
86 mGralloc->freeBuffer(bufferHandle); in TEST_P()
112 auto bufferHandle = mGralloc->allocate(info, false); in TEST_P() local
113 mGralloc->freeBuffer(bufferHandle); in TEST_P()
169 const native_handle_t* bufferHandle; in TEST_P() local
170 ASSERT_NO_FATAL_FAILURE(bufferHandle = mGralloc->allocate(mDummyDescriptorInfo, true)); in TEST_P()
171 ASSERT_NO_FATAL_FAILURE(mGralloc->freeBuffer(bufferHandle)); in TEST_P()
224 auto bufferHandle = mGralloc->allocate(info, true); in TEST_P() local
225 mGralloc->freeBuffer(bufferHandle); in TEST_P()
276 const native_handle_t* bufferHandle; in TEST_P() local
[all …]
/hardware/interfaces/graphics/mapper/2.1/utils/passthrough/include/mapper-passthrough/2.1/
DGralloc0Hal.h37 Error validateBufferSize(const native_handle_t* bufferHandle, in validateBufferSize() argument
49 mModule, bufferHandle, descriptorInfo.width, descriptorInfo.height, in validateBufferSize()
59 Error getTransportSize(const native_handle_t* bufferHandle, uint32_t* outNumFds, in getTransportSize() argument
62 *outNumFds = bufferHandle->numFds; in getTransportSize()
63 *outNumInts = bufferHandle->numInts; in getTransportSize()
67 int32_t ret = mModule->getTransportSize(mModule, bufferHandle, outNumFds, outNumInts); in getTransportSize()
DGralloc1Hal.h39 Error validateBufferSize(const native_handle_t* bufferHandle, in validateBufferSize() argument
52 mDispatch.validateBufferSize(mDevice, bufferHandle, &bufferDescriptorInfo, stride); in validateBufferSize()
60 Error getTransportSize(const native_handle_t* bufferHandle, uint32_t* outNumFds, in getTransportSize() argument
62 int32_t error = mDispatch.getTransportSize(mDevice, bufferHandle, outNumFds, outNumInts); in getTransportSize()
/hardware/interfaces/graphics/allocator/2.0/utils/gralloc1-adapter/
DGralloc1On0Adapter.h275 buffer_handle_t bufferHandle, in callBufferFunction() argument
277 auto buffer = getAdapter(device)->getBuffer(bufferHandle); in callBufferFunction()
287 buffer_handle_t bufferHandle, Args... args) { in bufferHook() argument
288 return Gralloc1On0Adapter::callBufferFunction(device, bufferHandle, in bufferHook()
293 buffer_handle_t bufferHandle, uint64_t* outUsage) { in getConsumerUsageHook() argument
295 auto error = callBufferFunction(device, bufferHandle, in getConsumerUsageHook()
304 buffer_handle_t bufferHandle, uint64_t* outUsage) { in getProducerUsageHook() argument
306 auto error = callBufferFunction(device, bufferHandle, in getProducerUsageHook()
326 gralloc1_error_t retain(buffer_handle_t bufferHandle);
328 buffer_handle_t bufferHandle) in retainHook() argument
[all …]
DGralloc1On0Adapter.cpp308 buffer_handle_t bufferHandle = nullptr; in allocateHook() local
309 error = adapter->allocate(descriptors[i], descriptor, &bufferHandle); in allocateHook()
314 outBuffers[i] = bufferHandle; in allocateHook()
366 gralloc1_error_t Gralloc1On0Adapter::retain(buffer_handle_t bufferHandle) in retain() argument
368 ALOGV("retain(%p)", bufferHandle); in retain()
372 if (mBuffers.count(bufferHandle) != 0) { in retain()
373 mBuffers[bufferHandle]->retain(); in retain()
377 ALOGV("Calling registerBuffer(%p)", bufferHandle); in retain()
378 int result = mModule->registerBuffer(mModule, bufferHandle); in retain()
386 bufferHandle, &backingStore); in retain()
[all …]
/hardware/interfaces/graphics/mapper/2.1/utils/vts/
DMapperVts.cpp69 bool Gralloc::validateBufferSize(const native_handle_t* bufferHandle, in validateBufferSize() argument
72 auto buffer = const_cast<native_handle_t*>(bufferHandle); in validateBufferSize()
78 void Gralloc::getTransportSize(const native_handle_t* bufferHandle, uint32_t* outNumFds, in getTransportSize() argument
80 auto buffer = const_cast<native_handle_t*>(bufferHandle); in getTransportSize()
87 ASSERT_GE(bufferHandle->numFds, int(tmpNumFds)) << "invalid numFds " << tmpNumFds; in getTransportSize()
88 ASSERT_GE(bufferHandle->numInts, int(tmpNumInts)) << "invalid numInts " << tmpNumInts; in getTransportSize()
/hardware/interfaces/graphics/mapper/2.0/utils/vts/include/mapper-vts/2.0/
DMapperVts.h66 void freeBuffer(const native_handle_t* bufferHandle);
71 void* lock(const native_handle_t* bufferHandle, uint64_t cpuUsage,
73 YCbCrLayout lockYCbCr(const native_handle_t* bufferHandle, uint64_t cpuUsage,
75 int unlock(const native_handle_t* bufferHandle);
/hardware/interfaces/graphics/composer/2.1/utils/vts/
DComposerVts.cpp357 void* Gralloc::lock(const native_handle_t* bufferHandle, uint64_t cpuUsage, in lock() argument
365 return mGralloc4->lock(bufferHandle, cpuUsage, accessRegion, acquireFence); in lock()
374 return mGralloc3->lock(bufferHandle, cpuUsage, accessRegion, acquireFence, &bytesPerPixel, in lock()
382 return mGralloc2->lock(bufferHandle, cpuUsage, accessRegion, acquireFence); in lock()
386 int Gralloc::unlock(const native_handle_t* bufferHandle) { in unlock() argument
388 return mGralloc4->unlock(bufferHandle); in unlock()
390 return mGralloc3->unlock(bufferHandle); in unlock()
392 return mGralloc2->unlock(bufferHandle); in unlock()
396 void Gralloc::freeBuffer(const native_handle_t* bufferHandle) { in freeBuffer() argument
398 mGralloc4->freeBuffer(bufferHandle); in freeBuffer()
[all …]
/hardware/interfaces/graphics/mapper/2.1/utils/vts/include/mapper-vts/2.1/
DMapperVts.h41 bool validateBufferSize(const native_handle_t* bufferHandle,
43 void getTransportSize(const native_handle_t* bufferHandle, uint32_t* outNumFds,
/hardware/interfaces/graphics/composer/2.1/utils/resources/
DComposerResources.cpp54 const native_handle_t* bufferHandle; in importBuffer() local
59 bufferHandle = static_cast<const native_handle_t*>(tmpBufferHandle); in importBuffer()
69 bufferHandle = static_cast<const native_handle_t*>(tmpBufferHandle); in importBuffer()
79 bufferHandle = static_cast<const native_handle_t*>(tmpBufferHandle); in importBuffer()
86 *outBufferHandle = bufferHandle; in importBuffer()
90 void ComposerHandleImporter::freeBuffer(const native_handle_t* bufferHandle) { in freeBuffer() argument
91 if (bufferHandle) { in freeBuffer()
93 mMapper2->freeBuffer(static_cast<void*>(const_cast<native_handle_t*>(bufferHandle))); in freeBuffer()
95 mMapper3->freeBuffer(static_cast<void*>(const_cast<native_handle_t*>(bufferHandle))); in freeBuffer()
97 mMapper4->freeBuffer(static_cast<void*>(const_cast<native_handle_t*>(bufferHandle))); in freeBuffer()
/hardware/interfaces/graphics/composer/2.1/utils/vts/include/composer-vts/2.1/
DComposerVts.h147 void* lock(const native_handle_t* bufferHandle, uint64_t cpuUsage,
150 int unlock(const native_handle_t* bufferHandle);
152 void freeBuffer(const native_handle_t* bufferHandle);

12