Home
last modified time | relevance | path

Searched refs:bufferSize (Results 1 – 25 of 115) sorted by relevance

12345

/frameworks/base/core/java/com/android/internal/util/
DLineBreakBufferedWriter.java48 private final int bufferSize; field in LineBreakBufferedWriter
68 public LineBreakBufferedWriter(Writer out, int bufferSize) { in LineBreakBufferedWriter() argument
69 this(out, bufferSize, 16); // 16 is the default size of a StringBuilder buffer. in LineBreakBufferedWriter()
79 public LineBreakBufferedWriter(Writer out, int bufferSize, int initialCapacity) { in LineBreakBufferedWriter() argument
81 this.buffer = new char[Math.min(initialCapacity, bufferSize)]; in LineBreakBufferedWriter()
83 this.bufferSize = bufferSize; in LineBreakBufferedWriter()
119 while (bufferIndex + len > bufferSize) { in write()
123 int maxLength = bufferSize - bufferIndex; in write()
126 if (bufferIndex + i < bufferSize) { in write()
149 int rest = bufferSize - bufferIndex; in write()
[all …]
/frameworks/base/core/java/android/ddm/
DDdmHandleThread.java146 int bufferSize = 0; in createStackChunk() local
148 bufferSize += 4; // version, flags, whatever in createStackChunk()
149 bufferSize += 4; // thread ID in createStackChunk()
150 bufferSize += 4; // frame count in createStackChunk()
152 bufferSize += 4 + elem.getClassName().length() * 2; in createStackChunk()
153 bufferSize += 4 + elem.getMethodName().length() * 2; in createStackChunk()
154 bufferSize += 4; in createStackChunk()
156 bufferSize += elem.getFileName().length() * 2; in createStackChunk()
157 bufferSize += 4; // line number in createStackChunk()
160 ByteBuffer out = ByteBuffer.allocate(bufferSize); in createStackChunk()
DDdmHandleProfiling.java105 int bufferSize = in.getInt(); in handleMPRS() local
111 + "', size=" + bufferSize + ", flags=" + flags); in handleMPRS()
114 Debug.startMethodTracing(fileName, bufferSize, flags); in handleMPRS()
147 int bufferSize = in.getInt(); in handleMPSS() local
150 Log.v("ddm-heap", "Method prof stream start: size=" + bufferSize in handleMPSS()
155 Debug.startMethodTracingDdms(bufferSize, flags, false, 0); in handleMPSS()
200 int bufferSize = in.getInt(); in handleSPSS() local
204 Log.v("ddm-heap", "Sample prof stream start: size=" + bufferSize in handleSPSS()
209 Debug.startMethodTracingDdms(bufferSize, flags, true, interval); in handleSPSS()
/frameworks/av/drm/common/
DIDrmManagerService.cpp177 const int bufferSize = reply.readInt32(); in getConstraints() local
179 if (0 < bufferSize) { in getConstraints()
180 data = new char[bufferSize]; in getConstraints()
181 reply.read(data, bufferSize); in getConstraints()
207 const int bufferSize = reply.readInt32(); in getMetadata() local
209 if (0 < bufferSize) { in getMetadata()
210 data = new char[bufferSize]; in getMetadata()
211 reply.read(data, bufferSize); in getMetadata()
273 const int bufferSize = reply.readInt32(); in processDrmInfo() local
275 if (0 < bufferSize) { in processDrmInfo()
[all …]
/frameworks/av/include/media/
DDataSource.h59 virtual bool getUri(char *uriString, size_t bufferSize) final { in getUri() argument
60 int ret = snprintf(uriString, bufferSize, "%s", getUri().c_str()); in getUri()
61 return ret >= 0 && static_cast<size_t>(ret) < bufferSize; in getUri()
84 mWrapper->getUri = [](void *handle, char *uriString, size_t bufferSize) -> bool { in wrap()
85 return ((DataSource*)handle)->getUri(uriString, bufferSize); in wrap()
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/
DStreamUtils.java50 int bufferSize = Math.min(MAX_COPY_BUFFER_SIZE, limit); in copyStream() local
51 byte[] buffer = new byte[bufferSize]; in copyStream()
55 int maxReadSize = Math.min(bufferSize, limit - copied); in copyStream()
/frameworks/av/media/libstagefright/
DAudioSource.cpp361 const size_t bufferSize = audioBuffer.size; in dataCallback() local
366 int64_t receievedFrames = bufferSize / mRecord->frameSize(); in dataCallback()
407 uint64_t bufferSize = numLostBytes; in dataCallback() local
410 bufferSize = kMaxBufferSize; in dataCallback()
414 MediaBuffer *lostAudioBuffer = new MediaBuffer(bufferSize); in dataCallback()
415 memset(lostAudioBuffer->data(), 0, bufferSize); in dataCallback()
416 lostAudioBuffer->set_range(0, bufferSize); in dataCallback()
417 mNumFramesLost += bufferSize / mRecord->frameSize(); in dataCallback()
426 MediaBuffer *buffer = new MediaBuffer(bufferSize); in dataCallback()
429 buffer->set_range(0, bufferSize); in dataCallback()
[all …]
DCallbackDataSource.cpp66 const size_t bufferSize = mMemory->size(); in readAt() local
69 size_t numToRead = std::min(numLeft, bufferSize); in readAt()
83 CHECK(numRead >= 0 && (size_t)numRead <= bufferSize); in readAt()
/frameworks/opt/photoviewer/src/com/android/ex/photo/util/
DInputStreamBuffer.java97 public InputStreamBuffer(final InputStream inputStream, int bufferSize, in InputStreamBuffer() argument
100 if (bufferSize <= 0) { in InputStreamBuffer()
102 String.format("Buffer size %d must be positive.", bufferSize)); in InputStreamBuffer()
104 bufferSize = leastPowerOf2(bufferSize); in InputStreamBuffer()
105 mBuffer = new byte[bufferSize]; in InputStreamBuffer()
/frameworks/opt/bitmap/src/com/android/bitmap/util/
DInputStreamBuffer.java97 public InputStreamBuffer(final InputStream inputStream, int bufferSize, in InputStreamBuffer() argument
100 if (bufferSize <= 0) { in InputStreamBuffer()
102 String.format("Buffer size %d must be positive.", bufferSize)); in InputStreamBuffer()
104 bufferSize = leastPowerOf2(bufferSize); in InputStreamBuffer()
105 mBuffer = new byte[bufferSize]; in InputStreamBuffer()
/frameworks/av/media/libstagefright/codecs/m4v_h263/enc/src/
Dbitstream_io.cpp52 BitstreamEncVideo *BitStreamCreateEnc(Int bufferSize) in BitStreamCreateEnc() argument
60 stream->bufferSize = bufferSize; in BitStreamCreateEnc()
61 stream->bitstreamBuffer = (UChar *) M4VENC_MALLOC(stream->bufferSize * sizeof(UChar)); in BitStreamCreateEnc()
68 M4VENC_MEMSET(stream->bitstreamBuffer, 0, stream->bufferSize*sizeof(UChar)); in BitStreamCreateEnc()
213 if (stream->byteCount + WORD_SIZE > stream->bufferSize) in BitstreamSaveWord()
267 if (stream->byteCount + numbyte > stream->bufferSize) in BitstreamSavePartial()
446 if (bitstream1->byteCount + bitstream2->byteCount + offset > bitstream1->bufferSize) in BitstreamAppendEnc()
498 if (bitstream1->byteCount + bitstream2->byteCount > bitstream1->bufferSize) in BitstreamAppendPacket()
541 if (bitstream1->byteCount + bitstream2->byteCount > bitstream1->bufferSize) in BitstreamAppendPacketNoOffset()
543 numbyte2 = bitstream1->bufferSize - bitstream1->byteCount; in BitstreamAppendPacketNoOffset()
[all …]
/frameworks/base/cmds/statsd/tests/shell/
DShellSubscriber_test.cpp51 size_t bufferSize = config.ByteSize(); in runShellTest() local
53 write(fds_config[1], &bufferSize, sizeof(bufferSize)); in runShellTest()
55 vector<uint8_t> buffer(bufferSize); in runShellTest()
56 config.SerializeToArray(&buffer[0], bufferSize); in runShellTest()
57 write(fds_config[1], buffer.data(), bufferSize); in runShellTest()
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/tasks/
DFullRestoreToFileTask.java56 FullRestoreToFileTask(FullRestoreDownloader fullRestoreDownloader, int bufferSize) { in FullRestoreToFileTask() argument
57 checkArgument(bufferSize > 0, "Buffer must have positive size"); in FullRestoreToFileTask()
60 this.mBufferSize = bufferSize; in FullRestoreToFileTask()
/frameworks/native/libs/binder/
DBufferedTextOutput.cpp42 , bufferSize(0) in BufferState()
53 if ((len+bufferPos) > bufferSize) { in append()
59 bufferSize = newSize; in append()
69 if (bufferSize > 256) { in restart()
73 bufferSize = 256; in restart()
81 size_t bufferSize; member
/frameworks/base/cmds/statsd/src/shell/
DShellSubscriber.cpp85 size_t bufferSize; in readConfig() local
86 if (!android::base::ReadFully(subscriptionInfo->mInputFd, &bufferSize, sizeof(bufferSize))) { in readConfig()
91 vector<uint8_t> buffer(bufferSize); in readConfig()
92 if (!android::base::ReadFully(subscriptionInfo->mInputFd, buffer.data(), bufferSize)) { in readConfig()
98 if (!config.ParseFromArray(buffer.data(), bufferSize)) { in readConfig()
/frameworks/base/core/tests/coretests/src/android/graphics/
DBitmapTest.java284 final int bufferSize = pad + width * height * bytesPerPixel / bytesPerElement + pad; in testCopyWithDirectByteBuffer() local
285 ByteBuffer directBuffer = ByteBuffer.allocateDirect(bufferSize); in testCopyWithDirectByteBuffer()
322 final int bufferSize = pad + width * height * bytesPerPixel / bytesPerElement + pad; in testCopyWithDirectShortBuffer() local
324 ByteBuffer.allocateDirect(bufferSize * bytesPerElement).asShortBuffer(); in testCopyWithDirectShortBuffer()
361 final int bufferSize = pad + width * height * bytesPerPixel / bytesPerElement + pad; in testCopyWithDirectIntBuffer() local
363 ByteBuffer.allocateDirect(bufferSize * bytesPerElement).asIntBuffer(); in testCopyWithDirectIntBuffer()
400 final int bufferSize = pad + width * height * bytesPerPixel / bytesPerElement + pad; in testCopyWithHeapByteBuffer() local
401 ByteBuffer heapBuffer = ByteBuffer.allocate(bufferSize); in testCopyWithHeapByteBuffer()
437 final int bufferSize = pad + width * height * bytesPerPixel / bytesPerElement + pad; in testCopyWithHeapShortBuffer() local
438 ShortBuffer heapBuffer = ShortBuffer.allocate(bufferSize); in testCopyWithHeapShortBuffer()
[all …]
/frameworks/av/media/mtp/
DMtpPacket.cpp31 MtpPacket::MtpPacket(int bufferSize) in MtpPacket() argument
33 mBufferSize(bufferSize), in MtpPacket()
34 mAllocationIncrement(bufferSize), in MtpPacket()
37 mBuffer = (uint8_t *)malloc(bufferSize); in MtpPacket()
/frameworks/base/libs/hwui/jni/
DCreateJavaOutputStreamAdaptor.cpp182 size_t bufferSize = 4096; in adaptor_to_mem_stream() local
185 char* data = (char*)sk_malloc_throw(bufferSize); in adaptor_to_mem_stream()
188 bufferSize - streamLen)) != 0) { in adaptor_to_mem_stream()
190 if (streamLen == bufferSize) { in adaptor_to_mem_stream()
191 bufferSize *= 2; in adaptor_to_mem_stream()
192 data = (char*)sk_realloc_throw(data, bufferSize); in adaptor_to_mem_stream()
/frameworks/native/services/surfaceflinger/CompositionEngine/src/
DOutputLayer.cpp116 const Rect& bufferSize = layerState.geomBufferSize; in calculateOutputSourceCrop() local
118 int winWidth = bufferSize.getWidth(); in calculateOutputSourceCrop()
119 int winHeight = bufferSize.getHeight(); in calculateOutputSourceCrop()
160 activeCrop.transform(invTransform, bufferSize.getWidth(), bufferSize.getHeight()); in calculateOutputSourceCrop()
188 const Rect& bufferSize = layerState.geomBufferSize; in calculateOutputDisplayFrame() local
190 if (!activeCrop.isEmpty() && bufferSize.isValid()) { in calculateOutputDisplayFrame()
202 if (!activeCrop.intersect(bufferSize, &activeCrop)) { in calculateOutputDisplayFrame()
206 activeTransparentRegion.orSelf(Rect(0, 0, bufferSize.getWidth(), activeCrop.top)); in calculateOutputDisplayFrame()
208 Rect(0, activeCrop.bottom, bufferSize.getWidth(), bufferSize.getHeight())); in calculateOutputDisplayFrame()
211 Rect(activeCrop.right, activeCrop.top, bufferSize.getWidth(), activeCrop.bottom)); in calculateOutputDisplayFrame()
/frameworks/av/media/libaaudio/src/fifo/
DFifoController.h33 FifoController(fifo_frames_t bufferSize, fifo_frames_t threshold) in FifoController() argument
34 : FifoControllerBase(bufferSize, threshold) in FifoController()
/frameworks/base/cmds/statsd/src/metrics/
DEventMetricProducer.cpp94 size_t bufferSize = protoOutput.size(); in serializeProtoLocked() local
96 std::unique_ptr<std::vector<uint8_t>> buffer(new std::vector<uint8_t>(bufferSize)); in serializeProtoLocked()
126 size_t bufferSize = mProto->size(); in onDumpReportLocked() local
128 (long long)mMetricId, bufferSize); in onDumpReportLocked()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/testing/
DUtils.java33 public static void transferStreamedData(InputStream in, OutputStream out, int bufferSize) in transferStreamedData() argument
35 byte[] buffer = new byte[bufferSize]; in transferStreamedData()
/frameworks/av/media/libstagefright/flac/dec/
DFLACDecoder.cpp390 size_t bufferSize = blocksize * frameSize; in decodeOneFrame() local
391 if (bufferSize > *outBufferLen) { in decodeOneFrame()
393 *outBufferLen, bufferSize); in decodeOneFrame()
395 bufferSize = blocksize * frameSize; in decodeOneFrame()
414 *outBufferLen = bufferSize; in decodeOneFrame()
/frameworks/av/media/libmediaplayerservice/nuplayer/
DNuPlayerDecoderPassThrough.cpp318 int32_t bufferSize = buffer->size(); in onInputBufferFetched() local
319 mCachedBytes += bufferSize; in onInputBufferFetched()
328 onBufferConsumed(bufferSize); in onInputBufferFetched()
336 onBufferConsumed(bufferSize); in onInputBufferFetched()
342 reply->setInt32("size", bufferSize); in onInputBufferFetched()
/frameworks/base/libs/androidfw/include/androidfw/
DCursorWindow.h171 inline void* offsetToPtr(uint32_t offset, uint32_t bufferSize = 0) {
176 if (offset + bufferSize > mSize) {
178 offset + bufferSize, mSize);

12345