Lines Matching refs:mBuffer

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()
298 mBuffer->editRawFixed32(sizePos+4, -1); in end()
301 mBuffer->wp()->rewind()->move(sizePos - getTagSizeFromToken(token)); in end()
308 return mBuffer->size(); in bytesWritten()
319 size_t rawBufferSize = mBuffer->size(); in compact()
323 mBuffer->ep()->rewind(); in compact()
330 mBuffer->ep()->rewind(); in compact()
331 mBuffer->wp()->rewind(); in compact()
338 mBuffer->copy(mCopyBegin, rawBufferSize - mCopyBegin); in compact()
353 size_t objectStart = mBuffer->ep()->pos(); in editEncodedSize()
359 while (mBuffer->ep()->pos() < objectEnd) { in editEncodedSize()
360 uint32_t tag = (uint32_t)mBuffer->readRawVarint(); in editEncodedSize()
366 } while ((mBuffer->readRawByte() & 0x80) != 0); in editEncodedSize()
370 mBuffer->ep()->move(8); in editEncodedSize()
373 childRawSize = (int)mBuffer->readRawFixed32(); in editEncodedSize()
374 childEncodedSizePos = mBuffer->ep()->pos(); in editEncodedSize()
375 childEncodedSize = (int)mBuffer->readRawFixed32(); in editEncodedSize()
377 mBuffer->ep()->move(childRawSize); in editEncodedSize()
380 mBuffer->editRawFixed32(childEncodedSizePos, childEncodedSize); in editEncodedSize()
390 mBuffer->ep()->move(4); in editEncodedSize()
409 size_t objectStart = mBuffer->ep()->pos(); in compactSize()
413 while (mBuffer->ep()->pos() < objectEnd) { in compactSize()
414 uint32_t tag = (uint32_t)mBuffer->readRawVarint(); in compactSize()
417 while ((mBuffer->readRawByte() & 0x80) != 0) {} in compactSize()
420 mBuffer->ep()->move(8); in compactSize()
423 mBuffer->copy(mCopyBegin, mBuffer->ep()->pos() - mCopyBegin); in compactSize()
425 childRawSize = (int)mBuffer->readRawFixed32(); in compactSize()
426 childEncodedSize = (int)mBuffer->readRawFixed32(); in compactSize()
427 mCopyBegin = mBuffer->ep()->pos(); in compactSize()
430 mBuffer->writeRawVarint32(childEncodedSize); in compactSize()
432 mBuffer->ep()->move(childEncodedSize); in compactSize()
442 mBuffer->ep()->move(4); in compactSize()
460 return mBuffer->size(); in size()
469 sp<ProtoReader> reader = mBuffer->read(); in flush()
485 sp<ProtoReader> reader = mBuffer->read(); in serializeToString()
501 sp<ProtoReader> reader = mBuffer->read(); in serializeToVector()
517 mBuffer->clear(); in data()
519 return mBuffer->read(); in data()
525 mBuffer->writeRawVarint64(varint); in writeRawVarint()
531 mBuffer->writeHeader(id, WIRE_TYPE_LENGTH_DELIMITED); in writeLengthDelimitedHeader()
533 mBuffer->writeRawFixed32(size); in writeLengthDelimitedHeader()
534 mBuffer->writeRawFixed32(size); in writeLengthDelimitedHeader()
540 mBuffer->writeRawByte(byte); in writeRawByte()
560 mBuffer->writeHeader(id, WIRE_TYPE_FIXED64); in writeDoubleImpl()
561 mBuffer->writeRawFixed64(bit_cast<double, uint64_t>(val)); in writeDoubleImpl()
567 mBuffer->writeHeader(id, WIRE_TYPE_FIXED32); in writeFloatImpl()
568 mBuffer->writeRawFixed32(bit_cast<float, uint32_t>(val)); in writeFloatImpl()
574 mBuffer->writeHeader(id, WIRE_TYPE_VARINT); in writeInt64Impl()
575 mBuffer->writeRawVarint64(val); in writeInt64Impl()
581 mBuffer->writeHeader(id, WIRE_TYPE_VARINT); in writeInt32Impl()
582 mBuffer->writeRawVarint32(val); in writeInt32Impl()
588 mBuffer->writeHeader(id, WIRE_TYPE_VARINT); in writeUint64Impl()
589 mBuffer->writeRawVarint64(val); in writeUint64Impl()
595 mBuffer->writeHeader(id, WIRE_TYPE_VARINT); in writeUint32Impl()
596 mBuffer->writeRawVarint32(val); in writeUint32Impl()
602 mBuffer->writeHeader(id, WIRE_TYPE_FIXED64); in writeFixed64Impl()
603 mBuffer->writeRawFixed64(val); in writeFixed64Impl()
609 mBuffer->writeHeader(id, WIRE_TYPE_FIXED32); in writeFixed32Impl()
610 mBuffer->writeRawFixed32(val); in writeFixed32Impl()
616 mBuffer->writeHeader(id, WIRE_TYPE_FIXED64); in writeSFixed64Impl()
617 mBuffer->writeRawFixed64(val); in writeSFixed64Impl()
623 mBuffer->writeHeader(id, WIRE_TYPE_FIXED32); in writeSFixed32Impl()
624 mBuffer->writeRawFixed32(val); in writeSFixed32Impl()
630 mBuffer->writeHeader(id, WIRE_TYPE_VARINT); in writeZigzagInt64Impl()
631 mBuffer->writeRawVarint64((val << 1) ^ (val >> 63)); in writeZigzagInt64Impl()
637 mBuffer->writeHeader(id, WIRE_TYPE_VARINT); in writeZigzagInt32Impl()
638 mBuffer->writeRawVarint32((val << 1) ^ (val >> 31)); in writeZigzagInt32Impl()
644 mBuffer->writeHeader(id, WIRE_TYPE_VARINT); in writeEnumImpl()
645 mBuffer->writeRawVarint32((uint32_t) val); in writeEnumImpl()
651 mBuffer->writeHeader(id, WIRE_TYPE_VARINT); in writeBoolImpl()
652 mBuffer->writeRawVarint32(val ? 1 : 0); in writeBoolImpl()
661 mBuffer->writeRawByte((uint8_t)val[i]); in writeUtf8StringImpl()
671 mBuffer->writeRawByte(val[i]); in writeMessageBytesImpl()