/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/perf/ |
H A D | LongStatsCollector.java | 48 long[] buffer = new long[size]; 50 buffer[i] = mAllValues.get(i); 53 Arrays.sort(buffer); 56 median = (size % 2 == 0) ? (buffer[midPoint - 1] + buffer[midPoint]) / 2 : buffer[midPoint];
|
/frameworks/native/libs/ui/tests/ |
H A D | GraphicBuffer_test.cpp | 39 sp<GraphicBuffer> buffer( 44 EXPECT_FALSE(buffer->isDetachedBuffer()); 54 buffer->setDetachedBufferHandle(std::move(handle)); 56 EXPECT_TRUE(buffer->isDetachedBuffer()); 58 handle = buffer->takeDetachedBufferHandle(); 61 EXPECT_FALSE(buffer->isDetachedBuffer());
|
/frameworks/native/services/surfaceflinger/tests/vsync/ |
H A D | vsync.cpp | 28 DisplayEventReceiver::Event buffer[1]; local 32 while ((n = q->getEvents(buffer, 1)) > 0) { 34 if (buffer[i].header.type == DisplayEventReceiver::DISPLAY_EVENT_VSYNC) { 35 printf("event vsync: count=%d\t", buffer[i].vsync.count); 38 float t = float(buffer[i].header.timestamp - oldTimeStamp) / s2ns(1); 41 oldTimeStamp = buffer[i].header.timestamp;
|
/frameworks/base/core/java/android/util/apk/ |
H A D | ApkVerityBuilder.java | 61 * {@link ByteBufferFactory}. The bytes layout in the buffer will be used by the kernel and is 127 * extensions, Merkle tree, and the tree's root hash. The output buffer is flipped to the 163 * A helper class to consume and digest data by block continuously, and write into a buffer. 193 * then writes the final digest to the output buffer. Repeat until all data are consumed. 198 public void consume(ByteBuffer buffer) throws DigestException { argument 199 int offset = buffer.position(); 200 int remaining = buffer.remaining(); 203 // Optimization: set the buffer limit to avoid allocating a new ByteBuffer object. 204 buffer.limit(buffer 327 generateFsverityHeader(ByteBuffer buffer, long fileSize, int depth, byte[] salt) argument 358 generateFsverityExtensions(ByteBuffer buffer, long signingBlockOffset, long signingBlockSize, long eocdOffset) argument 461 slice(ByteBuffer buffer, int begin, int end) argument 470 skip(ByteBuffer buffer, int bytes) argument [all...] |
/frameworks/av/media/libstagefright/httplive/ |
H A D | LiveDataSource.cpp | 69 sp<ABuffer> buffer = *it; local 71 totalAvailable += buffer->size(); 112 sp<ABuffer> buffer = *mBufferQueue.begin(); local 116 if (copy > buffer->size()) { 117 copy = buffer->size(); 120 memcpy((uint8_t *)data + sizeDone, buffer->data(), copy); 124 buffer->setRange(buffer->offset() + copy, buffer->size() - copy); 126 if (buffer 136 queueBuffer(const sp<ABuffer> &buffer) argument [all...] |
/frameworks/base/core/java/android/hardware/usb/ |
H A D | UsbDeviceConnection.java | 165 * This method transfers data starting from index 0 in the buffer. 174 * @param buffer buffer for data portion of transaction, 182 int index, byte[] buffer, int length, int timeout) { 183 return controlTransfer(requestType, request, value, index, buffer, 0, length, timeout); 198 * @param buffer buffer for data portion of transaction, 200 * @param offset the index of the first byte in the buffer to send or receive 207 byte[] buffer, int offset, int length, int timeout) { 208 checkBounds(buffer, offse 181 controlTransfer(int requestType, int request, int value, int index, byte[] buffer, int length, int timeout) argument 206 controlTransfer(int requestType, int request, int value, int index, byte[] buffer, int offset, int length, int timeout) argument 233 bulkTransfer(UsbEndpoint endpoint, byte[] buffer, int length, int timeout) argument 253 bulkTransfer(UsbEndpoint endpoint, byte[] buffer, int offset, int length, int timeout) argument 354 checkBounds(byte[] buffer, int start, int length) argument 380 native_control_request(int requestType, int request, int value, int index, byte[] buffer, int offset, int length, int timeout) argument 382 native_bulk_request(int endpoint, byte[] buffer, int offset, int length, int timeout) argument [all...] |
H A D | UsbRequest.java | 54 /** The buffer that is currently being read / written */ 67 * Whether this buffer was {@link #queue(ByteBuffer) queued using the new behavior} or 72 /** Temporary buffer than might be used while buffer is enqueued */ 169 * <p>For OUT endpoints, the given buffer data will be sent on the endpoint. For IN endpoints, 170 * the endpoint will attempt to read the given number of bytes into the specified buffer. If the 174 * @param buffer the buffer containing the bytes to write, or location to store the results of a 188 public boolean queue(ByteBuffer buffer, int length) { argument 198 // save our buffer fo 240 queue(@ullable ByteBuffer buffer) argument 367 native_queue(ByteBuffer buffer, int offset, int length) argument 368 native_queue_array(byte[] buffer, int length, boolean out) argument 369 native_dequeue_array(byte[] buffer, int length, boolean out) argument 370 native_queue_direct(ByteBuffer buffer, int length, boolean out) argument [all...] |
/frameworks/av/media/libaudioprocessing/tests/ |
H A D | test_utils.h | 94 /* Creates a type-independent audio buffer provider from 95 * a buffer base address, size, framesize, and input increment array. 97 * No allocation or deallocation of the provided buffer is done. 121 virtual android::status_t getNextBuffer(Buffer* buffer) argument 123 size_t requestedFrames = buffer->frameCount; 125 buffer->frameCount = mNumFrames - mNextFrame; 130 mNextIdx-1, provided, buffer->frameCount); 131 if (provided < buffer->frameCount) { 132 buffer->frameCount = provided; 140 requestedFrames, mNumFrames - mNextFrame, buffer 151 releaseBuffer(Buffer* buffer) argument 197 T* buffer = reinterpret_cast<T*>(vbuffer); local 221 T *buffer = reinterpret_cast<T*>(vbuffer); local [all...] |
/frameworks/av/media/libstagefright/rtsp/ |
H A D | ARTPSource.cpp | 91 void ARTPSource::processRTPPacket(const sp<ABuffer> &buffer) { argument 92 if (queuePacket(buffer) && mAssembler != NULL) { 108 bool ARTPSource::queuePacket(const sp<ABuffer> &buffer) { argument 109 uint32_t seqNum = (uint32_t)buffer->int32Data(); 114 mQueue.push_back(buffer); 156 buffer->setInt32Data(seqNum); 164 ALOGW("Discarding duplicate buffer"); 168 mQueue.insert(it, buffer); 177 void ARTPSource::addFIR(const sp<ABuffer> &buffer) { argument 190 if (buffer 227 addReceiverReport(const sp<ABuffer> &buffer) argument [all...] |
/frameworks/av/services/audiopolicy/common/managerdefinitions/src/ |
H A D | AudioPatch.cpp | 40 char buffer[SIZE]; local 43 snprintf(buffer, SIZE, "%*sAudio patch %d:\n", spaces, "", index+1); 44 result.append(buffer); 45 snprintf(buffer, SIZE, "%*s- handle: %2d\n", spaces, "", mHandle); 46 result.append(buffer); 47 snprintf(buffer, SIZE, "%*s- audio flinger handle: %2d\n", spaces, "", mAfPatchHandle); 48 result.append(buffer); 49 snprintf(buffer, SIZE, "%*s- owner uid: %2d\n", spaces, "", mUid); 50 result.append(buffer); 51 snprintf(buffer, SIZ 167 char buffer[SIZE]; local [all...] |
H A D | EffectDescriptor.cpp | 28 char buffer[SIZE]; local 31 snprintf(buffer, SIZE, " I/O: %d\n", mIo); 32 result.append(buffer); 33 snprintf(buffer, SIZE, " Strategy: %d\n", mStrategy); 34 result.append(buffer); 35 snprintf(buffer, SIZE, " Session: %d\n", mSession); 36 result.append(buffer); 37 snprintf(buffer, SIZE, " Name: %s\n", mDesc.name); 38 result.append(buffer); 39 snprintf(buffer, SIZ 180 char buffer[SIZE]; local [all...] |
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/ |
H A D | FakeGateKeeperService.java | 42 ByteBuffer buffer = ByteBuffer.allocate(handle.length); 43 buffer.put(handle, 0, handle.length); 44 buffer.flip(); 45 int version = buffer.get(); 46 sid = buffer.getLong(); 47 password = new byte[buffer.remaining()]; 48 buffer.get(password); 52 ByteBuffer buffer = ByteBuffer.allocate(1 + Long.BYTES + password.length); 53 buffer.put((byte)0); 54 buffer [all...] |
/frameworks/native/libs/vr/libpdx/ |
H A D | serialization_tests.cpp | 1287 Payload buffer; 1292 buffer = {ENCODING_TYPE_TRUE}; 1293 error = Deserialize(&result, &buffer); 1298 buffer = {ENCODING_TYPE_FALSE}; 1299 error = Deserialize(&result, &buffer); 1305 Payload buffer; 1310 buffer = {ENCODING_TYPE_POSITIVE_FIXINT_MIN}; 1311 error = Deserialize(&result, &buffer); 1316 buffer = {ENCODING_TYPE_POSITIVE_FIXINT_MAX}; 1317 error = Deserialize(&result, &buffer); [all...] |
/frameworks/base/telecomm/java/android/telecom/ |
H A D | AudioState.java | 105 StringBuffer buffer = new StringBuffer(); 107 listAppend(buffer, "EARPIECE"); 110 listAppend(buffer, "BLUETOOTH"); 113 listAppend(buffer, "WIRED_HEADSET"); 116 listAppend(buffer, "SPEAKER"); 119 return buffer.toString(); 122 private static void listAppend(StringBuffer buffer, String str) { argument 123 if (buffer.length() > 0) { 124 buffer.append(", "); 126 buffer [all...] |
/frameworks/native/libs/vr/libpdx/private/pdx/rpc/ |
H A D | buffer_wrapper.h | 32 BufferWrapper(pointer buffer, size_type capacity, size_type size) argument 33 : buffer_(&buffer[0]), 37 BufferWrapper(pointer buffer, size_type size) argument 38 : BufferWrapper(buffer, size, size) {} 113 BufferWrapper(const BufferType& buffer) : buffer_(buffer) {} argument 114 BufferWrapper(const BufferType& buffer, const Allocator& allocator) argument 115 : buffer_(buffer, allocator) {} 116 BufferWrapper(BufferType&& buffer) : buffer_(std::move(buffer)) {} argument 117 BufferWrapper(BufferType&& buffer, const Allocator& allocator) argument 142 BufferType& buffer() { return buffer_; } function in class:android::pdx::rpc::BufferWrapper 143 const BufferType& buffer() const { return buffer_; } function in class:android::pdx::rpc::BufferWrapper 150 WrapBuffer(T* buffer, SizeType size) argument 155 WrapBuffer(void* buffer, SizeType size) argument 160 WrapBuffer(const void* buffer, SizeType size) argument 167 WrapBuffer( std::vector<T, Allocator>&& buffer) argument [all...] |
/frameworks/base/core/java/com/android/internal/util/ |
H A D | LineBreakBufferedWriter.java | 33 * A buffer to collect data until the buffer size is reached. 38 private char[] buffer; field in class:LineBreakBufferedWriter 41 * The index of the first free element in the buffer. 46 * The chunk size (=maximum buffer size) to use for this writer. 52 * Index of the last newline character discovered in the buffer. The writer will try 63 * Create a new linebreak-aware buffered writer with the given output and buffer 66 * @param bufferSize The maximum buffer size. 69 this(out, bufferSize, 16); // 16 is the default size of a StringBuilder buffer. 73 * Create a new linebreak-aware buffered writer with the given output, buffer [all...] |
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/ |
H A D | RoamingConsortiumElementTest.java | 105 * Verify that no exception will be thrown when parsing an empty buffer and the returned 117 * Verify that BufferUnderflowException will be thrown when parsing a truncated buffer 124 ByteBuffer buffer = ByteBuffer.wrap(getDefaultTestData()); 125 buffer.limit(buffer.remaining() - 1); 126 RoamingConsortiumElement.parse(buffer); 130 * Verify that an expected RoamingConsortiumElement will be returned when parsing a buffer 140 ByteBuffer buffer = ByteBuffer.wrap(getDefaultTestData()); 141 assertEquals(expectedElement, RoamingConsortiumElement.parse(buffer)); 145 * Verify that ProtocolException will be thrown when parsing a buffer containe [all...] |
H A D | I18NameTest.java | 70 * Helper function for returning a buffer containing a I18Name test data. 79 ByteBuffer buffer = ByteBuffer.allocate(data.length + 1); 80 buffer.put((byte) length); 81 buffer.put(data); 82 buffer.position(0); 83 return buffer; 87 * Verify that BufferUnderflowException will be thrown when parsing from an empty buffer. 98 * than the actual buffer size. 105 ByteBuffer buffer = getTestBuffer(data, data.length); 106 buffer [all...] |
/frameworks/base/core/java/android/util/ |
H A D | Base64OutputStream.java | 31 private byte[] buffer = null; field in class:Base64OutputStream 72 // bytes, we buffer up calls to write(int) in an internal 76 if (buffer == null) { 77 buffer = new byte[1024]; 79 if (bpos >= buffer.length) { 80 // internal buffer full; write it out. 81 internalWrite(buffer, 0, bpos, false); 84 buffer[bpos++] = (byte) b; 93 internalWrite(buffer, 0, bpos, false);
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
H A D | HwBitmapInCompositeShader.cpp | 39 sp<GraphicBuffer> buffer = new GraphicBuffer(400, 200, PIXEL_FORMAT_RGBA_8888, usage); variable 42 buffer->lock(GraphicBuffer::USAGE_SW_WRITE_RARELY, ((void**)&pixels)); 44 bytesPerPixel(buffer->getPixelFormat()) * buffer->getStride() * buffer->getHeight(); 52 buffer->unlock(); 53 sk_sp<Bitmap> hardwareBitmap(Bitmap::createFrom(buffer));
|
/frameworks/ml/nn/common/ |
H A D | CpuExecutor.cpp | 35 uint8_t* buffer = nullptr; local 46 buffer = reinterpret_cast<uint8_t*>(static_cast<void*>(memory->getPointer())); 47 if (buffer == nullptr) { 58 buffer = static_cast<uint8_t*>(mmap(nullptr, size, prot, MAP_SHARED, fd, offset)); 59 if (buffer == MAP_FAILED) { 71 mBuffer = buffer; 75 RunTimePoolInfo::RunTimePoolInfo(uint8_t* buffer) { argument 76 mBuffer = buffer; 157 // Allocate the buffer if we need to. 177 if (info->lifetime == OperandLifeTime::TEMPORARY_VARIABLE && info->buffer [all...] |
/frameworks/av/media/libstagefright/mpeg2ts/ |
H A D | AnotherPacketSource.cpp | 100 sp<ABuffer> buffer = *it; local 102 if (!buffer->meta()->findInt32("discontinuity", &discontinuity)) { 104 if (buffer->meta()->findObject("format", &object)) { 115 status_t AnotherPacketSource::dequeueAccessUnit(sp<ABuffer> *buffer) { argument 116 buffer->clear(); 124 *buffer = *mBuffers.begin(); 128 if ((*buffer)->meta()->findInt32("discontinuity", &discontinuity)) { 142 mLatestDequeuedMeta = (*buffer)->meta()->dup(); 149 if ((*buffer)->meta()->findObject("format", &object)) { 159 void AnotherPacketSource::requeueAccessUnit(const sp<ABuffer> &buffer) { argument 176 const sp<ABuffer> buffer = *mBuffers.begin(); local 273 queueAccessUnit(const sp<ABuffer> &buffer) argument 385 sp<ABuffer> buffer = new ABuffer(0); local 475 const sp<ABuffer> &buffer = *it; local 498 sp<ABuffer> buffer = *mBuffers.begin(); local 542 const sp<ABuffer> &buffer = *it; local 590 const sp<ABuffer> &buffer = *it; local 646 const sp<ABuffer> &buffer = *it; local [all...] |
/frameworks/av/media/libstagefright/ |
H A D | MPEG2TSWriter.cpp | 88 void appendAACFrames(MediaBufferBase *buffer); 89 void appendAVCFrame(MediaBufferBase *buffer); 158 // Codec specific data better be in the first data buffer. 247 notify->setBuffer("buffer", out); 252 void MPEG2TSWriter::SourceInfo::appendAVCFrame(MediaBufferBase *buffer) { argument 256 if (mBuffer == NULL || buffer->range_length() > mBuffer->capacity()) { 257 mBuffer = new ABuffer(buffer->range_length()); 262 (const uint8_t *)buffer->data() 263 + buffer->range_offset(), 264 buffer 282 appendAACFrames(MediaBufferBase *buffer) argument 371 MediaBufferBase *buffer; local 582 sp<ABuffer> buffer = source->lastAccessUnit(); local 592 sp<ABuffer> buffer; local 701 sp<ABuffer> buffer = new ABuffer(188); local 758 sp<ABuffer> buffer = new ABuffer(188); local 829 sp<ABuffer> buffer = new ABuffer(188); local [all...] |
H A D | SkipCutBuffer.cpp | 59 void SkipCutBuffer::submit(MediaBuffer *buffer) { argument 65 int32_t offset = buffer->range_offset(); 66 int32_t buflen = buffer->range_length(); 68 // drop the initial data from the buffer if needed 74 buffer->set_range(offset, buflen); 80 char *src = ((char*) buffer->data()) + offset; 86 char *dst = (char*) buffer->data(); 87 size_t copied = read(dst, buffer->size()); 88 buffer->set_range(0, copied); 92 void SkipCutBuffer::submitInternal(const sp<T>& buffer) { argument 124 submit(const sp<ABuffer>& buffer) argument 128 submit(const sp<MediaCodecBuffer>& buffer) argument [all...] |
/frameworks/base/media/packages/BluetoothMidiService/src/com/android/bluetoothmidiservice/ |
H A D | BluetoothPacketDecoder.java | 25 * This is an abstract base class that decodes a packet buffer and passes it to a 44 public void decodePacket(byte[] buffer, MidiReceiver receiver) { argument 49 int length = buffer.length; 58 byte header = buffer[0]; 73 for (int i = 1; i < buffer.length; i++) { 74 byte b = buffer[i];
|