Home
last modified time | relevance | path

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

123456

/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/csharp/src/Google.Protobuf/
DCodedInputStream.cs70 private int bufferSize; field in Google.Protobuf.CodedInputStream
170 internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize) in CodedInputStream() argument
175 this.bufferSize = bufferSize; in CodedInputStream()
188 …internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize, int sizeLimi… in CodedInputStream() argument
189 : this(input, buffer, bufferPos, bufferSize) in CodedInputStream()
232 return input.Position - ((bufferSize + bufferSizeAfterLimit) - bufferPos);
342 if (bufferPos + 2 <= bufferSize) in ReadTag()
474 if (BitConverter.IsLittleEndian && 4 <= bufferSize - bufferPos) in ReadFloat()
550 if (length <= bufferSize - bufferPos) in ReadString()
591 if (length <= bufferSize - bufferPos && length > 0) in ReadBytes()
[all …]
/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/cmds/statsd/src/shell/
DShellSubscriber.cpp119 size_t bufferSize = mProto.size(); in writeToOutputLocked() local
120 write(mOutput, &bufferSize, sizeof(bufferSize)); in writeToOutputLocked()
121 VLOG("%d atoms, proto size: %zu", count, bufferSize); in writeToOutputLocked()
162 size_t bufferSize = 0; in readConfig() local
164 if ((result = read(in, &bufferSize, sizeof(bufferSize))) == 0) { in readConfig()
167 } else if (result < 0 || result != sizeof(bufferSize)) { in readConfig()
172 vector<uint8_t> buffer(bufferSize); in readConfig()
173 if ((result = read(in, buffer.data(), bufferSize)) > 0 && ((size_t)result) == bufferSize) { in readConfig()
175 if (config.ParseFromArray(buffer.data(), bufferSize)) { in readConfig()
182 VLOG("Error reading the config, returned: %d, expecting %zu", result, bufferSize); in readConfig()
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/core/src/main/java/com/google/protobuf/
DCodedInputStream.java64 static CodedInputStream newInstance(final InputStream input, int bufferSize) { in newInstance() argument
65 return new CodedInputStream(input, bufferSize); in newInstance()
363 if (size <= (bufferSize - bufferPos) && size > 0) { in readString()
371 } else if (size <= bufferSize) { in readString()
392 if (size <= (bufferSize - oldPos) && size > 0) { in readStringRequireUtf8()
400 } else if (size <= bufferSize) { in readStringRequireUtf8()
507 if (size <= (bufferSize - bufferPos) && size > 0) { in readBytes()
526 if (size <= (bufferSize - bufferPos) && size > 0) { in readByteArray()
542 if (size <= (bufferSize - bufferPos) && size > 0) { in readByteBuffer()
606 if (bufferSize == pos) { in readRawVarint32()
[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/base/cmds/statsd/tests/shell/
DShellSubscriber_test.cpp69 size_t bufferSize = config.ByteSize(); in runShellTest() local
72 vector<uint8_t> size_buffer(sizeof(bufferSize)); in runShellTest()
73 std::memcpy(size_buffer.data(), &bufferSize, sizeof(bufferSize)); in runShellTest()
74 write(fds_config[1], &bufferSize, sizeof(bufferSize)); in runShellTest()
76 vector<uint8_t> buffer(bufferSize); in runShellTest()
77 config.SerializeToArray(&buffer[0], bufferSize); in runShellTest()
78 write(fds_config[1], buffer.data(), bufferSize); in runShellTest()
/frameworks/av/media/libstagefright/include/media/stagefright/
DDataSource.h64 virtual bool getUri(char *uriString, size_t bufferSize) final { in getUri() argument
65 int ret = snprintf(uriString, bufferSize, "%s", getUri().c_str()); in getUri()
66 return ret >= 0 && static_cast<size_t>(ret) < bufferSize; in getUri()
89 mWrapper->getUri = [](void *handle, char *uriString, size_t bufferSize) -> bool { in wrap()
90 return ((DataSource*)handle)->getUri(uriString, bufferSize); in wrap()
/frameworks/av/include/media/
DDataSource.h64 virtual bool getUri(char *uriString, size_t bufferSize) final { in getUri() argument
65 int ret = snprintf(uriString, bufferSize, "%s", getUri().c_str()); in getUri()
66 return ret >= 0 && static_cast<size_t>(ret) < bufferSize; in getUri()
89 mWrapper->getUri = [](void *handle, char *uriString, size_t bufferSize) -> bool { in wrap()
90 return ((DataSource*)handle)->getUri(uriString, bufferSize); in wrap()
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/javanano/src/main/java/com/google/protobuf/nano/
DCodedInputByteBufferNano.java190 if (size <= (bufferSize - bufferPos) && size > 0) { in readString()
232 if (size <= (bufferSize - bufferPos) && size > 0) { in readBytes()
399 private int bufferSize; field in CodedInputByteBufferNano
420 bufferSize = off + len; in CodedInputByteBufferNano()
495 bufferSize += bufferSizeAfterLimit; in recomputeBufferSizeAfterLimit()
496 final int bufferEnd = bufferSize; in recomputeBufferSizeAfterLimit()
500 bufferSize -= bufferSizeAfterLimit; in recomputeBufferSizeAfterLimit()
535 return bufferPos == bufferSize; in isAtEnd()
583 if (bufferPos == bufferSize) { in readRawByte()
607 if (size <= bufferSize - bufferPos) { in readRawBytes()
[all …]
/frameworks/native/services/surfaceflinger/CompositionEngine/src/
DOutputLayer.cpp142 const Rect& bufferSize = layerState.geomBufferSize; in calculateOutputSourceCrop() local
144 int winWidth = bufferSize.getWidth(); in calculateOutputSourceCrop()
145 int winHeight = bufferSize.getHeight(); in calculateOutputSourceCrop()
186 activeCrop.transform(invTransform, bufferSize.getWidth(), bufferSize.getHeight()); in calculateOutputSourceCrop()
214 const Rect& bufferSize = layerState.geomBufferSize; in calculateOutputDisplayFrame() local
216 if (!activeCrop.isEmpty() && bufferSize.isValid()) { in calculateOutputDisplayFrame()
228 if (!activeCrop.intersect(bufferSize, &activeCrop)) { in calculateOutputDisplayFrame()
232 activeTransparentRegion.orSelf(Rect(0, 0, bufferSize.getWidth(), activeCrop.top)); in calculateOutputDisplayFrame()
234 Rect(0, activeCrop.bottom, bufferSize.getWidth(), bufferSize.getHeight())); in calculateOutputDisplayFrame()
237 Rect(activeCrop.right, activeCrop.top, bufferSize.getWidth(), activeCrop.bottom)); in calculateOutputDisplayFrame()
/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/
DAudioSource.cpp358 const size_t bufferSize = audioBuffer.size; in dataCallback() local
363 int64_t receievedFrames = bufferSize / mRecord->frameSize(); in dataCallback()
404 uint64_t bufferSize = numLostBytes; in dataCallback() local
407 bufferSize = kMaxBufferSize; in dataCallback()
411 MediaBuffer *lostAudioBuffer = new MediaBuffer(bufferSize); in dataCallback()
412 memset(lostAudioBuffer->data(), 0, bufferSize); in dataCallback()
413 lostAudioBuffer->set_range(0, bufferSize); in dataCallback()
414 mNumFramesLost += bufferSize / mRecord->frameSize(); in dataCallback()
423 MediaBuffer *buffer = new MediaBuffer(bufferSize); in dataCallback()
426 buffer->set_range(0, bufferSize); in dataCallback()
[all …]
/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/native/libs/binder/
DBufferedTextOutput.cpp42 , bufferSize(0) in BufferState()
52 if ((len+bufferPos) > bufferSize) { in append()
58 bufferSize = newSize; in append()
68 if (bufferSize > 256) { in restart()
72 bufferSize = 256; in restart()
80 size_t bufferSize; member
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/csharp/src/Google.Protobuf.Test/
DCodedOutputStreamTest.cs72 for (int bufferSize = 1; bufferSize <= 16; bufferSize *= 2) in AssertWriteVarint()
79 new CodedOutputStream(rawOutput, bufferSize); in AssertWriteVarint()
87 CodedOutputStream output = new CodedOutputStream(rawOutput, bufferSize); in AssertWriteVarint()
143 for (int bufferSize = 1; bufferSize <= 16; bufferSize *= 2) in AssertWriteLittleEndian32()
146 output = new CodedOutputStream(rawOutput, bufferSize); in AssertWriteLittleEndian32()
/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/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/base/core/jni/android/graphics/
DCreateJavaOutputStreamAdaptor.cpp181 size_t bufferSize = 4096; in adaptor_to_mem_stream() local
184 char* data = (char*)sk_malloc_throw(bufferSize); in adaptor_to_mem_stream()
187 bufferSize - streamLen)) != 0) { in adaptor_to_mem_stream()
189 if (streamLen == bufferSize) { in adaptor_to_mem_stream()
190 bufferSize *= 2; in adaptor_to_mem_stream()
191 data = (char*)sk_realloc_throw(data, bufferSize); in adaptor_to_mem_stream()
/frameworks/base/cmds/statsd/src/metrics/
DEventMetricProducer.cpp88 size_t bufferSize = protoOutput.size(); in serializeProtoLocked() local
90 std::unique_ptr<std::vector<uint8_t>> buffer(new std::vector<uint8_t>(bufferSize)); in serializeProtoLocked()
120 size_t bufferSize = mProto->size(); in onDumpReportLocked() local
122 (long long)mMetricId, bufferSize); in onDumpReportLocked()
/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/opt/gamesdk/third_party/protobuf-3.0.0/objectivec/Tests/
DGPBCodedOuputStreamTests.m46 bufferSize:(size_t)bufferSize;
51 bufferSize:(size_t)bufferSize {
52 NSMutableData *data = [NSMutableData dataWithLength:bufferSize];
97 bufferSize:blockSize];
121 bufferSize:blockSize];
170 bufferSize:blockSize];
184 bufferSize:blockSize];
322 bufferSize:blockSize];
/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()

123456