Home
last modified time | relevance | path

Searched refs:native_handle_t (Results 1 – 25 of 478) sorted by relevance

12345678910>>...20

/aosp12/system/core/libcutils/
H A Dnative_handle.cpp26 if ((uintptr_t) storage % alignof(native_handle_t)) { in native_handle_init()
31 native_handle_t* handle = (native_handle_t*) storage; in native_handle_init()
32 handle->version = sizeof(native_handle_t); in native_handle_init()
38 native_handle_t* native_handle_create(int numFds, int numInts) { in native_handle_create()
46 native_handle_t* h = static_cast<native_handle_t*>(malloc(mallocSize)); in native_handle_create()
48 h->version = sizeof(native_handle_t); in native_handle_create()
55 native_handle_t* native_handle_clone(const native_handle_t* handle) { in native_handle_clone()
75 int native_handle_delete(native_handle_t* h) { in native_handle_delete()
77 if (h->version != sizeof(native_handle_t)) return -EINVAL; in native_handle_delete()
83 int native_handle_close(const native_handle_t* h) { in native_handle_close()
[all …]
/aosp12/hardware/interfaces/graphics/composer/2.1/utils/resources/include/composer-resources/2.1/
H A DComposerResources.h47 Error importBuffer(const native_handle_t* rawHandle, const native_handle_t** outBufferHandle);
48 void freeBuffer(const native_handle_t* bufferHandle);
49 Error importStream(const native_handle_t* rawHandle, const native_handle_t** outStreamHandle);
50 void freeStream(const native_handle_t* streamHandle);
89 std::vector<const native_handle_t*> mHandles;
102 const native_handle_t** outHandle,
129 const native_handle_t** outHandle,
133 const native_handle_t** outHandle,
214 const native_handle_t* mHandle = nullptr;
228 const native_handle_t* rawHandle, const native_handle_t** outBufferHandle,
[all …]
/aosp12/hardware/interfaces/graphics/mapper/4.0/utils/vts/include/mapper-vts/4.0/
H A DMapperVts.h62 std::vector<const native_handle_t*> allocate(
91 const native_handle_t* importBuffer(const hidl_handle& rawHandle) { in importBuffer()
95 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,
138 const native_handle_t* cloneBuffer(const hidl_handle& rawHandle) { in cloneBuffer()
147 std::unordered_set<const native_handle_t*> mClonedBuffers;
[all …]
/aosp12/hardware/interfaces/graphics/mapper/4.0/utils/vts/
H A DMapperVts.cpp90 std::vector<const native_handle_t*> bufferHandles; in allocate()
162 const native_handle_t* bufferHandle = nullptr; in importBuffer()
183 auto buffer = const_cast<native_handle_t*>(bufferHandle); in freeBuffer()
197 auto buffer = const_cast<native_handle_t*>(bufferHandle); in lock()
221 int Gralloc::unlock(const native_handle_t* bufferHandle) { in unlock()
222 auto buffer = const_cast<native_handle_t*>(bufferHandle); in unlock()
244 auto buffer = const_cast<native_handle_t*>(bufferHandle); in flushLockedBuffer()
266 auto buffer = const_cast<native_handle_t*>(bufferHandle); in rereadLockedBuffer()
274 auto buffer = const_cast<native_handle_t*>(bufferHandle); in validateBufferSize()
282 auto buffer = const_cast<native_handle_t*>(bufferHandle); in getTransportSize()
[all …]
/aosp12/system/core/libcutils/include/cutils/
H A Dnative_handle.h31 alignas(native_handle_t) char (name)[ \
32 sizeof(native_handle_t) + sizeof(int) * ((maxFds) + (maxInts))]
47 } native_handle_t; typedef
49 typedef const native_handle_t* buffer_handle_t;
59 int native_handle_close(const native_handle_t* h);
68 native_handle_t* native_handle_init(char* storage, int numFds, int numInts);
78 native_handle_t* native_handle_create(int numFds, int numInts);
87 native_handle_t* native_handle_clone(const native_handle_t* handle);
99 int native_handle_delete(native_handle_t* h);
/aosp12/system/core/libcutils/include_outside_system/cutils/
H A Dnative_handle.h31 alignas(native_handle_t) char (name)[ \
32 sizeof(native_handle_t) + sizeof(int) * ((maxFds) + (maxInts))]
47 } native_handle_t; typedef
49 typedef const native_handle_t* buffer_handle_t;
59 int native_handle_close(const native_handle_t* h);
68 native_handle_t* native_handle_init(char* storage, int numFds, int numInts);
78 native_handle_t* native_handle_create(int numFds, int numInts);
87 native_handle_t* native_handle_clone(const native_handle_t* handle);
99 int native_handle_delete(native_handle_t* h);
/aosp12/hardware/interfaces/graphics/composer/2.1/utils/resources/
H A DComposerResources.cpp47 Error ComposerHandleImporter::importBuffer(const native_handle_t* rawHandle, in importBuffer()
54 const native_handle_t* bufferHandle; in importBuffer()
102 Error ComposerHandleImporter::importStream(const native_handle_t* rawHandle, in importStream()
104 const native_handle_t* streamHandle = nullptr; in importStream()
119 native_handle_delete(const_cast<native_handle_t*>(streamHandle)); in freeStream()
186 const native_handle_t** outHandle, in getHandle()
203 const native_handle_t* inHandle, in getBuffer()
204 const native_handle_t** outHandle, in getBuffer()
458 const native_handle_t** outHandle, in getHandle()
463 const native_handle_t* importedHandle = nullptr; in getHandle()
[all …]
/aosp12/hardware/interfaces/graphics/mapper/3.0/utils/vts/include/mapper-vts/3.0/
H A DMapperVts.h54 std::vector<const native_handle_t*> allocate(const BufferDescriptor& descriptor,
66 const native_handle_t* importBuffer(const hidl_handle& rawHandle);
67 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,
91 const native_handle_t* cloneBuffer(const hidl_handle& rawHandle);
98 std::unordered_set<const native_handle_t*> mClonedBuffers;
[all …]
/aosp12/hardware/interfaces/graphics/mapper/3.0/utils/vts/
H A DMapperVts.cpp56 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
63 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
94 std::vector<const native_handle_t*> bufferHandles; in allocate()
152 const native_handle_t* bufferHandle = nullptr; in importBuffer()
167 auto buffer = const_cast<native_handle_t*>(bufferHandle); in freeBuffer()
182 auto buffer = const_cast<native_handle_t*>(bufferHandle); in lock()
214 auto buffer = const_cast<native_handle_t*>(bufferHandle); in lockYCbCr()
239 int Gralloc::unlock(const native_handle_t* bufferHandle) { in unlock()
240 auto buffer = const_cast<native_handle_t*>(bufferHandle); in unlock()
264 auto buffer = const_cast<native_handle_t*>(bufferHandle); in validateBufferSize()
[all …]
/aosp12/hardware/interfaces/graphics/mapper/2.0/utils/vts/
H A DMapperVts.cpp41 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
48 auto buffer = const_cast<native_handle_t*>(bufferHandle); in ~Gralloc()
79 std::vector<const native_handle_t*> bufferHandles; in allocate()
137 const native_handle_t* bufferHandle = nullptr; in importBuffer()
141 bufferHandle = static_cast<const native_handle_t*>(tmpBuffer); in importBuffer()
151 void Gralloc::freeBuffer(const native_handle_t* bufferHandle) { in freeBuffer()
152 auto buffer = const_cast<native_handle_t*>(bufferHandle); in freeBuffer()
166 auto buffer = const_cast<native_handle_t*>(bufferHandle); in lock()
192 auto buffer = const_cast<native_handle_t*>(bufferHandle); in lockYCbCr()
217 int Gralloc::unlock(const native_handle_t* bufferHandle) { in unlock()
[all …]
/aosp12/hardware/google/camera/common/sensor_listener/
H A Dgoog_gralloc_wrapper.cc49 auto buffer = const_cast<native_handle_t*>(buffer_handle); in ~GoogGrallocWrapper()
56 auto buffer = const_cast<native_handle_t*>(buffer_handle); in ~GoogGrallocWrapper()
77 const native_handle_t* GoogGrallocWrapper::CloneBuffer( in CloneBuffer()
79 const native_handle_t* buffer_handle = in CloneBuffer()
94 std::vector<const native_handle_t*> buffer_handles; in Allocate()
123 const native_handle_t* GoogGrallocWrapper::AllocateOneBuffer( in AllocateOneBuffer()
150 const native_handle_t* GoogGrallocWrapper::ImportBuffer( in ImportBuffer()
152 const native_handle_t* buffer_handle = nullptr; in ImportBuffer()
171 auto buffer = const_cast<native_handle_t*>(buffer_handle); in FreeBuffer()
192 auto buffer = const_cast<native_handle_t*>(buffer_handle); in Lock()
[all …]
H A Dgoog_gralloc_wrapper.h53 std::vector<const native_handle_t*> Allocate(
59 const native_handle_t* AllocateOneBuffer(
73 const native_handle_t* ImportBuffer(
77 void FreeBuffer(const native_handle_t* buffer_handle);
83 void* Lock(const native_handle_t* buffer_handle, uint64_t cpu_usage,
89 int Unlock(const native_handle_t* buffer_handle);
92 const native_handle_t* CloneBuffer(const hardware::hidl_handle& raw_handle);
103 std::unordered_set<const native_handle_t*> cloned_buffers_;
106 std::unordered_set<const native_handle_t*> imported_buffers_;
/aosp12/hardware/interfaces/graphics/mapper/2.0/utils/vts/include/mapper-vts/2.0/
H A DMapperVts.h54 std::vector<const native_handle_t*> allocate(const BufferDescriptor& descriptor, uint32_t count,
56 const native_handle_t* allocate(const IMapper::BufferDescriptorInfo& descriptorInfo,
65 const native_handle_t* importBuffer(const hidl_handle& rawHandle);
66 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);
79 const native_handle_t* cloneBuffer(const hidl_handle& rawHandle);
86 std::unordered_set<const native_handle_t*> mClonedBuffers;
87 std::unordered_set<const native_handle_t*> mImportedBuffers;
/aosp12/hardware/interfaces/sensors/common/vts/utils/
H A DGrallocWrapper.cpp63 virtual native_handle_t* allocate(uint32_t size) = 0;
64 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;
110 virtual native_handle_t* allocate(uint32_t size) override;
113 virtual void* lock(native_handle_t* bufferHandle) override;
114 virtual void unlock(native_handle_t* bufferHandle) override;
128 native_handle_t* importBuffer(const hidl_handle& rawHandle);
135 native_handle_t* bufferHandle = nullptr; in allocate()
187 native_handle_t* bufferHandle = nullptr; in importBuffer()
[all …]
/aosp12/hardware/qcom/display/msm8960/libgenlock/
H A Dgenlock.h62 genlock_status_t genlock_create_lock(native_handle_t *buffer_handle);
71 genlock_status_t genlock_release_lock(native_handle_t *buffer_handle);
79 genlock_status_t genlock_attach_lock(native_handle_t *buffer_handle);
95 genlock_status_t genlock_lock_buffer(native_handle_t *buffer_handle,
105 genlock_status_t genlock_unlock_buffer(native_handle_t *buffer_handle);
114 genlock_status_t genlock_wait(native_handle_t *buffer_handle, int timeout);
123 genlock_status_t genlock_write_to_read(native_handle_t *buffer_handle,
/aosp12/hardware/interfaces/common/support/
H A Dtest.cpp25 static void checkEq(const NativeHandle& aidl, native_handle_t* libcutils, bool exceptFds) { in checkEq()
65 native_handle_t* to = makeFromAidl(handle); in TEST()
73 native_handle_t* to = makeFromAidl(handle); in TEST()
81 native_handle_t* to = dupFromAidl(handle); in TEST()
89 native_handle_t* to = dupFromAidl(handle); in TEST()
95 static native_handle_t* makeTestLibcutilsHandle() { in makeTestLibcutilsHandle()
96 native_handle_t* handle = native_handle_create(2, 4); in makeTestLibcutilsHandle()
107 native_handle_t* handle = native_handle_create(0, 0); in TEST()
115 native_handle_t* handle = makeTestLibcutilsHandle(); in TEST()
123 native_handle_t* handle = native_handle_create(0, 0); in TEST()
[all …]
H A DNativeHandle.cpp25 static native_handle_t* fromAidl(const NativeHandle& handle, bool doDup) { in fromAidl()
26 native_handle_t* to = native_handle_create(handle.fds.size(), handle.ints.size()); in fromAidl()
37 native_handle_t* makeFromAidl(const NativeHandle& handle) { in makeFromAidl()
40 native_handle_t* dupFromAidl(const NativeHandle& handle) { in dupFromAidl()
44 static NativeHandle toAidl(const native_handle_t* handle, bool doDup) { in toAidl()
58 NativeHandle makeToAidl(const native_handle_t* handle) { in makeToAidl()
62 NativeHandle dupToAidl(const native_handle_t* handle) { in dupToAidl()
/aosp12/hardware/interfaces/graphics/mapper/2.0/utils/passthrough/include/mapper-passthrough/2.0/
H A DGrallocLoader.h61 void* add(native_handle_t* bufferHandle) { in add()
68 native_handle_t* get(void* buffer) { in get()
69 auto bufferHandle = static_cast<native_handle_t*>(buffer); in get()
75 const native_handle_t* getConst(void* buffer) { in getConst()
76 auto bufferHandle = static_cast<const native_handle_t*>(buffer); in getConst()
84 std::unordered_set<const native_handle_t*> mBufferHandles;
91 void* addImportedBuffer(native_handle_t* bufferHandle) override { in addImportedBuffer()
95 Error freeImportedBuffer(native_handle_t* bufferHandle) override { in freeImportedBuffer()
104 native_handle_t* getImportedBuffer(void* buffer) const override { in getImportedBuffer()
108 const native_handle_t* getConstImportedBuffer(void* buffer) const override { in getConstImportedBuffer()
/aosp12/hardware/interfaces/graphics/mapper/2.0/utils/hal/include/mapper-hal/2.0/
H A DMapper.h64 native_handle_t* bufferHandle = nullptr; in importBuffer()
83 native_handle_t* bufferHandle = getImportedBuffer(buffer); in freeBuffer()
93 const native_handle_t* bufferHandle = getConstImportedBuffer(buffer); in lock()
115 const native_handle_t* bufferHandle = getConstImportedBuffer(buffer); in lockYCbCr()
135 const native_handle_t* bufferHandle = getConstImportedBuffer(buffer); in unlock()
155 virtual void* addImportedBuffer(native_handle_t* bufferHandle) { in addImportedBuffer()
159 virtual Error freeImportedBuffer(native_handle_t* bufferHandle) { in freeImportedBuffer()
163 virtual native_handle_t* getImportedBuffer(void* buffer) const { in getImportedBuffer()
164 return static_cast<native_handle_t*>(buffer); in getImportedBuffer()
168 return static_cast<const native_handle_t*>(buffer); in getConstImportedBuffer()
[all …]
H A DMapperHal.h38 virtual Error importBuffer(const native_handle_t* rawHandle,
39 native_handle_t** outBufferHandle) = 0;
42 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;
/aosp12/frameworks/native/libs/gui/include/gui/bufferqueue/1.0/
H A DConversion.h80 native_handle_t* native_handle_create_from_fd(int fd);
93 int native_handle_read_fd(native_handle_t const* nh, int index = 0);
143 hidl_handle inHidlHandle(native_handle_t const* nh);
315 status_t unflattenFence(hidl_handle* fence, native_handle_t** nh,
342 bool wrapAs(hidl_handle* t, native_handle_t** nh, Fence const& l);
447 std::vector<native_handle_t*>* nh,
506 std::vector<std::vector<native_handle_t*> >* nh,
540 std::vector<std::vector<native_handle_t*> >* nh,
638 native_handle_t** nh,
677 native_handle_t** nh,
[all …]
/aosp12/frameworks/av/media/codec2/vndk/include/
H A DC2SurfaceSyncObj.h149 struct HandleSyncMem : public native_handle_t {
151 native_handle_t(cHeader), in HandleSyncMem()
171 static bool isValid(const native_handle_t * const o);
187 version = sizeof(native_handle_t)
189 const static native_handle_t cHeader;
198 static std::shared_ptr<C2SurfaceSyncMemory> Import(native_handle_t *handle);
213 native_handle_t *handle();
/aosp12/frameworks/av/camera/ndk/ndk_vendor/impl/
H A Dutils.h45 std::vector<const native_handle_t *> mSurfaceList;
55 bool isWindowNativeHandleEqual(const native_handle_t *nh1, const native_handle_t *nh2);
57 bool isWindowNativeHandleLessThan(const native_handle_t *nh1, const native_handle_t *nh2);
60 bool isWindowNativeHandleGreaterThan(const native_handle_t *nh1, const native_handle_t *nh2);
65 const native_handle_t *mWindow = nullptr;
67 native_handle_ptr_wrapper(const native_handle_t *nh) : mWindow(nh) { } in native_handle_ptr_wrapper()
71 operator const native_handle_t *() const { return mWindow; }
/aosp12/system/core/libutils/include/utils/
H A DNativeHandle.h23 typedef struct native_handle native_handle_t; typedef
33 static sp<NativeHandle> create(native_handle_t* handle, bool ownsHandle);
35 const native_handle_t* handle() const { in handle()
43 NativeHandle(native_handle_t* handle, bool ownsHandle);
46 native_handle_t* mHandle;
/aosp12/hardware/interfaces/graphics/mapper/2.1/vts/functional/
H A DVtsHalGraphicsMapperV2_1TargetTest.cpp64 const native_handle_t* bufferHandle; in TEST_P()
77 native_handle_t* invalidHandle = nullptr; in TEST_P()
90 native_handle_t* rawBufferHandle; in TEST_P()
91 ASSERT_NO_FATAL_FAILURE(rawBufferHandle = const_cast<native_handle_t*>( in TEST_P()
110 native_handle_t* bufferHandle; in TEST_P()
113 bufferHandle = const_cast<native_handle_t*>(mGralloc->allocate(info, true, &stride))); in TEST_P()
151 const native_handle_t* bufferHandle; in TEST_P()
163 native_handle_t* invalidHandle = nullptr; in TEST_P()
178 native_handle_t* rawBufferHandle; in TEST_P()
179 ASSERT_NO_FATAL_FAILURE(rawBufferHandle = const_cast<native_handle_t*>( in TEST_P()

12345678910>>...20