Home
last modified time | relevance | path

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

123

/hardware/interfaces/graphics/mapper/4.0/utils/vts/
DMapperVts.cpp74 for (auto bufferHandle : mClonedBuffers) { in ~Gralloc() local
75 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
81 for (auto bufferHandle : mImportedBuffers) { in ~Gralloc() local
82 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
90 const native_handle_t* bufferHandle = native_handle_clone(rawHandle.getNativeHandle()); in cloneBuffer() local
91 EXPECT_NE(nullptr, bufferHandle); in cloneBuffer()
93 if (bufferHandle) { in cloneBuffer()
94 mClonedBuffers.insert(bufferHandle); in cloneBuffer()
97 return bufferHandle; in cloneBuffer()
119 const native_handle_t* bufferHandle = nullptr; in allocate() local
[all …]
/hardware/interfaces/graphics/mapper/3.0/utils/vts/
DMapperVts.cpp57 for (auto bufferHandle : mClonedBuffers) { in ~Gralloc() local
58 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
64 for (auto bufferHandle : mImportedBuffers) { in ~Gralloc() local
65 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
83 const native_handle_t* bufferHandle = native_handle_clone(rawHandle.getNativeHandle()); in cloneBuffer() local
84 EXPECT_NE(nullptr, bufferHandle); in cloneBuffer()
86 if (bufferHandle) { in cloneBuffer()
87 mClonedBuffers.insert(bufferHandle); in cloneBuffer()
90 return bufferHandle; in cloneBuffer()
158 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/
DGrallocLoader.h61 void* add(native_handle_t* bufferHandle) { in add() argument
63 return mBufferHandles.insert(bufferHandle).second ? bufferHandle : nullptr; in add()
66 void removeLocked(native_handle* bufferHandle) { mBufferHandles.erase(bufferHandle); } in removeLocked() argument
69 auto bufferHandle = static_cast<native_handle_t*>(buffer); in get() local
72 return mBufferHandles.count(bufferHandle) == 1 ? bufferHandle : nullptr; in get()
76 auto bufferHandle = static_cast<const native_handle_t*>(buffer); in getConst() local
79 return mBufferHandles.count(bufferHandle) == 1 ? bufferHandle : nullptr; in getConst()
91 void* addImportedBuffer(native_handle_t* bufferHandle) override { in addImportedBuffer() argument
92 return GrallocImportedBufferPool::getInstance().add(bufferHandle); in addImportedBuffer()
95 Error freeImportedBuffer(native_handle_t* bufferHandle) override { in freeImportedBuffer() argument
[all …]
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 return freeImportedBuffer(bufferHandle); in freeBuffer()
93 const native_handle_t* bufferHandle = getConstImportedBuffer(buffer); in lock() local
94 if (!bufferHandle) { in lock()
107 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/google/gchips/gralloc4/src/hidl_common/
DMapper.cpp68 static Error registerBuffer(buffer_handle_t bufferHandle) in registerBuffer() argument
70 if (private_handle_t::validate(bufferHandle) < 0) in registerBuffer()
72 MALI_GRALLOC_LOGE("Buffer: %p is corrupted", bufferHandle); in registerBuffer()
76 if (mali_gralloc_reference_retain(bufferHandle) < 0) in registerBuffer()
92 static Error unregisterBuffer(buffer_handle_t bufferHandle) in unregisterBuffer() argument
94 if (private_handle_t::validate(bufferHandle) < 0) in unregisterBuffer()
96 MALI_GRALLOC_LOGE("Buffer: %p is corrupted", bufferHandle); in unregisterBuffer()
100 const int status = mali_gralloc_reference_release(bufferHandle); in unregisterBuffer()
103 MALI_GRALLOC_LOGE("Unable to release buffer:%p", bufferHandle); in unregisterBuffer()
157 static Error lockBuffer(buffer_handle_t bufferHandle, in lockBuffer() argument
[all …]
DRegisteredHandlePool.cpp21 bool RegisteredHandlePool::add(buffer_handle_t bufferHandle) in add() argument
24 return bufPool.insert(bufferHandle).second; in add()
29 auto bufferHandle = const_cast<native_handle_t*>(buffer); in remove() local
32 return bufPool.erase(bufferHandle) == 1 ? bufferHandle : nullptr; in remove()
37 auto bufferHandle = static_cast<buffer_handle_t>(buffer); in get() local
40 return bufPool.count(bufferHandle) == 1 ? bufferHandle : nullptr; in get()
/hardware/interfaces/graphics/mapper/4.0/vts/functional/
DVtsHalGraphicsMapperV4_0TargetTest.cpp98 const native_handle_t* bufferHandle = nullptr; in testGet() local
99 ASSERT_NO_FATAL_FAILURE(bufferHandle = mGralloc->allocate(descriptorInfo, true)); in testGet()
102 const auto result = mGralloc->get(bufferHandle, metadataType, &vec); in testGet()
116 const native_handle_t* bufferHandle = nullptr; in testSet() local
117 ASSERT_NO_FATAL_FAILURE(bufferHandle = mGralloc->allocate(descriptorInfo, true)); in testSet()
119 Error err = mGralloc->set(bufferHandle, metadataType, metadata); in testSet()
127 ASSERT_EQ(Error::NONE, mGralloc->get(bufferHandle, metadataType, &vec)); in testSet()
180 const native_handle_t* bufferHandle = nullptr) { in verifyBufferDump() argument
202 if (!bufferHandle) { in verifyBufferDump()
207 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/stable-c/vts/
DVtsHalGraphicsMapperStableC_TargetTest.cpp222 auto getStandardMetadata(buffer_handle_t bufferHandle) in getStandardMetadata() argument
229 bufferHandle, static_cast<int64_t>(T), buffer.data(), buffer.size()); in getStandardMetadata()
238 sizeRequired = mapper()->v5.getStandardMetadata(bufferHandle, static_cast<int64_t>(T), in getStandardMetadata()
251 AIMapper_Error setStandardMetadata(buffer_handle_t bufferHandle, in setStandardMetadata() argument
267 return mapper()->v5.setStandardMetadata(bufferHandle, static_cast<int64_t>(T), in setStandardMetadata()
323 void verifyRGBA8888(const buffer_handle_t bufferHandle, const uint8_t* data, uint32_t height, in verifyRGBA8888() argument
325 auto decodeResult = getStandardMetadata<StandardMetadataType::PLANE_LAYOUTS>(bufferHandle); in verifyRGBA8888()
386 void getAndroidYCbCr(buffer_handle_t bufferHandle, uint8_t* data, android_ycbcr* outYCbCr, in getAndroidYCbCr() argument
388 auto decodeResult = getStandardMetadata<StandardMetadataType::PLANE_LAYOUTS>(bufferHandle); in getAndroidYCbCr()
463 YCbCr getAndroidYCbCr_P010(const native_handle_t* bufferHandle, uint8_t* data) { in getAndroidYCbCr_P010() argument
[all …]
/hardware/interfaces/graphics/mapper/3.0/vts/functional/
DVtsHalGraphicsMapperV3_0TargetTest.cpp86 for (auto bufferHandle : bufferHandles) { in TEST_P() local
87 mGralloc->freeBuffer(bufferHandle); in TEST_P()
113 auto bufferHandle = mGralloc->allocate(info, false); in TEST_P() local
114 mGralloc->freeBuffer(bufferHandle); in TEST_P()
170 const native_handle_t* bufferHandle; in TEST_P() local
171 ASSERT_NO_FATAL_FAILURE(bufferHandle = mGralloc->allocate(mDummyDescriptorInfo, true)); in TEST_P()
172 ASSERT_NO_FATAL_FAILURE(mGralloc->freeBuffer(bufferHandle)); in TEST_P()
225 auto bufferHandle = mGralloc->allocate(info, true); in TEST_P() local
226 mGralloc->freeBuffer(bufferHandle); in TEST_P()
277 const native_handle_t* bufferHandle; in TEST_P() local
[all …]
/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 this->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 = this->mHal->getTransportSize(bufferHandle, &numFds, &numInts); 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/3.0/utils/vts/include/mapper-vts/3.0/
DMapperVts.h67 void freeBuffer(const native_handle_t* bufferHandle);
72 void* lock(const native_handle_t* bufferHandle, uint64_t cpuUsage,
75 YCbCrLayout lockYCbCr(const native_handle_t* bufferHandle, uint64_t cpuUsage,
77 int unlock(const native_handle_t* bufferHandle);
79 bool validateBufferSize(const native_handle_t* bufferHandle,
81 void getTransportSize(const native_handle_t* bufferHandle, uint32_t* outNumFds,
/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/mapper/4.0/utils/vts/include/mapper-vts/4.0/
DMapperVts.h127 void freeBuffer(const native_handle_t* bufferHandle);
132 void* lock(const native_handle_t* bufferHandle, uint64_t cpuUsage,
134 int unlock(const native_handle_t* bufferHandle);
136 int flushLockedBuffer(const native_handle_t* bufferHandle);
137 void rereadLockedBuffer(const native_handle_t* bufferHandle);
139 bool validateBufferSize(const native_handle_t* bufferHandle,
141 void getTransportSize(const native_handle_t* bufferHandle, uint32_t* outNumFds,
150 Error get(const native_handle_t* bufferHandle, const IMapper::MetadataType& metadataType,
153 Error set(const native_handle_t* bufferHandle, const IMapper::MetadataType& metadataType,
160 Error getReservedRegion(const native_handle_t* bufferHandle, void** outReservedRegion,
/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/google/gchips/include/
DGrallocWrapper.h54 void freeBuffer(buffer_handle_t bufferHandle) const;
58 Error lock(buffer_handle_t bufferHandle, uint64_t usage,
64 Error lock(buffer_handle_t bufferHandle, uint64_t usage,
70 int unlock(buffer_handle_t bufferHandle) const;

123