Searched refs:capacity (Results 1 - 25 of 87) sorted by relevance

1234

/frameworks/base/tests/AccessoryDisplay/common/src/com/android/accessorydisplay/common/
H A DBufferPool.java68 int capacity = buffer.capacity();
69 if (capacity < needed) {
71 capacity = chooseCapacity(capacity, needed);
72 buffer = ByteBuffer.allocate(capacity);
79 private int chooseCapacity(int capacity, int needed) { argument
80 while (capacity < needed) {
81 capacity *= 2;
83 if (capacity > mMaxBufferSiz
[all...]
H A DTransport.java120 final int capacity = mOutputBuffer.capacity();
136 final int outputAvailable = capacity - mOutputBuffer.position();
144 ioWrite(outputArray, 0, capacity);
306 count = ioRead(buffer.array(), position, buffer.capacity() - position);
/frameworks/av/media/libstagefright/foundation/
H A DABuffer.cpp26 ABuffer::ABuffer(size_t capacity) argument
31 mData = malloc(capacity);
36 mCapacity = capacity;
37 mRangeLength = capacity;
41 ABuffer::ABuffer(void *data, size_t capacity) argument
44 mCapacity(capacity),
46 mRangeLength(capacity),
52 sp<ABuffer> ABuffer::CreateAsCopy(const void *data, size_t capacity) argument
54 sp<ABuffer> res = new ABuffer(capacity);
58 memcpy(res->data(), data, capacity);
[all...]
/frameworks/base/core/java/com/android/internal/util/
H A DRingBufferIndices.java31 * Create ring buffer of the given capacity.
33 public RingBufferIndices(int capacity) { argument
34 mCapacity = capacity;
H A DLineBreakBufferedWriter.java64 * size. The initial capacity will be a default value.
74 * size and initial capacity.
77 * @param initialCapacity The initial capacity of the internal buffer.
259 * @param capacity The size to be ensured.
261 private void ensureCapacity(int capacity) { argument
263 if (newSize < capacity) {
264 newSize = capacity;
/frameworks/base/core/java/com/google/android/collect/
H A DLists.java59 int capacity = (elements.length * 110) / 100 + 5;
60 ArrayList<E> list = new ArrayList<E>(capacity);
H A DSets.java67 int capacity = elements.length * 4 / 3 + 1;
68 HashSet<E> set = new HashSet<E>(capacity);
106 int capacity = elements.length * 4 / 3 + 1;
107 ArraySet<E> set = new ArraySet<E>(capacity);
/frameworks/av/include/media/stagefright/foundation/
H A DABuffer.h33 ABuffer(size_t capacity);
34 ABuffer(void *data, size_t capacity);
38 size_t capacity() const { return mCapacity; } function in struct:android::ABuffer
45 static sp<ABuffer> CreateAsCopy(const void *data, size_t capacity);
/frameworks/base/libs/hwui/tests/unit/
H A DFatVectorTests.cpp27 // allocation array (from &v[0] to &v[0] + v.capacity) is
30 && (char*)(&v + 1) >= (char*)(&v[0] + v.capacity());
44 EXPECT_EQ(4u, v.capacity());
62 EXPECT_EQ(32u, v.capacity());
68 EXPECT_EQ(4u, v.capacity());
74 EXPECT_EQ(4u, v.capacity());
/frameworks/base/libs/hwui/utils/
H A DFatVector.h96 FatVector(size_t capacity) : FatVector() { argument
97 this->resize(capacity);
H A DRingBuffer.h34 constexpr size_t capacity() const { return SIZE; } function in class:android::uirenderer::RingBuffer
/frameworks/base/media/mca/filterfw/java/android/filterfw/core/
H A DNativeFrame.java38 int capacity = format.getSize();
39 nativeAllocate(capacity);
40 setReusable(capacity != 0);
232 private native boolean nativeAllocate(int capacity); argument
/frameworks/support/v4/java/android/support/v4/util/
H A DArrayMap.java46 * you have no control over this shrinking -- if you set a capacity and then remove an
47 * item, it may reduce the capacity to better match the current size. In the future an
48 * explicit call to set the capacity should turn off this aggressive shrinking behavior.</p>
58 * Create a new ArrayMap with a given initial capacity.
60 public ArrayMap(int capacity) { argument
61 super(capacity);
/frameworks/base/core/java/android/util/apk/
H A DZipUtils.java123 long bufOffsetInFile = fileSize - buf.capacity();
125 zip.readFully(buf.array(), buf.arrayOffset(), buf.capacity());
157 int archiveSize = zipContents.capacity();
H A DApkSignatureSchemeV2Verifier.java765 int capacity = source.capacity();
766 if (end > source.capacity()) {
767 throw new IllegalArgumentException("end > capacity: " + end + " > " + capacity);
790 * returning them as a {@code ByteBuffer} with start set to 0, limit and capacity set to
878 apk.seek(centralDirOffset - footer.capacity());
879 apk.readFully(footer.array(), footer.arrayOffset(), footer.capacity());
887 if ((apkSigBlockSizeInFooter < footer.capacity())
901 apk.readFully(apkSigBlock.array(), apkSigBlock.arrayOffset(), apkSigBlock.capacity());
[all...]
/frameworks/base/core/java/android/content/
H A DContentQueryMap.java150 int capacity = mValues != null ? mValues.size() : 0;
151 mValues = new HashMap<String, ContentValues>(capacity);
/frameworks/av/include/ndk/
H A DNdkMediaExtractor.h94 ssize_t AMediaExtractor_readSampleData(AMediaExtractor*, uint8_t *buffer, size_t capacity);
/frameworks/base/tests/AccessoryDisplay/sink/src/com/android/accessorydisplay/sink/
H A DDisplaySinkService.java203 final int capacity = buffer.capacity();
205 if (content.remaining() <= capacity) {
209 content.limit(content.position() + capacity);
/frameworks/rs/
H A DrsCppUtils.h112 void setCapacity(ssize_t capacity) { argument
113 this->resize(capacity);
138 void setCapacity(ssize_t capacity) { argument
139 this->resize(capacity);
/frameworks/av/media/libstagefright/
H A DDataConverter.cpp34 if (size > target->capacity()) {
35 ALOGE("data size (%zu) is greater than buffer capacity (%zu)",
37 target->capacity()); // this is out buffer size
/frameworks/base/libs/hwui/
H A DFrameInfoVisualizer.cpp127 mFastRects.reset(new float[mFrameSource.capacity() * 4]);
128 mJankyRects.reset(new float[mFrameSource.capacity() * 4]);
139 float baseLineWidth = right / mFrameSource.capacity();
/frameworks/base/wifi/java/android/net/wifi/nan/
H A DTlvBufferUtils.java100 * @param capacity The size of the byte array to be allocated.
104 public TlvConstructor allocate(int capacity) { argument
105 mArray = new byte[capacity];
106 mArrayLength = capacity;
/frameworks/base/media/mca/filterfw/native/core/
H A Dshader_program.cpp379 GLint capacity; local
384 glGetActiveUniform(program_, i, buffer_size, NULL, &capacity, &type, &name[0]);
708 GLint capacity; local
711 glGetActiveUniform(program_, IndexOfUniform(var), 128, NULL, &capacity, &type, name);
715 if (!CheckValueCount("Uniform (int)", name, capacity, components, count)
759 GLint capacity; local
762 glGetActiveUniform(program_, IndexOfUniform(var), 128, NULL, &capacity, &type, name);
766 if (!CheckValueCount("Uniform (float)", name, capacity, components, count)
835 GLint capacity; local
837 glGetActiveUniform(program_, IndexOfUniform(var), 0, NULL, &capacity,
[all...]
/frameworks/base/core/java/android/util/
H A DArrayMap.java43 * you have no control over this shrinking -- if you set a capacity and then remove an
44 * item, it may reduce the capacity to better match the current size. In the future an
45 * explicit call to set the capacity should turn off this aggressive shrinking behavior.</p>
52 * The minimum amount by which the capacity of a ArrayMap will increase.
236 * Create a new empty ArrayMap. The default capacity of an array map is 0, and
244 * Create a new ArrayMap with a given initial capacity.
246 public ArrayMap(int capacity) { argument
247 this(capacity, false);
251 public ArrayMap(int capacity, boolean identityHashCode) { argument
257 if (capacity <
[all...]
/frameworks/base/core/jni/
H A Dandroid_database_CursorWindow.cpp253 jsize capacity = env->GetArrayLength(dataObj); local
254 if (size_t(capacity) < size) {
260 jsize capacity = size; local
261 if (capacity < 64) {
262 capacity = 64;
264 dataObj = env->NewCharArray(capacity); // might throw OOM

Completed in 9119 milliseconds

1234