Home
last modified time | relevance | path

Searched refs:numFds (Results 1 – 25 of 47) sorted by relevance

12

/frameworks/base/core/jni/
Dandroid_os_NativeHandle.cpp42 const int numFds = handle->numFds; in MakeJavaNativeHandleObj() local
43 ScopedLocalRef<jintArray> fds(env, env->NewIntArray(numFds)); in MakeJavaNativeHandleObj()
44 env->SetIntArrayRegion(fds.get(), 0, numFds, &(handle->data[0])); in MakeJavaNativeHandleObj()
48 env->SetIntArrayRegion(ints.get(), 0, numInts, &(handle->data[numFds])); in MakeJavaNativeHandleObj()
70 const int numFds = (int) env->GetArrayLength(fds.get()); in MakeCppNativeHandle() local
74 ? native_handle_create(numFds, numInts) in MakeCppNativeHandle()
75 : storage->allocTemporaryNativeHandle(numFds, numInts); in MakeCppNativeHandle()
78 env->GetIntArrayRegion(fds.get(), 0, numFds, &(handle->data[0])); in MakeCppNativeHandle()
79 env->GetIntArrayRegion(ints.get(), 0, numInts, &(handle->data[numFds])); in MakeCppNativeHandle()
/frameworks/native/libs/gui/bufferqueue/1.0/
DConversion.cpp63 return ((nh == nullptr) || (nh->numFds == 0) || in native_handle_read_fd()
64 (nh->numFds <= index) || (index < 0)) ? in native_handle_read_fd()
210 size_t numFds = static_cast<size_t>(handle ? handle->numFds : 0); in convertTo() local
211 int* fds = new int[numFds]; in convertTo()
226 ints[10] = static_cast<int32_t>(handle->numFds); in convertTo()
228 int* intsStart = handle->data + handle->numFds; in convertTo()
236 status_t status = l->unflatten(constBuffer, size, constFds, numFds); in convertTo()
360 void const*& buffer, size_t& size, int const*& fds, size_t& numFds) { in unflattenFence() argument
372 if (numFds < numFdsInHandle) { in unflattenFence()
383 --numFds; in unflattenFence()
[all …]
DH2BGraphicBufferProducer.cpp81 return ((nh == nullptr) || (nh->numFds == 0) || in native_handle_read_fd()
82 (nh->numFds <= index) || (index < 0)) ? in native_handle_read_fd()
159 size_t numFds = static_cast<size_t>(handle ? handle->numFds : 0); in convertTo() local
160 int* fds = new int[numFds]; in convertTo()
175 ints[10] = static_cast<int32_t>(handle->numFds); in convertTo()
177 int* intsStart = handle->data + handle->numFds; in convertTo()
185 status_t status = l->unflatten(constBuffer, size, constFds, numFds); in convertTo()
236 void const*& buffer, size_t& size, int const*& fds, size_t& numFds) { in unflattenFence() argument
248 if (numFds < numFdsInHandle) { in unflattenFence()
259 --numFds; in unflattenFence()
[all …]
/frameworks/native/libs/gui/include/gui/bufferqueue/1.0/
DConversion.h316 void const*& buffer, size_t& size, int const*& fds, size_t& numFds);
329 void*& buffer, size_t& size, int*& fds, size_t& numFds);
390 void*& buffer, size_t& size, int*& fds, size_t& numFds);
409 void const*& buffer, size_t& size, int const*& fds, size_t& numFds);
448 void const*& buffer, size_t& size, int const*& fds, size_t& numFds);
465 void*& buffer, size_t& size, int*& fds, size_t numFds);
507 void const*& buffer, size_t& size, int const*& fds, size_t& numFds);
523 void*& buffer, size_t& size, int*& fds, size_t& numFds);
639 void*& buffer, size_t& size, int*& fds, size_t& numFds);
659 void const*& buffer, size_t& size, int const*& fds, size_t& numFds);
/frameworks/av/services/camera/libcameraservice/device3/
DBufferUtils.h40 result = 31 * result + buf->numFds; in operator()
41 for (int i = 0; i < buf->numFds; i++) { in operator()
50 if (buf1->numFds == buf2->numFds) { in operator()
51 for (int i = 0; i < buf1->numFds; i++) { in operator()
DCamera3OutputUtilsTemplated.h116 return handle->numFds; in numFdsInHandle()
124 if (handle->numFds != 1) { in getHandleFirstFd()
/frameworks/native/libs/ui/
DFence.cpp188 uint32_t numFds; in unflatten() local
189 FlattenableUtils::read(buffer, size, numFds); in unflatten()
191 if (numFds > 1) { in unflatten()
195 if (count < numFds) { in unflatten()
199 if (numFds) { in unflatten()
DGraphicBuffer.cpp484 memcpy(buf + 13, handle->data + handle->numFds, in flatten()
524 const size_t numFds = static_cast<size_t>(buf[10]); in unflatten() local
532 if (numFds >= maxNumber || numInts >= (maxNumber - flattenWordCount)) { in unflatten()
537 ALOGE("unflatten: numFds or numInts is too large: %zd, %zd", numFds, numInts); in unflatten()
544 size_t fdCountNeeded = numFds; in unflatten()
552 if (numFds || numInts) { in unflatten()
565 native_handle_create(static_cast<int>(numFds), static_cast<int>(numInts)); in unflatten()
574 memcpy(h->data, fds, numFds * sizeof(int)); in unflatten()
575 memcpy(h->data + numFds, buf + flattenWordCount, numInts * sizeof(int)); in unflatten()
612 fds += numFds; in unflatten()
[all …]
/frameworks/native/libs/vr/libbufferhub/include/private/dvr/
Dnative_handle_wrapper.h27 const int fd_count = handle->numFds; in NativeHandleWrapper()
84 for (int i = 0; i < handle->numFds; i++) { in FromFdsAndInts()
87 memcpy(&handle->data[handle->numFds], ints.data(), in FromFdsAndInts()
/frameworks/base/core/java/android/os/
DNativeHandle.java185 int numFds = mFds.length; in getFdsAsIntArray() local
186 int[] fds = new int[numFds]; in getFdsAsIntArray()
188 for (int i = 0; i < numFds; i++) { in getFdsAsIntArray()
/frameworks/av/media/codec2/vndk/
DC2Fence.cpp87 if (!nh || nh->numFds < 0 || nh->numFds > MAX_FENCE_FDS in GetTypeFromNativeHandle()
93 switch (nh->data[nh->numFds + nh->numInts - 1]) { in GetTypeFromNativeHandle()
399 } else if (nh->numFds < 1 || nh->numInts < 1 in CreateFromNativeHandle()
400 || nh->numFds > MAX_FENCE_FDS || nh->numInts > MAX_FENCE_INTS) { in CreateFromNativeHandle()
401 ALOGE("Invalid handle for a sync fence (%d fds, %d ints)", nh->numFds, nh->numInts); in CreateFromNativeHandle()
405 for (int i = 0; i < nh->numFds; i++) { in CreateFromNativeHandle()
427 int32_t magic = nh->data[nh->numFds + nh->numInts - 1]; in CreateFromNativeHandle()
DC2AllocatorGralloc.cpp89 handle->numFds < 0 || in native_handle_is_invalid()
92 handle->numFds > int((INT_MAX - handle->version) / sizeof(int)) - handle->numInts); in native_handle_is_invalid()
124 &handle->data[handle->numFds + handle->numInts - NUM_INTS]); in GetExtraData()
155 … handle->numInts > int((INT_MAX - handle->version) / sizeof(int)) - NUM_INTS - handle->numFds) { in WrapAndMoveNativeHandle()
163 native_handle_t *res = native_handle_create(handle->numFds, handle->numInts + NUM_INTS); in WrapAndMoveNativeHandle()
165 memcpy(&res->data, &handle->data, sizeof(int) * (handle->numFds + handle->numInts)); in WrapAndMoveNativeHandle()
221 native_handle_t *res = native_handle_create(handle->numFds, handle->numInts - NUM_INTS); in UnwrapNativeHandle()
223 memcpy(&res->data, &handle->data, sizeof(int) * (res->numFds + res->numInts)); in UnwrapNativeHandle()
277 &handle->data[handle->numFds + handle->numInts - NUM_INTS]); in GetExtraData()
306 int((INT_MAX - handle->version) / sizeof(int)) - NUM_INTS - handle->numFds) { in WrapAndMoveNativeHandle()
[all …]
Dtypes.cpp156 if (!from || from->numFds == 0) { in h2b()
160 if (from->numFds != 1 || from->numInts != 0) { in h2b()
/frameworks/av/media/libmedia/include/media/omx/1.0/
DConversion.h137 return ((nh == nullptr) || (nh->numFds == 0) ||
138 (nh->numFds <= index) || (index < 0)) ?
641 t.nativeHandle->numFds, in convertTo()
642 (t.nativeHandle->numFds > 0) ? t.nativeHandle->data[0] : -1, in convertTo()
643 (t.nativeHandle->numFds > 1) ? t.nativeHandle->data[1] : -1); in convertTo()
651 size_t numFds = static_cast<size_t>(handle ? handle->numFds : 0); in convertTo() local
652 int* fds = new int[numFds]; in convertTo()
674 ints[10] = static_cast<int32_t>(handle->numFds); in convertTo()
676 int* intsStart = handle->data + handle->numFds; in convertTo()
684 status_t status = l->unflatten(constBuffer, size, constFds, numFds); in convertTo()
/frameworks/av/media/utils/
DAImageReaderUtils.cpp44 if (handle->numFds != 0 || in AImageReader_getHGBPFromHandle()
/frameworks/av/media/codec2/vndk/internal/
DC2HandleIonInternal.h56 numFds = sizeof(mFds) / sizeof(int), enumerator
/frameworks/base/core/jni/hwbinder/
DEphemeralStorage.cpp75 int numFds, int numInts) { in allocTemporaryNativeHandle() argument
79 item.mPtr = native_handle_create(numFds, numInts); in allocTemporaryNativeHandle()
DEphemeralStorage.h46 native_handle_t *allocTemporaryNativeHandle(int numFds, int numInts);
/frameworks/av/media/module/bufferpool/1.0/vts/
Dallocator.cpp61 numFds = sizeof(mFds) / sizeof(int), enumerator
70 HandleAshmem::numFds,
/frameworks/av/media/module/bufferpool/2.0/tests/
Dallocator.cpp61 numFds = sizeof(mFds) / sizeof(int), enumerator
70 HandleAshmem::numFds,
/frameworks/av/camera/tests/fuzzer/
Dcamera_fuzzer.cpp108 int32_t numFds = mFDP->ConsumeIntegralInRange<int32_t>(kMinElements, kMaxElements); in createNativeHandle() local
110 native_handle_t* handle = native_handle_create(numFds, numInts); in createNativeHandle()
111 for (int32_t i = 0; i < numFds; ++i) { in createNativeHandle()
/frameworks/native/libs/gui/bufferqueue/2.0/
Dtypes.cpp149 if (!from || from->numFds == 0) { in h2b()
153 if (from->numFds != 1 || from->numInts != 0) { in h2b()
/frameworks/av/media/codec2/tests/vndk/
DC2FenceTest.cpp164 EXPECT_EQ(handle->numFds, 1); in validateSingleFdFence()
280 EXPECT_EQ(handle->numFds, 3); in validateTwoFdUnorderedFence()
356 EXPECT_EQ(handle->numFds, 3); in validateThreeFdFence()
/frameworks/av/media/codec2/vndk/include/
DC2SurfaceSyncObj.h206 numFds = sizeof(mFds) / sizeof(int), enumerator
/frameworks/native/libs/binder/tests/parcel_fuzzer/
Drandom_parcel_seeds.cpp175 size_t numFds = 0; in regenerateParcel() local
194 numFds++; in regenerateParcel()

12