Home
last modified time | relevance | path

Searched refs:buffer_ (Results 1 – 25 of 61) sorted by relevance

123

/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/src/google/protobuf/io/
Dcoded_stream_unittest.cc141 static uint8 buffer_[kBufferSize]; member in google::protobuf::io::__anon49d814610111::CodedStreamTest
144 uint8 CodedStreamTest::buffer_[CodedStreamTest::kBufferSize]; member in google::protobuf::io::__anon49d814610111::CodedStreamTest
193 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D()
194 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D()
208 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D()
209 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D()
254 buffer_[0] = '\0'; in TEST_1D()
255 memcpy(buffer_ + 1, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D()
256 ArrayInputStream input(buffer_, sizeof(buffer_)); in TEST_1D()
286 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D()
[all …]
Dcoded_stream.h523 const uint8* buffer_; variable
858 uint8* buffer_; variable
907 if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_)) { in ReadVarint32()
908 v = *buffer_; in ReadVarint32()
921 if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && *buffer_ < 0x80) { in ReadVarint64()
922 *value = *buffer_; in ReadVarint64()
932 if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_)) { in ReadVarintSizeAsInt()
933 int v = *buffer_; in ReadVarintSizeAsInt()
984 memcpy(value, buffer_, sizeof(*value)); in ReadLittleEndian32()
998 memcpy(value, buffer_, sizeof(*value)); in ReadLittleEndian64()
[all …]
Dcoded_stream.cc100 buffer_end_ = buffer_; in BackUpInputToCurrentPosition()
232 buffer_ = NULL; in Skip()
233 buffer_end_ = buffer_; in Skip()
254 *data = buffer_; in GetDirectBufferPointer()
287 buffer->append(reinterpret_cast<const char*>(buffer_), in ReadStringFallback()
295 buffer->append(reinterpret_cast<const char*>(buffer_), size); in ReadStringFallback()
308 ptr = buffer_; in ReadLittleEndian32Fallback()
325 ptr = buffer_; in ReadLittleEndian64Fallback()
436 (buffer_end_ > buffer_ && !(buffer_end_[-1] & 0x80))) { in ReadVarint32Fallback()
441 ReadVarint32FromArray(first_byte_or_zero, buffer_, &temp); in ReadVarint32Fallback()
[all …]
Dzero_copy_stream_impl_lite.cc276 *data = buffer_.get() + buffer_used_ - backup_bytes_; in Next()
283 buffer_used_ = copying_stream_->Read(buffer_.get(), buffer_size_); in Next()
296 *data = buffer_.get(); in Next()
301 GOOGLE_CHECK(backup_bytes_ == 0 && buffer_.get() != NULL) in BackUp()
340 if (buffer_.get() == NULL) { in AllocateBufferIfNeeded()
341 buffer_.reset(new uint8[buffer_size_]); in AllocateBufferIfNeeded()
348 buffer_.reset(); in FreeBuffer()
383 *data = buffer_.get() + buffer_used_; in Next()
412 if (copying_stream_->Write(buffer_.get(), buffer_used_)) { in WriteBuffer()
424 if (buffer_ == NULL) { in AllocateBufferIfNeeded()
[all …]
/frameworks/native/libs/vr/libpdx/private/pdx/rpc/
Dbuffer_wrapper.h30 BufferWrapper() : buffer_(nullptr), capacity_(0), end_(0) {} in BufferWrapper()
33 : buffer_(&buffer[0]), in BufferWrapper()
48 buffer_ = other.buffer_;
60 buffer_ = other.buffer_;
63 other.buffer_ = nullptr;
71 pointer data() { return buffer_; } in data()
72 const_pointer data() const { return buffer_; } in data()
74 pointer begin() { return &buffer_[0]; } in begin()
75 pointer end() { return &buffer_[end_]; } in end()
76 const_pointer begin() const { return &buffer_[0]; } in begin()
[all …]
Dpayload.h24 : buffer_(MessageBuffer<Slot>::GetEmptyBuffer()), in MessagePayload()
25 cursor_(buffer_.begin()), in MessagePayload()
26 const_cursor_(buffer_.cbegin()) {} in MessagePayload()
37 typename BufferType::const_iterator ConstEnd() { return buffer_.cend(); } in ConstEnd()
41 buffer_.resize(size); in Resize()
42 cursor_ = buffer_.begin(); in Resize()
43 const_cursor_ = buffer_.cbegin(); in Resize()
47 void Rewind() { const_cursor_ = buffer_.cbegin(); } in Rewind()
52 const std::size_t offset = buffer_.size(); in Extend()
53 buffer_.resize(offset + size); in Extend()
[all …]
Darray_wrapper.h30 ArrayWrapper() : buffer_(nullptr), capacity_(0), end_(0) {} in ArrayWrapper()
33 : buffer_(&buffer[0]), in ArrayWrapper()
48 buffer_ = other.buffer_;
60 buffer_ = other.buffer_;
63 other.buffer_ = nullptr;
71 pointer data() { return buffer_; } in data()
72 const_pointer data() const { return buffer_; } in data()
74 pointer begin() { return &buffer_[0]; } in begin()
75 pointer end() { return &buffer_[end_]; } in end()
76 const_pointer begin() const { return &buffer_[0]; } in begin()
[all …]
Dstring_wrapper.h32 StringWrapper() : buffer_(nullptr), capacity_(0), end_(0) {} in StringWrapper()
35 : buffer_(&buffer[0]), in StringWrapper()
53 buffer_ = other.buffer_;
65 buffer_ = other.buffer_;
68 other.buffer_ = nullptr;
76 pointer data() { return buffer_; } in data()
77 const_pointer data() const { return buffer_; } in data()
79 pointer begin() { return &buffer_[0]; } in begin()
80 pointer end() { return &buffer_[end_]; } in end()
81 const_pointer begin() const { return &buffer_[0]; } in begin()
[all …]
Dthread_local_buffer.h54 buffer_->reserve(capacity); in Reserve()
61 buffer_->resize(size); in Resize()
70 return *buffer_;
79 buffer_->clear(); in GetEmptyBuffer()
80 return *buffer_; in GetEmptyBuffer()
88 return *buffer_;
94 if (buffer_) { in FreeBuffer()
95 GetBufferGuard().reset(buffer_ = nullptr); in FreeBuffer()
103 if (!buffer_) { in InitializeBuffer()
104 GetBufferGuard().reset(buffer_ = new BufferType(capacity)); in InitializeBuffer()
[all …]
/frameworks/native/libs/vr/libbufferhub/include/private/dvr/
Dion_buffer.h27 bool IsValid() const { return buffer_ && buffer_->initCheck() == OK; } in IsValid()
72 sp<GraphicBuffer>& buffer() { return buffer_; } in buffer()
73 const sp<GraphicBuffer>& buffer() const { return buffer_; } in buffer()
75 return buffer_.get() ? buffer_->handle : nullptr; in handle()
77 uint32_t width() const { return buffer_.get() ? buffer_->getWidth() : 0; } in width()
78 uint32_t height() const { return buffer_.get() ? buffer_->getHeight() : 0; } in height()
80 return buffer_.get() ? buffer_->getLayerCount() : 0; in layer_count()
82 uint32_t stride() const { return buffer_.get() ? buffer_->getStride() : 0; } in stride()
84 return buffer_.get() ? buffer_->getPixelFormat() : 0; in format()
87 return buffer_.get() ? static_cast<uint64_t>(buffer_->getUsage()) : 0; in usage()
[all …]
Dbuffer_hub_base.h61 return const_cast<native_handle_t*>(buffer_.handle()); in native_handle()
64 IonBuffer* buffer() { return &buffer_; } in buffer()
65 const IonBuffer* buffer() const { return &buffer_; } in buffer()
93 uint32_t width() const { return buffer_.width(); } in width()
94 uint32_t height() const { return buffer_.height(); } in height()
95 uint32_t stride() const { return buffer_.stride(); } in stride()
96 uint32_t format() const { return buffer_.format(); } in format()
97 uint32_t usage() const { return buffer_.usage(); } in usage()
98 uint32_t layer_count() const { return buffer_.layer_count(); } in layer_count()
162 IonBuffer buffer_; variable
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/js/binary/
Dencoder.js55 this.buffer_ = []; property in jspb.BinaryEncoder
63 return this.buffer_.length;
71 var buffer = this.buffer_;
72 this.buffer_ = []; property
94 this.buffer_.push((lowBits & 0x7f) | 0x80);
98 this.buffer_.push(lowBits);
113 this.buffer_.push((value & 0x7f) | 0x80);
117 this.buffer_.push(value);
139 this.buffer_.push((value & 0x7f) | 0x80);
145 this.buffer_.push(1);
[all …]
/frameworks/native/libs/vr/libvrflinger/
Dacquired_buffer.cpp13 : buffer_(buffer), acquire_fence_(std::move(acquire_fence)), slot_(slot) {} in AcquiredBuffer()
26 buffer_ = nullptr; in AcquiredBuffer()
29 buffer_ = buffer; in AcquiredBuffer()
45 swap(buffer_, other.buffer_); in operator =()
62 buffer_->id(), acquire_fence_.Get(), ret, ret < 0 ? errno : 0); in IsAvailable()
79 return std::move(buffer_); in ClaimBuffer()
84 buffer_ ? buffer_->id() : -1, release_fence.Get()); in Release()
85 if (buffer_) { in Release()
86 const int ret = buffer_->ReleaseAsync(); in Release()
89 buffer_->id(), strerror(-ret)); in Release()
[all …]
Dacquired_buffer.h17 AcquiredBuffer() : buffer_(nullptr), acquire_fence_(kEmptyFence) {} in AcquiredBuffer()
47 std::shared_ptr<ConsumerBuffer> buffer() const { return buffer_; } in buffer()
54 bool IsEmpty() const { return buffer_ == nullptr; } in IsEmpty()
74 std::shared_ptr<ConsumerBuffer> buffer_;
/frameworks/base/tools/aapt2/format/binary/
DChunkWriter.h30 explicit inline ChunkWriter(BigBuffer* buffer) : buffer_(buffer) { in ChunkWriter()
37 start_size_ = buffer_->size(); in StartChunk()
38 T* chunk = buffer_->NextBlock<T>(); in StartChunk()
47 return buffer_->NextBlock<T>(count);
51 return buffer_; in buffer()
59 return buffer_->size() - start_size_; in size()
63 buffer_->Align4(); in Finish()
64 header_->size = util::HostToDevice32(buffer_->size() - start_size_); in Finish()
71 BigBuffer* buffer_; variable
78 start_size_ = buffer_->size(); in StartChunk()
[all …]
DXmlFlattener.cpp78 : buffer_(buffer), options_(options) { in XmlFlattenerVisitor()
97 ChunkWriter writer(buffer_); in Visit()
116 ChunkWriter start_writer(buffer_); in Visit()
140 ChunkWriter end_writer(buffer_); in Visit()
187 ChunkWriter writer(buffer_); in WriteNamespace()
306 BigBuffer* buffer_; member in aapt::__anon0b50417c0111::XmlFlattenerVisitor
336 ChunkWriter xml_header_writer(buffer_); in Flatten()
341 StringPool::FlattenUtf16(buffer_, visitor.pool, context->GetDiagnostics()); in Flatten()
343 StringPool::FlattenUtf8(buffer_, visitor.pool, context->GetDiagnostics()); in Flatten()
348 ChunkWriter res_id_map_writer(buffer_); in Flatten()
[all …]
/frameworks/native/libs/vr/libdisplay/
Dshared_buffer_helpers.cpp20 buffer_(owned_buffer_.get()), in CPUMappedBuffer()
26 : buffer_(buffer), usage_mode_(mode) { in CPUMappedBuffer()
32 buffer_->Unlock(); in ~CPUMappedBuffer()
38 if (buffer_ == nullptr) { in TryMapping()
54 buffer_ = owned_buffer_.get(); in TryMapping()
64 if (buffer_) { in TryMapping()
65 auto usage = buffer_->usage() & ~GRALLOC_USAGE_SW_READ_MASK & in TryMapping()
84 int width = static_cast<int>(buffer_->width()); in TryMapping()
86 const auto ret = buffer_->Lock(usage, 0, 0, width, height, &address_); in TryMapping()
90 buffer_->Unlock(); in TryMapping()
/frameworks/native/libs/vr/libdvrcommon/include/private/dvr/
Dring_buffer.h46 bool IsFull() const { return size_ == buffer_.size(); } in IsFull()
50 size_t GetCapacity() const { return buffer_.size(); } in GetCapacity()
52 T& Get(size_t i) { return buffer_[(start_ + i) % buffer_.size()]; } in Get()
55 return buffer_[(start_ + i) % buffer_.size()]; in Get()
76 start_ = (start_ + 1) % buffer_.size(); in PopFront()
85 buffer_.clear(); in Reset()
86 buffer_.resize(capacity); in Reset()
92 std::vector<T> buffer_;
/frameworks/native/libs/vr/libpdx/private/pdx/
Dutility.h214 Payload(const Payload& other) : buffer_(other.buffer_) {}
216 buffer_.resize(initializer.size());
217 std::copy(initializer.begin(), initializer.end(), buffer_.begin());
221 buffer_ = other.buffer_;
226 buffer_.resize(initializer.size());
227 std::copy(initializer.begin(), initializer.end(), buffer_.begin());
234 return buffer_ == other.buffer_;
237 return buffer_ != other.buffer_;
244 return buffer_.size() == other.size() &&
245 memcmp(buffer_.data(), other.data(), other.size()) == 0;
[all …]
/frameworks/base/tools/aapt2/io/
DBigBufferStream.cpp27 if (iter_ == buffer_->end()) { in Next()
33 if (iter_ == buffer_->end()) { in Next()
61 iter_ = buffer_->begin(); in Rewind()
76 return buffer_->size(); in TotalSize()
84 *data = buffer_->NextBlock(size); in Next()
89 buffer_->BackUp(count); in BackUp()
93 return buffer_->size(); in ByteCount()
DFileStream.cpp47 buffer_.reset(new uint8_t[buffer_capacity_]); in FileInputStream()
56 buffer_.reset(new uint8_t[buffer_capacity_]); in FileInputStream()
67 *data = buffer_.get() + buffer_offset_; in Next()
74 ssize_t n = TEMP_FAILURE_RETRY(read(fd_, buffer_.get(), buffer_capacity_)); in Next()
78 buffer_.reset(); in Next()
86 *data = buffer_.get(); in Next()
119 buffer_.reset(new uint8_t[buffer_capacity_]); in FileOutputStream()
133 buffer_.reset(new uint8_t[buffer_capacity_]); in FileOutputStream()
154 *data = buffer_.get() + buffer_offset_; in Next()
181 ssize_t n = TEMP_FAILURE_RETRY(write(fd_, buffer_.get(), buffer_offset_)); in FlushImpl()
[all …]
DBigBufferStream.h29 : buffer_(buffer), iter_(buffer->begin()) { in BigBufferInputStream()
50 const BigBuffer* buffer_; variable
58 inline explicit BigBufferOutputStream(BigBuffer* buffer) : buffer_(buffer) { in BigBufferOutputStream()
73 BigBuffer* buffer_; variable
/frameworks/base/cmds/idmap2/include/idmap2/
DSysTrace.h40 ATRACE_BEGIN(buffer_.str().c_str()); in ~ScopedTraceMessageHelper()
44 return buffer_; in stream()
48 std::ostringstream buffer_;
60 return buffer_;
64 std::ostringstream buffer_;
/frameworks/compile/libbcc/bcinfo/Wrap/
Dbitcode_wrapperer.cpp73 buffer_.resize(kBitcodeWrappererBufferSize); in BitcodeWrapperer()
124 buffer_[i++] = buffer_[cursor_++]; in FillBuffer()
141 size_t needed = buffer_.size() - buffer_size_; in FillBuffer()
143 while (buffer_.size() > buffer_size_) { in FillBuffer()
144 int actually_read = infile_->Read(&buffer_[buffer_size_], needed); in FillBuffer()
211 &buffer_[cursor_]); in ParseWrapperHeader()
212 if (buffer_needed > buffer_.size()) { in ParseWrapperHeader()
213 buffer_.resize(buffer_needed + in ParseWrapperHeader()
221 field.Read(&buffer_[cursor_], buffer_size_); in ParseWrapperHeader()
323 if (!outfile_->Write(&buffer_[cursor_], block)) return false; in BufferCopyInToOut()
/frameworks/native/libs/vr/libbufferhub/
Dion_buffer.cpp34 : buffer_(nullptr) { in IonBuffer()
61 buffer_ = other.buffer_; in operator =()
68 if (buffer_.get()) { in FreeHandle()
70 buffer_ = nullptr; in FreeHandle()
86 buffer_ = buffer; in Alloc()
117 buffer_ = buffer; in Import()
207 buffer_->lock(usage, Rect(x, y, x + width, y + height), address); in Lock()
222 buffer_->lockYCbCr(usage, Rect(x, y, x + width, y + height), yuv); in LockYUV()
233 status_t err = buffer_->unlock(); in Unlock()

123