/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | WindowTraceBufferTest.java | 51 private WindowTraceBuffer mBuffer; field in WindowTraceBufferTest 59 mBuffer = new WindowTraceBuffer(10); in setUp() 71 mBuffer.setCapacity(objectSize); in test_addItem() 72 mBuffer.resetBuffer(); in test_addItem() 74 Preconditions.checkArgument(mBuffer.size() == 0); in test_addItem() 76 mBuffer.add(toWrite); in test_addItem() 78 assertEquals("Item was not added to the buffer", 1, mBuffer.size()); in test_addItem() 80 mBuffer.getBufferSize(), objectSize); in test_addItem() 82 mBuffer.getAvailableSpace()); in test_addItem() 92 mBuffer.setCapacity(bufferCapacity); in test_addItemMustOverwriteOne() [all …]
|
/frameworks/base/libs/protoutil/src/ |
D | ProtoOutputStream.cpp | 30 :mBuffer(new EncodedBuffer()), in ProtoOutputStream() 47 mBuffer->clear(); in clear() 257 size_t prevPos = mBuffer->wp()->pos(); in start() 258 mBuffer->writeHeader(id, WIRE_TYPE_LENGTH_DELIMITED); in start() 259 size_t sizePos = mBuffer->wp()->pos(); in start() 263 mBuffer->writeRawFixed64(mExpectedObjectToken); // push previous token into stack. in start() 289 int childRawSize = mBuffer->wp()->pos() - sizePos - 8; in end() 292 mBuffer->ep()->rewind()->move(sizePos); in end() 293 mExpectedObjectToken = mBuffer->readRawFixed64(); in end() 297 mBuffer->editRawFixed32(sizePos, -childRawSize); in end() [all …]
|
/frameworks/av/media/mtp/ |
D | MtpPacket.cpp | 32 : mBuffer(NULL), in MtpPacket() 37 mBuffer = (uint8_t *)malloc(bufferSize); in MtpPacket() 38 if (!mBuffer) { in MtpPacket() 45 if (mBuffer) in ~MtpPacket() 46 free(mBuffer); in ~MtpPacket() 52 memset(mBuffer, 0, mBufferSize); in reset() 58 mBuffer = (uint8_t *)realloc(mBuffer, newLength); in allocate() 59 if (!mBuffer) { in allocate() 74 mBuffer[i]); in dump() 91 memcpy(mBuffer, src.mBuffer, length); in copyFrom() [all …]
|
D | MtpDataPacket.cpp | 78 value = mBuffer[mOffset++]; in getUInt8() 86 value = (uint16_t)mBuffer[offset] | ((uint16_t)mBuffer[offset + 1] << 8); in getUInt16() 95 value = (uint32_t)mBuffer[offset] | ((uint32_t)mBuffer[offset + 1] << 8) | in getUInt32() 96 ((uint32_t)mBuffer[offset + 2] << 16) | ((uint32_t)mBuffer[offset + 3] << 24); in getUInt32() 105 value = (uint64_t)mBuffer[offset] | ((uint64_t)mBuffer[offset + 1] << 8) | in getUInt64() 106 ((uint64_t)mBuffer[offset + 2] << 16) | ((uint64_t)mBuffer[offset + 3] << 24) | in getUInt64() 107 ((uint64_t)mBuffer[offset + 4] << 32) | ((uint64_t)mBuffer[offset + 5] << 40) | in getUInt64() 108 ((uint64_t)mBuffer[offset + 6] << 48) | ((uint64_t)mBuffer[offset + 7] << 56); in getUInt64() 252 mBuffer[mOffset++] = (uint8_t)value; in putInt8() 259 mBuffer[mOffset++] = (uint8_t)value; in putUInt8() [all …]
|
/frameworks/av/media/libnbaio/ |
D | AudioBufferProviderSource.cpp | 36 if (mBuffer.raw != NULL) { in ~AudioBufferProviderSource() 37 mProvider->releaseBuffer(&mBuffer); in ~AudioBufferProviderSource() 46 return mBuffer.raw != NULL ? mBuffer.frameCount - mConsumed : 0; in availableToRead() 54 if (CC_UNLIKELY(mBuffer.raw == NULL)) { in read() 55 mBuffer.frameCount = count; in read() 56 status_t status = mProvider->getNextBuffer(&mBuffer); in read() 60 ALOG_ASSERT(mBuffer.raw != NULL); in read() 63 size_t available = mBuffer.frameCount - mConsumed; in read() 69 memcpy(buffer, (char *) mBuffer.raw + (mConsumed * mFrameSize), count * mFrameSize); in read() 70 if (CC_UNLIKELY((mConsumed += count) >= mBuffer.frameCount)) { in read() [all …]
|
/frameworks/av/media/libaudioprocessing/ |
D | AudioResamplerCubic.cpp | 67 if (mBuffer.frameCount == 0) { in resampleStereo16() 68 mBuffer.frameCount = inFrameCount; in resampleStereo16() 69 provider->getNextBuffer(&mBuffer); in resampleStereo16() 70 if (mBuffer.raw == NULL) { in resampleStereo16() 75 int16_t *in = mBuffer.i16; in resampleStereo16() 95 if (inputIndex == mBuffer.frameCount) { in resampleStereo16() 97 provider->releaseBuffer(&mBuffer); in resampleStereo16() 98 mBuffer.frameCount = inFrameCount; in resampleStereo16() 99 provider->getNextBuffer(&mBuffer); in resampleStereo16() 100 if (mBuffer.raw == NULL) { in resampleStereo16() [all …]
|
D | AudioResampler.cpp | 283 mBuffer.frameCount = 0; in AudioResampler() 314 mBuffer.frameCount = 0; in reset() 356 while (mBuffer.frameCount == 0) { in resampleStereo16() 357 mBuffer.frameCount = inFrameCount; in resampleStereo16() 358 provider->getNextBuffer(&mBuffer); in resampleStereo16() 359 if (mBuffer.raw == NULL) { in resampleStereo16() 364 if (mBuffer.frameCount > inputIndex) break; in resampleStereo16() 366 inputIndex -= mBuffer.frameCount; in resampleStereo16() 367 mX0L = mBuffer.i16[mBuffer.frameCount*2-2]; in resampleStereo16() 368 mX0R = mBuffer.i16[mBuffer.frameCount*2-1]; in resampleStereo16() [all …]
|
/frameworks/base/core/java/android/util/ |
D | StatsEvent.java | 223 private Buffer mBuffer; field in StatsEvent 229 mBuffer = buffer; in StatsEvent() 275 if (mBuffer != null) { in release() 276 mBuffer.release(); in release() 277 mBuffer = null; in release() 327 private final Buffer mBuffer; field in StatsEvent.Builder 339 mBuffer = buffer; in Builder() 382 mPos += mBuffer.putBoolean(mPos, value); in writeBoolean() 394 mPos += mBuffer.putInt(mPos, value); in writeInt() 406 mPos += mBuffer.putLong(mPos, value); in writeLong() [all …]
|
D | EventLog.java | 61 private final ByteBuffer mBuffer; field in EventLog.Event 88 mBuffer = ByteBuffer.wrap(data); in Event() 89 mBuffer.order(ByteOrder.nativeOrder()); in Event() 94 return mBuffer.getInt(PROCESS_OFFSET); in getProcessId() 104 return mBuffer.getInt(UID_OFFSET); in getUid() 113 return mBuffer.getInt(THREAD_OFFSET); in getThreadId() 118 return mBuffer.getInt(SECONDS_OFFSET) * 1000000000l in getTimeNanos() 119 + mBuffer.getInt(NANOSECONDS_OFFSET); in getTimeNanos() 124 int offset = mBuffer.getShort(HEADER_SIZE_OFFSET); in getTag() 128 return mBuffer.getInt(offset); in getTag() [all …]
|
/frameworks/av/media/libstagefright/mpeg2ts/ |
D | ESQueue.cpp | 71 if (mBuffer != NULL) { in clear() 72 mBuffer->setRange(0, 0); in clear() 450 if (!isScrambled() && (mBuffer == NULL || mBuffer->size() == 0)) { in appendData() 670 size_t neededSize = (mBuffer == NULL ? 0 : mBuffer->size()) + size; in appendData() 671 if (mBuffer == NULL || neededSize > mBuffer->capacity()) { in appendData() 677 if (mBuffer != NULL) { in appendData() 678 memcpy(buffer->data(), mBuffer->data(), mBuffer->size()); in appendData() 679 buffer->setRange(0, mBuffer->size()); in appendData() 684 mBuffer = buffer; in appendData() 687 memcpy(mBuffer->data() + mBuffer->size(), data, size); in appendData() [all …]
|
/frameworks/base/core/java/com/android/internal/util/ |
D | RingBuffer.java | 33 private final T[] mBuffer; field in RingBuffer 41 mBuffer = (T[]) Array.newInstance(c, capacity); in RingBuffer() 45 return (int) Math.min(mBuffer.length, (long) mCursor); in size() 54 mBuffer[i] = null; in clear() 60 mBuffer[indexOf(mCursor++)] = t; in append() 70 if (mBuffer[nextSlotIdx] == null) { in getNextSlot() 71 mBuffer[nextSlotIdx] = createNewItem(); in getNextSlot() 73 return mBuffer[nextSlotIdx]; in getNextSlot() 81 return (T) mBuffer.getClass().getComponentType().newInstance(); in createNewItem() 89 T[] out = Arrays.copyOf(mBuffer, size(), (Class<T[]>) mBuffer.getClass()); in toArray() [all …]
|
D | ProcFileReader.java | 36 private final byte[] mBuffer; field in ProcFileReader 49 mBuffer = new byte[bufferSize]; in ProcFileReader() 59 final int length = mBuffer.length - mTail; in fillBuf() 64 final int read = mStream.read(mBuffer, mTail, length); in fillBuf() 78 System.arraycopy(mBuffer, count, mBuffer, 0, mTail - count); in consumeBuf() 101 final byte b = mBuffer[i]; in nextTokenIndex() 136 if (mBuffer[i] == '\n') { in finishLine() 184 final String s = new String(mBuffer, 0, tokenIndex, StandardCharsets.US_ASCII); in parseAndConsumeString() 190 final boolean negative = mBuffer[0] == '-'; in parseAndConsumeLong() 195 final int digit = mBuffer[i] - '0'; in parseAndConsumeLong() [all …]
|
/frameworks/av/camera/ |
D | CameraMetadata.cpp | 35 mBuffer(NULL), mLocked(false) { in CameraMetadata() 41 mBuffer = allocate_camera_metadata(entryCapacity, dataCapacity); in CameraMetadata() 46 mBuffer = clone_camera_metadata(other.mBuffer); in CameraMetadata() 50 mBuffer(NULL), mLocked(false) { in CameraMetadata() 55 return operator=(other.mBuffer); in operator =() 64 if (CC_LIKELY(buffer != mBuffer)) { in operator =() 67 mBuffer = newBuffer; in operator =() 79 return mBuffer; in getAndLock() 87 if (buffer != mBuffer) { in unlock() 101 camera_metadata_t *released = mBuffer; in release() [all …]
|
/frameworks/native/services/sensorservice/ |
D | RingBuffer.h | 169 std::vector<T> mBuffer; variable 266 if (mBuffer.size() < mMaxBufferSize) { in add() 267 mBuffer.push_back(item); in add() 272 mBuffer[mFrontIdx] = item; in add() 278 if (mBuffer.size() != mMaxBufferSize) { in add() 279 mBuffer.push_back(std::forward<T>(item)); in add() 285 mBuffer[mFrontIdx] = std::forward<T>(item); in add() 292 if (mBuffer.size() != mMaxBufferSize) { in emplace() 293 mBuffer.emplace_back(std::forward<Args>(args)...); in emplace() 299 mBuffer[mFrontIdx] = T(std::forward<Args>(args)...); in emplace() [all …]
|
/frameworks/av/media/libmedia/include/media/ |
D | RingBuffer.h | 169 std::vector<T> mBuffer; variable 266 if (mBuffer.size() < mMaxBufferSize) { in add() 267 mBuffer.push_back(item); in add() 272 mBuffer[mFrontIdx] = item; in add() 278 if (mBuffer.size() != mMaxBufferSize) { in add() 279 mBuffer.push_back(std::forward<T>(item)); in add() 285 mBuffer[mFrontIdx] = std::forward<T>(item); in add() 292 if (mBuffer.size() != mMaxBufferSize) { in emplace() 293 mBuffer.emplace_back(std::forward<Args>(args)...); in emplace() 299 mBuffer[mFrontIdx] = T(std::forward<Args>(args)...); in emplace() [all …]
|
/frameworks/base/services/core/java/com/android/server/hdmi/ |
D | DelayedMessageBuffer.java | 29 private final ArrayList<HdmiCecMessage> mBuffer = new ArrayList<>(); field in DelayedMessageBuffer 52 mBuffer.add(message); in add() 56 mBuffer.add(message); in add() 69 for (Iterator<HdmiCecMessage> iter = mBuffer.iterator(); iter.hasNext(); ) { in removeActiveSource() 78 for (HdmiCecMessage message : mBuffer) { in isBuffered() 88 ArrayList<HdmiCecMessage> copiedBuffer = new ArrayList<>(mBuffer); in processAllMessages() 89 mBuffer.clear(); in processAllMessages() 107 ArrayList<HdmiCecMessage> copiedBuffer = new ArrayList<>(mBuffer); in processMessagesForDevice() 108 mBuffer.clear(); in processMessagesForDevice() 112 mBuffer.add(message); in processMessagesForDevice() [all …]
|
/frameworks/base/core/java/android/hardware/usb/ |
D | UsbRequest.java | 58 private ByteBuffer mBuffer; field in UsbRequest 203 mBuffer = buffer; in queue() 217 mBuffer = null; in queue() 255 mBuffer = buffer; in queue() 274 mTempBuffer = ByteBuffer.allocateDirect(mBuffer.remaining()); in queue() 278 mBuffer.mark(); in queue() 279 mTempBuffer.put(mBuffer); in queue() 281 mBuffer.reset(); in queue() 296 mBuffer = null; in queue() 311 if (mBuffer == null) { in dequeue() [all …]
|
/frameworks/opt/photoviewer/src/com/android/ex/photo/util/ |
D | InputStreamBuffer.java | 63 private byte[] mBuffer; field in InputStreamBuffer 105 mBuffer = new byte[bufferSize]; in InputStreamBuffer() 134 return mBuffer[i]; in get() 170 if (i >= mFilled || i >= mBuffer.length) { in has() 278 if (length > mBuffer.length) { in fill() 287 mBuffer.length, length)); in fill() 288 mBuffer = Arrays.copyOf(mBuffer, length); in fill() 295 read = mInputStream.read(mBuffer, mFilled, mBuffer.length - mFilled); in fill() 321 if (i >= mBuffer.length) { in shiftToBeginning() 323 String.format("Index %d out of bounds. Length %d", i, mBuffer.length)); in shiftToBeginning() [all …]
|
/frameworks/opt/bitmap/src/com/android/bitmap/util/ |
D | InputStreamBuffer.java | 63 private byte[] mBuffer; field in InputStreamBuffer 105 mBuffer = new byte[bufferSize]; in InputStreamBuffer() 134 return mBuffer[i]; in get() 170 if (i >= mFilled || i >= mBuffer.length) { in has() 278 if (length > mBuffer.length) { in fill() 287 mBuffer.length, length)); in fill() 288 mBuffer = Arrays.copyOf(mBuffer, length); in fill() 295 read = mInputStream.read(mBuffer, mFilled, mBuffer.length - mFilled); in fill() 321 if (i >= mBuffer.length) { in shiftToBeginning() 323 String.format("Index %d out of bounds. Length %d", i, mBuffer.length)); in shiftToBeginning() [all …]
|
/frameworks/base/cmds/incidentd/src/ |
D | FdBuffer.cpp | 37 :mBuffer(new EncodedBuffer(BUFFER_SIZE)), in FdBuffer() 54 if (mBuffer->size() >= MAX_BUFFER_COUNT * BUFFER_SIZE) { in read() 59 if (mBuffer->writeBuffer() == NULL) { in read() 85 ::read(fd, mBuffer->writeBuffer(), mBuffer->currentToWrite())); in read() 97 mBuffer->wp()->move(amt); in read() 109 if (mBuffer->size() >= MAX_BUFFER_COUNT * BUFFER_SIZE) { in readFully() 115 if (mBuffer->writeBuffer() == NULL) { in readFully() 121 TEMP_FAILURE_RETRY(::read(fd, mBuffer->writeBuffer(), mBuffer->currentToWrite())); in readFully() 126 VLOG("Done reading %zu bytes", mBuffer->size()); in readFully() 130 mBuffer->wp()->move(amt); in readFully() [all …]
|
/frameworks/base/core/java/android/util/proto/ |
D | ProtoOutputStream.java | 116 private EncodedBuffer mBuffer; field in ProtoOutputStream 175 mBuffer = new EncodedBuffer(chunkSize); in ProtoOutputStream() 211 return mBuffer.getSize(); in getRawSize() 905 mBuffer.writeRawFixed64(Double.doubleToLongBits(val)); in writeDoubleImpl() 925 mBuffer.writeRawFixed64(Double.doubleToLongBits(val)); in writeRepeatedDoubleImpl() 943 mBuffer.writeRawFixed64(Double.doubleToLongBits(val[i])); in writePackedDouble() 972 mBuffer.writeRawFixed32(Float.floatToIntBits(val)); in writeFloatImpl() 992 mBuffer.writeRawFixed32(Float.floatToIntBits(val)); in writeRepeatedFloatImpl() 1010 mBuffer.writeRawFixed32(Float.floatToIntBits(val[i])); in writePackedFloat() 1035 mBuffer.writeRawVarint32(val); in writeUnsignedVarintFromSignedInt() [all …]
|
D | ProtoInputStream.java | 112 private byte[] mBuffer; field in ProtoInputStream 157 mBuffer = new byte[mBufferSize]; in ProtoInputStream() 177 mBuffer = buffer; in ProtoInputStream() 603 byte b = mBuffer[(mOffset + i)]; in readVarint() 632 return (mBuffer[mOffset - 4] & 0xFF) in readFixed32() 633 | ((mBuffer[mOffset - 3] & 0xFF) << 8) in readFixed32() 634 | ((mBuffer[mOffset - 2] & 0xFF) << 16) in readFixed32() 635 | ((mBuffer[mOffset - 1] & 0xFF) << 24); in readFixed32() 650 value |= ((mBuffer[mOffset - fragment] & 0xFF) << shift); in readFixed32() 668 return (mBuffer[mOffset - 8] & 0xFFL) in readFixed64() [all …]
|
/frameworks/base/core/java/com/android/internal/os/ |
D | KernelCpuUidTimeReader.java | 201 private final long[] mBuffer = new long[4]; field in KernelCpuUidTimeReader.KernelCpuUidUserSysTimeReader 222 if (asLongs(buf, mBuffer) < 3) { in readDeltaImpl() 226 final int uid = (int) mBuffer[0]; in readDeltaImpl() 232 final long currUsrTimeUs = mBuffer[1]; in readDeltaImpl() 233 final long currSysTimeUs = mBuffer[2]; in readDeltaImpl() 260 if (asLongs(buf, mBuffer) < 3) { in readAbsoluteImpl() 264 mUsrSysTime[0] = mBuffer[1]; // User time in microseconds in readAbsoluteImpl() 265 mUsrSysTime[1] = mBuffer[2]; // System time in microseconds in readAbsoluteImpl() 266 cb.onUidCpuTime((int) mBuffer[0], mUsrSysTime); in readAbsoluteImpl() 327 private long[] mBuffer; field in KernelCpuUidTimeReader.KernelCpuUidFreqTimeReader [all …]
|
/frameworks/base/media/mca/filterfw/java/android/filterfw/core/ |
D | SerializedFrame.java | 58 private byte[] mBuffer = null; field in SerializedFrame.DirectByteOutputStream 63 mBuffer = new byte[size]; in DirectByteOutputStream() 67 if (mOffset + bytesToWrite > mBuffer.length) { in ensureFit() 68 byte[] oldBuffer = mBuffer; in ensureFit() 69 mBuffer = new byte[Math.max(mOffset + bytesToWrite, mBuffer.length * 2)]; in ensureFit() 70 System.arraycopy(oldBuffer, 0, mBuffer, 0, mOffset); in ensureFit() 84 return mBuffer; in getByteArray() 95 System.arraycopy(b, off, mBuffer, mOffset, len); in write() 102 mBuffer[mOffset++] = (byte)b; in write() 110 return new DirectByteInputStream(mBuffer, mOffset); in getInputStream() [all …]
|
/frameworks/av/media/extractors/mpeg2/ |
D | MPEG2PSExtractor.cpp | 100 mBuffer(new ABuffer(0)), in MPEG2PSExtractor() 174 memmove(mBuffer->base(), mBuffer->data(), mBuffer->size()); in feedMore() 175 mBuffer->setRange(0, mBuffer->size()); in feedMore() 177 if (mBuffer->size() + kChunkSize > mBuffer->capacity()) { in feedMore() 178 size_t newCapacity = mBuffer->capacity() + kChunkSize; in feedMore() 180 memcpy(newBuffer->data(), mBuffer->data(), mBuffer->size()); in feedMore() 181 newBuffer->setRange(0, mBuffer->size()); in feedMore() 182 mBuffer = newBuffer; in feedMore() 186 mOffset, mBuffer->data() + mBuffer->size(), kChunkSize); in feedMore() 193 mBuffer->setRange(mBuffer->offset(), mBuffer->size() + n); in feedMore() [all …]
|