/frameworks/native/services/inputflinger/tests/ |
D | BlockingQueue_test.cpp | 32 constexpr size_t capacity = 10; in TEST() local 33 BlockingQueue<int> queue(capacity); in TEST() 43 constexpr size_t capacity = 3; in TEST() local 44 BlockingQueue<int> queue(capacity); in TEST() 50 ASSERT_FALSE(queue.push(4)) << "Queue should reach capacity at size " << capacity; in TEST() 58 constexpr size_t capacity = 10; in TEST() local 59 BlockingQueue<int> queue(capacity); in TEST() 61 for (size_t i = 0; i < capacity; i++) { in TEST() 64 for (size_t i = 0; i < capacity; i++) { in TEST() 70 constexpr size_t capacity = 2; in TEST() local [all …]
|
/frameworks/av/media/libaaudio/tests/ |
D | test_atomic_fifo.cpp | 33 constexpr int capacity = 83; in TEST() local 35 FifoController fifoController(capacity, threshold); in TEST() 36 ASSERT_EQ(capacity, fifoController.getCapacity()); in TEST() 65 constexpr int advance2 = 13 + capacity - advance1; in TEST() 71 ASSERT_EQ(advanced - capacity, fifoController.getWriteIndex()); in TEST() 77 constexpr int capacity = 7; // arbitrary prime in TEST() local 78 constexpr int threshold = capacity; in TEST() 79 FifoController fifoController(capacity, threshold); in TEST() 80 ASSERT_EQ(capacity, fifoController.getCapacity()); in TEST() 87 EXPECT_LT(fifoController.getReadIndex(), capacity); in TEST() [all …]
|
/frameworks/base/tests/AccessoryDisplay/common/src/com/android/accessorydisplay/common/ |
D | BufferPool.java | 68 int capacity = buffer.capacity(); in grow() local 69 if (capacity < needed) { in grow() 71 capacity = chooseCapacity(capacity, needed); in grow() 72 buffer = ByteBuffer.allocate(capacity); in grow() 79 private int chooseCapacity(int capacity, int needed) { in chooseCapacity() argument 80 while (capacity < needed) { in chooseCapacity() 81 capacity *= 2; in chooseCapacity() 83 if (capacity > mMaxBufferSize) { in chooseCapacity() 88 capacity = mMaxBufferSize; in chooseCapacity() 90 return capacity; in chooseCapacity()
|
/frameworks/av/media/libstagefright/foundation/ |
D | ABuffer.cpp | 25 ABuffer::ABuffer(size_t capacity) in ABuffer() argument 29 mData = malloc(capacity); in ABuffer() 34 mCapacity = capacity; in ABuffer() 35 mRangeLength = capacity; in ABuffer() 39 ABuffer::ABuffer(void *data, size_t capacity) in ABuffer() argument 41 mCapacity(capacity), in ABuffer() 43 mRangeLength(capacity), in ABuffer() 49 sp<ABuffer> ABuffer::CreateAsCopy(const void *data, size_t capacity) in CreateAsCopy() argument 51 sp<ABuffer> res = new ABuffer(capacity); in CreateAsCopy() 55 memcpy(res->data(), data, capacity); in CreateAsCopy()
|
/frameworks/base/tests/net/java/com/android/internal/util/ |
D | RingBufferTest.java | 91 int capacity = 100; in testRingBufferWithWrapping() local 92 RingBuffer<String> buffer = new RingBuffer<>(String.class, capacity); in testRingBufferWithWrapping() 103 String[] expected2 = new String[capacity]; in testRingBufferWithWrapping() 105 int lastIndex = capacity - 1; in testRingBufferWithWrapping() 108 for (int i = 1; i < capacity; i++) { in testRingBufferWithWrapping() 132 int capacity = 100; in testGetNextSlot() local 133 RingBuffer<DummyClass1> buffer = new RingBuffer<>(DummyClass1.class, capacity); in testGetNextSlot() 135 final DummyClass1[] actual = new DummyClass1[capacity]; in testGetNextSlot() 136 final DummyClass1[] expected = new DummyClass1[capacity]; in testGetNextSlot() 137 for (int i = 0; i < capacity; ++i) { in testGetNextSlot() [all …]
|
/frameworks/base/core/java/com/android/internal/util/ |
D | TokenBucket.java | 53 public TokenBucket(int deltaMs, int capacity, int tokens) { in TokenBucket() argument 55 mCapacity = checkArgumentPositive(capacity, "capacity must be strictly positive"); in TokenBucket() 66 public TokenBucket(int deltaMs, int capacity) { in TokenBucket() argument 67 this(deltaMs, capacity, capacity); in TokenBucket() 78 public int capacity() { in capacity() method in TokenBucket
|
D | RingBuffer.java | 38 public RingBuffer(Class<T> c, int capacity) { in RingBuffer() argument 39 checkArgumentPositive(capacity, "A RingBuffer cannot have 0 capacity"); in RingBuffer() 41 mBuffer = (T[]) Array.newInstance(c, capacity); in RingBuffer()
|
/frameworks/native/libs/vr/libpdx/private/pdx/rpc/ |
D | thread_local_buffer.h | 51 static void Reserve(std::size_t capacity) { in Reserve() argument 53 InitializeBuffer(capacity); in Reserve() 54 buffer_->reserve(capacity); in Reserve() 67 static BufferType& GetBuffer(std::size_t capacity = Capacity) { 69 Reserve(capacity); 102 static void InitializeBuffer(std::size_t capacity) { in InitializeBuffer() argument 104 GetBufferGuard().reset(buffer_ = new BufferType(capacity)); in InitializeBuffer()
|
D | buffer_wrapper.h | 32 BufferWrapper(pointer buffer, size_type capacity, size_type size) in BufferWrapper() argument 34 capacity_(capacity), in BufferWrapper() 35 end_(capacity < size ? capacity : size) {} in BufferWrapper() 81 size_type capacity() const { return capacity_; } in capacity() function 133 size_type max_size() const { return buffer_.capacity(); } in max_size() 134 size_type capacity() const { return buffer_.capacity(); } in capacity() function
|
D | array_wrapper.h | 32 ArrayWrapper(pointer buffer, size_type capacity, size_type size) in ArrayWrapper() argument 34 capacity_(capacity), in ArrayWrapper() 35 end_(capacity < size ? capacity : size) {} in ArrayWrapper() 81 size_type capacity() const { return capacity_; } in capacity() function
|
D | string_wrapper.h | 34 StringWrapper(pointer buffer, size_type capacity, size_type size) in StringWrapper() argument 36 capacity_(capacity), in StringWrapper() 37 end_(capacity < size ? capacity : size) {} in StringWrapper() 87 size_type capacity() const { return capacity_; } in capacity() function
|
/frameworks/native/libs/vr/libbufferhubqueue/tests/ |
D | buffer_hub_queue-test.cpp | 136 EXPECT_EQ(producer_queue_->capacity(), test_queue_capacity); in TEST_F() 216 EXPECT_EQ(producer_queue_->capacity(), test_queue_capacity); in TEST_F() 281 ASSERT_EQ(producer_queue_->capacity(), i + 1); in TEST_F() 286 ASSERT_EQ(consumer_queue_->capacity(), i); in TEST_F() 292 ASSERT_EQ(consumer_queue_->capacity(), i + 1); in TEST_F() 332 EXPECT_EQ(producer_queue_->capacity(), 0); in TEST_F() 333 EXPECT_EQ(consumer_queue_->capacity(), 0); in TEST_F() 360 EXPECT_EQ(consumer_queue_->capacity(), 1ULL); in TEST_F() 373 ASSERT_EQ(kBufferCount, producer_queue_->capacity()); in TEST_F() 379 EXPECT_EQ(kBufferCount, consumer_queue_->capacity()); in TEST_F() [all …]
|
/frameworks/av/drm/mediadrm/plugins/clearkey/hidl/ |
D | Buffer.cpp | 27 Buffer::Buffer(size_t capacity) in Buffer() argument 30 mData = malloc(capacity); in Buffer() 35 mCapacity = capacity; in Buffer() 36 mRangeLength = capacity; in Buffer()
|
/frameworks/av/media/codec2/sfplugin/ |
D | CCodecBuffers.cpp | 55 [localBufferPool](size_t capacity) { in AllocateGraphicBuffer() argument 56 return localBufferPool->newBuffer(capacity); in AllocateGraphicBuffer() 171 sp<ABuffer> LocalBufferPool::newBuffer(size_t capacity) { in newBuffer() argument 175 [capacity](const std::vector<uint8_t> &vec) { in newBuffer() 176 return vec.capacity() >= capacity; in newBuffer() 183 if (mUsedSize + capacity > mPoolCapacity) { in newBuffer() 185 mUsedSize -= mPool.back().capacity(); in newBuffer() 188 if (mUsedSize + capacity > mPoolCapacity) { in newBuffer() 190 mUsedSize, capacity, mPoolCapacity); in newBuffer() 194 std::vector<uint8_t> vec(capacity); in newBuffer() [all …]
|
/frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation/ |
D | ABuffer.h | 32 explicit ABuffer(size_t capacity); 33 ABuffer(void *data, size_t capacity); 37 size_t capacity() const { return mCapacity; } in capacity() function 44 static sp<ABuffer> CreateAsCopy(const void *data, size_t capacity);
|
/frameworks/base/libs/hwui/tests/unit/ |
D | FatVectorTests.cpp | 29 return (char*)(&v) <= (char*)(&v[0]) && (char*)(&v + 1) >= (char*)(&v[0] + v.capacity()); in allocationIsInternal() 43 EXPECT_EQ(4u, v.capacity()); in TEST() 61 EXPECT_EQ(32u, v.capacity()); in TEST() 67 EXPECT_EQ(4u, v.capacity()); in TEST() 73 EXPECT_EQ(4u, v.capacity()); in TEST()
|
/frameworks/base/core/java/com/google/android/collect/ |
D | Sets.java | 70 int capacity = elements.length * 4 / 3 + 1; in newHashSet() local 71 HashSet<E> set = new HashSet<E>(capacity); in newHashSet() 112 int capacity = elements.length * 4 / 3 + 1; in newArraySet() local 113 ArraySet<E> set = new ArraySet<E>(capacity); in newArraySet()
|
/frameworks/av/media/codec2/vndk/ |
D | C2AllocatorIon.cpp | 166 …Impl(int ionFd, size_t capacity, int bufferFd, ion_user_handle_t buffer, C2Allocator::id_t id, int… in Impl() argument 168 mHandle(bufferFd, capacity), in Impl() 195 static Impl *Import(int ionFd, size_t capacity, int bufferFd, C2Allocator::id_t id); 370 ImplV2(int ionFd, size_t capacity, int bufferFd, C2Allocator::id_t id, int err) in ImplV2() argument 371 : Impl(ionFd, capacity, bufferFd, -1 /*buffer*/, id, err) { in ImplV2() 399 C2AllocationIon::Impl *C2AllocationIon::Impl::Import(int ionFd, size_t capacity, int bufferFd, in Import() argument 405 return new Impl(ionFd, capacity, bufferFd, buffer, id, ret); in Import() 407 return new ImplV2(ionFd, capacity, bufferFd, id, ret); in Import() 544 C2MemoryUsage usage, size_t capacity, size_t *align, unsigned *heapMask, unsigned *flags) { in mapUsage() argument 548 capacity = (capacity + mBlockSize - 1) & ~(mBlockSize - 1); in mapUsage() [all …]
|
/frameworks/av/media/codec2/core/include/ |
D | C2Buffer.h | 343 inline constexpr uint32_t capacity() const { return mCapacity; } in capacity() function 356 inline explicit _C2LinearCapacityAspect(size_t capacity) = delete; 359 inline explicit constexpr _C2LinearCapacityAspect(uint32_t capacity) in _C2LinearCapacityAspect() argument 360 : mCapacity(capacity) { } in _C2LinearCapacityAspect() 363 : mCapacity(parent == nullptr ? 0 : parent->capacity()) { } in _C2LinearCapacityAspect() 391 mOffset(c2_min(offset, capacity())), in _C2LinearRangeAspect() 392 mSize(c2_min(size, capacity() - mOffset)) { in _C2LinearRangeAspect() 398 : _C2LinearCapacityAspect(other.capacity()), in _C2LinearRangeAspect() 407 mSize(capacity()) { in _C2LinearRangeAspect() 413 mOffset(c2_min(offset, capacity())), in _C2LinearRangeAspect() [all …]
|
/frameworks/native/libs/vr/libdvrcommon/include/private/dvr/ |
D | ring_buffer.h | 23 explicit RingBuffer(size_t capacity) { Reset(capacity); } in RingBuffer() argument 83 void Reset(size_t capacity) { in Reset() argument 86 buffer_.resize(capacity); in Reset()
|
/frameworks/av/media/codec2/components/aac/ |
D | C2SoftAacEnc.cpp | 361 size_t capacity = 0u; in process() local 365 capacity = view.capacity(); in process() 374 if (capacity > 0) { in process() 379 + (capacity / sizeof(int16_t) * 1000000ll / channelCount / sampleRate); in process() 383 (mRemainderLen + capacity + mInputSize + (eos ? mNumBytesPerInputFrame - 1 : 0)) in process() 387 capacity, mInputSize, numFrames, mNumBytesPerInputFrame, inputTimestampUs.peekll(), in process() 401 inargs.numInSamples = capacity / sizeof(int16_t); in process() 405 INT inBufferSize[] = { (INT)capacity }; in process() 466 for (; mRemainderLen < bytesPerSample && offset < capacity; ++offset) { in process() 470 capacity -= offset; in process() [all …]
|
/frameworks/native/libs/vr/libdvr/ |
D | dvr_buffer_queue_internal.h | 38 size_t capacity() const { return producer_queue_->capacity(); } in capacity() function 74 size_t capacity() const { return consumer_queue_->capacity(); } in capacity() function
|
/frameworks/av/media/bufferpool/2.0/tests/ |
D | allocator.cpp | 23 uint32_t capacity; member 85 AllocationAshmem(int ashmemFd, size_t capacity, bool res) in AllocationAshmem() argument 86 : mHandle(ashmemFd, capacity), in AllocationAshmem() 133 AllocationAshmem::Alloc(ashmemParams.data.capacity)); in allocate() 139 *allocSize = ashmemParams.data.capacity; in allocate()
|
/frameworks/av/media/bufferpool/1.0/vts/ |
D | allocator.cpp | 23 uint32_t capacity; member 85 AllocationAshmem(int ashmemFd, size_t capacity, bool res) in AllocationAshmem() argument 86 : mHandle(ashmemFd, capacity), in AllocationAshmem() 133 AllocationAshmem::Alloc(ashmemParams.data.capacity)); in allocate() 139 *allocSize = ashmemParams.data.capacity; in allocate()
|
/frameworks/native/services/vr/bufferhubd/include/private/dvr/ |
D | buffer_hub.h | 60 size_t capacity = 0; member 78 BufferInfo(int id, size_t consumer_count, size_t capacity, in BufferInfo() 83 capacity(capacity), in BufferInfo()
|