Home
last modified time | relevance | path

Searched refs:capacity (Results 1 – 25 of 73) sorted by relevance

123

/frameworks/base/tests/AccessoryDisplay/common/src/com/android/accessorydisplay/common/
DBufferPool.java68 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()
DTransport.java120 final int capacity = mOutputBuffer.capacity(); in sendMessage() local
136 final int outputAvailable = capacity - mOutputBuffer.position(); in sendMessage()
144 ioWrite(outputArray, 0, capacity); in sendMessage()
306 count = ioRead(buffer.array(), position, buffer.capacity() - position); in loop()
/frameworks/av/media/libstagefright/foundation/
DABuffer.cpp26 ABuffer::ABuffer(size_t capacity) in ABuffer() argument
28 mData(malloc(capacity)), in ABuffer()
29 mCapacity(capacity), in ABuffer()
31 mRangeLength(capacity), in ABuffer()
36 ABuffer::ABuffer(void *data, size_t capacity) in ABuffer() argument
39 mCapacity(capacity), in ABuffer()
41 mRangeLength(capacity), in ABuffer()
47 sp<ABuffer> ABuffer::CreateAsCopy(const void *data, size_t capacity) in CreateAsCopy() argument
49 sp<ABuffer> res = new ABuffer(capacity); in CreateAsCopy()
50 memcpy(res->data(), data, capacity); in CreateAsCopy()
/frameworks/av/include/media/stagefright/foundation/
DABuffer.h33 ABuffer(size_t capacity);
34 ABuffer(void *data, size_t capacity);
40 size_t capacity() const { return mCapacity; } in capacity() function
47 static sp<ABuffer> CreateAsCopy(const void *data, size_t capacity);
/frameworks/base/core/java/com/google/android/collect/
DSets.java67 int capacity = elements.length * 4 / 3 + 1; in newHashSet() local
68 HashSet<E> set = new HashSet<E>(capacity); in newHashSet()
106 int capacity = elements.length * 4 / 3 + 1; in newArraySet() local
107 ArraySet<E> set = new ArraySet<E>(capacity); in newArraySet()
DLists.java59 int capacity = (elements.length * 110) / 100 + 5; in newArrayList() local
60 ArrayList<E> list = new ArrayList<E>(capacity); in newArrayList()
/frameworks/base/media/mca/filterfw/java/android/filterfw/core/
DNativeFrame.java38 int capacity = format.getSize(); in NativeFrame() local
39 nativeAllocate(capacity); in NativeFrame()
40 setReusable(capacity != 0); in NativeFrame()
232 private native boolean nativeAllocate(int capacity); in nativeAllocate() argument
/frameworks/base/tests/AccessoryDisplay/sink/src/com/android/accessorydisplay/sink/
DDisplaySinkService.java203 final int capacity = buffer.capacity(); in provideCodecInputLocked() local
205 if (content.remaining() <= capacity) { in provideCodecInputLocked()
209 content.limit(content.position() + capacity); in provideCodecInputLocked()
/frameworks/rs/
DrsCppUtils.h106 void setCapacity(ssize_t capacity) { in setCapacity() argument
107 this->resize(capacity); in setCapacity()
132 void setCapacity(ssize_t capacity) { in setCapacity() argument
133 this->resize(capacity); in setCapacity()
/frameworks/support/v4/java/android/support/v4/util/
DArrayMap.java60 public ArrayMap(int capacity) { in ArrayMap() argument
61 super(capacity); in ArrayMap()
DSimpleArrayMap.java217 public SimpleArrayMap(int capacity) { in SimpleArrayMap() argument
218 if (capacity == 0) { in SimpleArrayMap()
222 allocArrays(capacity); in SimpleArrayMap()
/frameworks/base/core/java/android/content/
DContentQueryMap.java150 int capacity = mValues != null ? mValues.size() : 0; in readCursorIntoCache() local
151 mValues = new HashMap<String, ContentValues>(capacity); in readCursorIntoCache()
/frameworks/base/core/java/android/net/
DNetworkStats.java68 private int capacity; field in NetworkStats
161 this.capacity = initialSize; in NetworkStats()
173 this.capacity = 0; in NetworkStats()
189 capacity = parcel.readInt(); in NetworkStats()
205 dest.writeInt(capacity); in writeToParcel()
247 if (size >= capacity) { in addValues()
258 capacity = newLength; in addValues()
314 return capacity; in internalSize()
578 if (recycle != null && recycle.capacity >= left.size) { in subtract()
/frameworks/base/media/mca/filterfw/native/core/
Dshader_program.cpp386 GLint capacity; in ScanUniforms() local
391 glGetActiveUniform(program_, i, buffer_size, NULL, &capacity, &type, &name[0]); in ScanUniforms()
715 GLint capacity; in SetUniformValue() local
718 glGetActiveUniform(program_, IndexOfUniform(var), 128, NULL, &capacity, &type, name); in SetUniformValue()
722 if (!CheckValueCount("Uniform (int)", name, capacity, components, count) in SetUniformValue()
766 GLint capacity; in SetUniformValue() local
769 glGetActiveUniform(program_, IndexOfUniform(var), 128, NULL, &capacity, &type, name); in SetUniformValue()
773 if (!CheckValueCount("Uniform (float)", name, capacity, components, count) in SetUniformValue()
842 GLint capacity; in GetUniformValue() local
844 glGetActiveUniform(program_, IndexOfUniform(var), 0, NULL, &capacity, &type, NULL); in GetUniformValue()
/frameworks/base/core/jni/
Dandroid_database_CursorWindow.cpp251 jsize capacity = env->GetArrayLength(dataObj); in allocCharArrayBuffer() local
252 if (size_t(capacity) < size) { in allocCharArrayBuffer()
258 jsize capacity = size; in allocCharArrayBuffer() local
259 if (capacity < 64) { in allocCharArrayBuffer()
260 capacity = 64; in allocCharArrayBuffer()
262 dataObj = env->NewCharArray(capacity); // might throw OOM in allocCharArrayBuffer()
Dcom_android_internal_net_NetworkStatsFactory.cpp40 jfieldID capacity; member
226 bool grow = size > env->GetIntField(stats, gNetworkStatsClassInfo.capacity); in readNetworkStatsDetail()
271 env->SetIntField(stats, gNetworkStatsClassInfo.capacity, size); in readNetworkStatsDetail()
311 gNetworkStatsClassInfo.capacity = env->GetFieldID(clazz, "capacity", "I"); in register_com_android_internal_net_NetworkStatsFactory()
Dandroid_media_AudioRecord.cpp457 long capacity = env->GetDirectBufferCapacity(jBuffer); in android_media_AudioRecord_readInDirectBuffer() local
458 if (capacity == -1) { in android_media_AudioRecord_readInDirectBuffer()
472 capacity < sizeInBytes ? capacity : sizeInBytes); in android_media_AudioRecord_readInDirectBuffer()
/frameworks/base/core/java/android/hardware/camera2/
DDngCreator.java455 long capacity = pixels.capacity(); in writeByteBuffer() local
457 if (capacity < totalSize) { in writeByteBuffer()
458 throw new IllegalArgumentException("Image size " + capacity + in writeByteBuffer()
/frameworks/av/media/libstagefright/rtsp/
DARTPWriter.cpp583 if (mediaBuf->range_length() + 12 <= buffer->capacity()) { in sendAVCData()
619 if (size + 12 + 2 > buffer->capacity()) { in sendAVCData()
621 size = buffer->capacity() - 12 - 2; in sendAVCData()
690 bool lastPacket = (remaining + 14 <= buffer->capacity()); in sendH263Data()
692 remaining = buffer->capacity() - 14; in sendH263Data()
774 CHECK_LE(mediaLength + 12 + 1, buffer->capacity()); in sendAMRData()
DARTPSource.cpp179 if (buffer->size() + 20 > buffer->capacity()) { in addFIR()
217 if (buffer->size() + 32 > buffer->capacity()) { in addReceiverReport()
/frameworks/base/core/java/android/os/
DPersistableBundle.java60 public PersistableBundle(int capacity) { in PersistableBundle() argument
61 super(capacity); in PersistableBundle()
DBaseBundle.java66 BaseBundle(ClassLoader loader, int capacity) { in BaseBundle() argument
67 mMap = capacity > 0 ? in BaseBundle()
68 new ArrayMap<String, Object>(capacity) : new ArrayMap<String, Object>(); in BaseBundle()
110 BaseBundle(int capacity) { in BaseBundle() argument
111 this((ClassLoader) null, capacity); in BaseBundle() local
/frameworks/av/include/ndk/
DNdkMediaExtractor.h92 ssize_t AMediaExtractor_readSampleData(AMediaExtractor*, uint8_t *buffer, size_t capacity);
/frameworks/native/opengl/tests/testViewport/src/com/android/test/
DTestView.java197 …gl11.glBufferData(GL11.GL_ARRAY_BUFFER, mVertexByteBuffer.capacity(), mVertexByteBuffer, GL11.GL_S… in createBufferObjects()
201 …gl11.glBufferData(GL11.GL_ELEMENT_ARRAY_BUFFER, mIndexBuffer.capacity() * CHAR_SIZE, mIndexBuffer,… in createBufferObjects()
/frameworks/av/media/libstagefright/wifi-display/rtp/
DRTPSender.cpp335 if (outBytesUsed + bytesNeeded > out->capacity()) { in queueAVCBuffer()
339 && outBytesUsed + nalSize <= out->capacity()) { in queueAVCBuffer()
362 if (outBytesUsed + bytesNeeded <= out->capacity()) { in queueAVCBuffer()
387 size_t copy = out->capacity() - outBytesUsed - 2; in queueAVCBuffer()

123