Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 896) sorted by relevance

12345678910>>...36

/frameworks/compile/mclinker/unittests/
DLEB128Test.cpp42 leb128::ByteType buffer[2]; in TEST_F() local
46 result = buffer; in TEST_F()
48 ASSERT_EQ(buffer[0], 2); in TEST_F()
49 ASSERT_EQ(result, buffer + 1); in TEST_F()
52 result = buffer; in TEST_F()
54 ASSERT_EQ(buffer[0], 127); in TEST_F()
55 ASSERT_EQ(result, buffer + 1); in TEST_F()
58 result = buffer; in TEST_F()
60 ASSERT_EQ(buffer[0], 0 + 0x80); in TEST_F()
61 ASSERT_EQ(buffer[1], 1); in TEST_F()
[all …]
/frameworks/base/core/java/android/text/method/
DArrowKeyMovementMethod.java34 private static boolean isSelecting(Spannable buffer) { in isSelecting() argument
35 return ((MetaKeyKeyListener.getMetaState(buffer, MetaKeyKeyListener.META_SHIFT_ON) == 1) || in isSelecting()
36 (MetaKeyKeyListener.getMetaState(buffer, MetaKeyKeyListener.META_SELECTING) != 0)); in isSelecting()
39 private static int getCurrentLineTop(Spannable buffer, Layout layout) { in getCurrentLineTop() argument
40 return layout.getLineTop(layout.getLineForOffset(Selection.getSelectionEnd(buffer))); in getCurrentLineTop()
52 protected boolean handleMovementKey(TextView widget, Spannable buffer, int keyCode, in handleMovementKey() argument
59 && MetaKeyKeyListener.getMetaState(buffer, in handleMovementKey()
66 return super.handleMovementKey(widget, buffer, keyCode, movementMetaState, event); in handleMovementKey()
70 protected boolean left(TextView widget, Spannable buffer) { in left() argument
72 if (isSelecting(buffer)) { in left()
[all …]
DScrollingMovementMethod.java29 protected boolean left(TextView widget, Spannable buffer) { in left() argument
30 return scrollLeft(widget, buffer, 1); in left()
34 protected boolean right(TextView widget, Spannable buffer) { in right() argument
35 return scrollRight(widget, buffer, 1); in right()
39 protected boolean up(TextView widget, Spannable buffer) { in up() argument
40 return scrollUp(widget, buffer, 1); in up()
44 protected boolean down(TextView widget, Spannable buffer) { in down() argument
45 return scrollDown(widget, buffer, 1); in down()
49 protected boolean pageUp(TextView widget, Spannable buffer) { in pageUp() argument
50 return scrollPageUp(widget, buffer); in pageUp()
[all …]
DLinkMovementMethod.java44 protected boolean handleMovementKey(TextView widget, Spannable buffer, int keyCode, in handleMovementKey() argument
51 event.getRepeatCount() == 0 && action(CLICK, widget, buffer)) { in handleMovementKey()
57 return super.handleMovementKey(widget, buffer, keyCode, movementMetaState, event); in handleMovementKey()
61 protected boolean up(TextView widget, Spannable buffer) { in up() argument
62 if (action(UP, widget, buffer)) { in up()
66 return super.up(widget, buffer); in up()
70 protected boolean down(TextView widget, Spannable buffer) { in down() argument
71 if (action(DOWN, widget, buffer)) { in down()
75 return super.down(widget, buffer); in down()
79 protected boolean left(TextView widget, Spannable buffer) { in left() argument
[all …]
DBaseMovementMethod.java136 protected int getMovementMetaState(Spannable buffer, KeyEvent event) { in getMovementMetaState() argument
138 int metaState = MetaKeyKeyListener.getMetaState(buffer, event) in getMovementMetaState()
160 protected boolean handleMovementKey(TextView widget, Spannable buffer, in handleMovementKey() argument
165 return left(widget, buffer); in handleMovementKey()
168 return leftWord(widget, buffer); in handleMovementKey()
171 return lineStart(widget, buffer); in handleMovementKey()
177 return right(widget, buffer); in handleMovementKey()
180 return rightWord(widget, buffer); in handleMovementKey()
183 return lineEnd(widget, buffer); in handleMovementKey()
189 return up(widget, buffer); in handleMovementKey()
[all …]
/frameworks/base/tools/aapt2/
DBigBuffer_test.cpp24 BigBuffer buffer(4); in TEST() local
26 EXPECT_NE(nullptr, buffer.nextBlock<char>(2)); in TEST()
27 EXPECT_EQ(2u, buffer.size()); in TEST()
31 BigBuffer buffer(16); in TEST() local
33 char* b1 = buffer.nextBlock<char>(8); in TEST()
36 char* b2 = buffer.nextBlock<char>(4); in TEST()
43 BigBuffer buffer(16); in TEST() local
45 EXPECT_NE(nullptr, buffer.nextBlock<char>(32)); in TEST()
46 EXPECT_EQ(32u, buffer.size()); in TEST()
50 BigBuffer buffer(16); in TEST() local
[all …]
/frameworks/native/libs/gui/
DBufferItem.cpp93 static void writeAligned(void*& buffer, size_t& size, T value) { in writeAligned() argument
94 size -= FlattenableUtils::align<alignof(T)>(buffer); in writeAligned()
95 FlattenableUtils::write(buffer, size, value); in writeAligned()
99 void*& buffer, size_t& size, int*& fds, size_t& count) const { in flatten() argument
107 uint32_t& flags = *static_cast<uint32_t*>(buffer); in flatten()
110 FlattenableUtils::advance(buffer, size, sizeof(uint32_t)); in flatten()
114 status_t err = mGraphicBuffer->flatten(buffer, size, fds, count); in flatten()
116 size -= FlattenableUtils::align<4>(buffer); in flatten()
120 status_t err = mFence->flatten(buffer, size, fds, count); in flatten()
122 size -= FlattenableUtils::align<4>(buffer); in flatten()
[all …]
DSensor.cpp387 status_t Sensor::flatten(void* buffer, size_t size) const { in flatten() argument
392 flattenString8(buffer, size, mName); in flatten()
393 flattenString8(buffer, size, mVendor); in flatten()
394 FlattenableUtils::write(buffer, size, mVersion); in flatten()
395 FlattenableUtils::write(buffer, size, mHandle); in flatten()
396 FlattenableUtils::write(buffer, size, mType); in flatten()
397 FlattenableUtils::write(buffer, size, mMinValue); in flatten()
398 FlattenableUtils::write(buffer, size, mMaxValue); in flatten()
399 FlattenableUtils::write(buffer, size, mResolution); in flatten()
400 FlattenableUtils::write(buffer, size, mPower); in flatten()
[all …]
/frameworks/base/media/jni/
Dandroid_media_ImageReader.cpp93 void returnLockedBuffer(CpuConsumer::LockedBuffer* buffer);
96 void returnOpaqueBuffer(BufferItem* buffer);
143 CpuConsumer::LockedBuffer *buffer = new CpuConsumer::LockedBuffer; in JNIImageReaderContext() local
145 mBuffers.push_back(buffer); in JNIImageReaderContext()
181 CpuConsumer::LockedBuffer* buffer = *it; in getLockedBuffer() local
183 return buffer; in getLockedBuffer()
186 void JNIImageReaderContext::returnLockedBuffer(CpuConsumer::LockedBuffer* buffer) { in returnLockedBuffer() argument
187 mBuffers.push_back(buffer); in returnLockedBuffer()
196 BufferItem* buffer = *it; in getOpaqueBuffer() local
198 return buffer; in getOpaqueBuffer()
[all …]
Dandroid_media_ImageWriter.cpp163 sp<GraphicBuffer> buffer; in onBufferReleased() local
165 mProducer->detachNextBuffer(&buffer, &fence); in onBufferReleased()
186 sp<GraphicBuffer> buffer, int fenceFd);
188 GraphicBuffer** buffer, int* fenceFd);
355 sp<GraphicBuffer> buffer(new GraphicBuffer(anb, /*keepOwnership*/false)); in ImageWriter_dequeueImage() local
364 Image_setNativeContext(env, image, buffer, fenceFd); in ImageWriter_dequeueImage()
413 GraphicBuffer *buffer = NULL; in ImageWriter_cancelImage() local
415 Image_getNativeContext(env, image, &buffer, &fenceFd); in ImageWriter_cancelImage()
416 if (buffer == NULL) { in ImageWriter_cancelImage()
425 anw->cancelBuffer(anw.get(), buffer, fenceFd); in ImageWriter_cancelImage()
[all …]
/frameworks/base/tools/aidl/
Daidl_language_y.y47 IMPORT { g_callbacks->import(&($1.buffer)); }
48 | IMPORT imports { g_callbacks->import(&($1.buffer)); }
72 $2.buffer.lineno, $2.buffer.data);
87 b->keyword_token = $1.buffer;
88 b->name = $2.buffer;
90 b->semicolon_token = $3.buffer;
96 … g_currentFilename, $1.buffer.lineno);
101 … g_currentFilename, $2.buffer.lineno, $2.buffer.data);
108 b->keyword_token = $1.buffer;
109 b->name = $2.buffer;
[all …]
/frameworks/av/media/libstagefright/
DMediaBufferGroup.cpp33 for (MediaBuffer *buffer = mFirstBuffer; buffer != NULL; in ~MediaBufferGroup() local
34 buffer = next) { in ~MediaBufferGroup()
35 next = buffer->nextBuffer(); in ~MediaBufferGroup()
37 CHECK_EQ(buffer->refcount(), 0); in ~MediaBufferGroup()
39 buffer->setObserver(NULL); in ~MediaBufferGroup()
40 buffer->release(); in ~MediaBufferGroup()
44 void MediaBufferGroup::add_buffer(MediaBuffer *buffer) { in add_buffer() argument
47 buffer->setObserver(this); in add_buffer()
50 mLastBuffer->setNextBuffer(buffer); in add_buffer()
52 mFirstBuffer = buffer; in add_buffer()
[all …]
DXINGSeeker.cpp85 uint8_t buffer[4]; in CreateFromSource() local
87 if (source->readAt(offset, &buffer, 4) < 4) { // get header in CreateFromSource()
92 int header = U32_AT(buffer);; in CreateFromSource()
103 uint8_t version = (buffer[1] >> 3) & 3; in CreateFromSource()
116 if (source->readAt(offset, &buffer, 4) < 4) { // XING header ID in CreateFromSource()
121 if ((buffer[0] != 'X') || (buffer[1] != 'i') in CreateFromSource()
122 || (buffer[2] != 'n') || (buffer[3] != 'g')) { in CreateFromSource()
123 if ((buffer[0] != 'I') || (buffer[1] != 'n') in CreateFromSource()
124 || (buffer[2] != 'f') || (buffer[3] != 'o')) { in CreateFromSource()
129 if (source->readAt(offset, &buffer, 4) < 4) { // flags in CreateFromSource()
[all …]
DMPEG2TSWriter.cpp88 bool appendAACFrames(MediaBuffer *buffer);
91 void postAVCFrame(MediaBuffer *buffer);
253 void MPEG2TSWriter::SourceInfo::postAVCFrame(MediaBuffer *buffer) { in postAVCFrame() argument
258 new ABuffer(buffer->range_length()); in postAVCFrame()
260 (const uint8_t *)buffer->data() in postAVCFrame()
261 + buffer->range_offset(), in postAVCFrame()
262 buffer->range_length()); in postAVCFrame()
265 CHECK(buffer->meta_data()->findInt64(kKeyTime, &timeUs)); in postAVCFrame()
269 if (buffer->meta_data()->findInt32(kKeyIsSyncFrame, &isSync) in postAVCFrame()
278 bool MPEG2TSWriter::SourceInfo::appendAACFrames(MediaBuffer *buffer) { in appendAACFrames() argument
[all …]
/frameworks/av/media/libnbaio/
DSourceAudioBufferProvider.cpp48 status_t SourceAudioBufferProvider::getNextBuffer(Buffer *buffer, int64_t pts) in getNextBuffer() argument
50 ALOG_ASSERT(buffer != NULL && buffer->frameCount > 0 && mGetCount == 0); in getNextBuffer()
54 if (mRemaining < buffer->frameCount) { in getNextBuffer()
55 buffer->frameCount = mRemaining; in getNextBuffer()
57 buffer->raw = (char *) mAllocated + (mOffset * mFrameSize); in getNextBuffer()
58 mGetCount = buffer->frameCount; in getNextBuffer()
62 if (buffer->frameCount > mSize) { in getNextBuffer()
64 mAllocated = malloc(buffer->frameCount * mFrameSize); in getNextBuffer()
65 mSize = buffer->frameCount; in getNextBuffer()
68 ssize_t actual = mSource->read(mAllocated, buffer->frameCount, pts); in getNextBuffer()
[all …]
/frameworks/base/core/java/android/net/
DSntpClient.java78 byte[] buffer = new byte[NTP_PACKET_SIZE]; in requestTime()
79 DatagramPacket request = new DatagramPacket(buffer, buffer.length, address, NTP_PORT); in requestTime()
84 buffer[0] = NTP_MODE_CLIENT | (NTP_VERSION << 3); in requestTime()
89 writeTimeStamp(buffer, TRANSMIT_TIME_OFFSET, requestTime); in requestTime()
94 DatagramPacket response = new DatagramPacket(buffer, buffer.length); in requestTime()
100 long originateTime = readTimeStamp(buffer, ORIGINATE_TIME_OFFSET); in requestTime()
101 long receiveTime = readTimeStamp(buffer, RECEIVE_TIME_OFFSET); in requestTime()
102 long transmitTime = readTimeStamp(buffer, TRANSMIT_TIME_OFFSET); in requestTime()
164 private long read32(byte[] buffer, int offset) { in read32() argument
165 byte b0 = buffer[offset]; in read32()
[all …]
/frameworks/base/core/java/android/hardware/camera2/marshal/impl/
DMarshalQueryablePrimitive.java64 public T unmarshal(ByteBuffer buffer) { in unmarshal() argument
65 return mClass.cast(unmarshalObject(buffer)); in unmarshal()
74 public void marshal(T value, ByteBuffer buffer) { in marshal() argument
78 marshalPrimitive(val, buffer); in marshal()
82 marshalPrimitive(val, buffer); in marshal()
86 marshalPrimitive(val, buffer); in marshal()
89 marshalPrimitive((Rational) value, buffer); in marshal() local
93 marshalPrimitive(val, buffer); in marshal()
97 marshalPrimitive(val, buffer); in marshal()
104 private void marshalPrimitive(int value, ByteBuffer buffer) { in marshalPrimitive() argument
[all …]
/frameworks/base/libs/hwui/
DRenderBufferCache.cpp91 void RenderBufferCache::deleteBuffer(RenderBuffer* buffer) { in deleteBuffer() argument
92 if (buffer) { in deleteBuffer()
94 RenderBuffer::formatName(buffer->getFormat()), in deleteBuffer()
95 buffer->getWidth(), buffer->getHeight()); in deleteBuffer()
97 mSize -= buffer->getSize(); in deleteBuffer()
98 delete buffer; in deleteBuffer()
111 RenderBuffer* buffer = nullptr; in get() local
120 buffer = entry.mBuffer; in get()
121 mSize -= buffer->getSize(); in get()
126 buffer = new RenderBuffer(format, width, height); in get()
[all …]
/frameworks/base/tests/AccessoryDisplay/common/src/com/android/accessorydisplay/common/
DTransport.java231 protected abstract int ioRead(byte[] buffer, int offset, int count) in ioRead() argument
233 protected abstract void ioWrite(byte[] buffer, int offset, int count) in ioWrite() argument
253 final ByteBuffer buffer = (ByteBuffer)msg.obj; in handleMessage() local
255 final int limit = buffer.limit(); in handleMessage()
256 while (buffer.position() < limit) { in handleMessage()
257 final int service = buffer.getShort() & 0xffff; in handleMessage()
258 final int what = buffer.getShort() & 0xffff; in handleMessage()
259 final int contentSize = buffer.getInt(); in handleMessage()
263 final int end = buffer.position() + contentSize; in handleMessage()
264 buffer.limit(end); in handleMessage()
[all …]
/frameworks/base/core/java/android/hardware/
DSerialPort.java87 public int read(ByteBuffer buffer) throws IOException { in read() argument
88 if (buffer.isDirect()) { in read()
89 return native_read_direct(buffer, buffer.remaining()); in read()
90 } else if (buffer.hasArray()) { in read()
91 return native_read_array(buffer.array(), buffer.remaining()); in read()
105 public void write(ByteBuffer buffer, int length) throws IOException { in write() argument
106 if (buffer.isDirect()) { in write()
107 native_write_direct(buffer, length); in write()
108 } else if (buffer.hasArray()) { in write()
109 native_write_array(buffer.array(), length); in write()
[all …]
/frameworks/av/media/libstagefright/httplive/
DHTTPDownloader.cpp135 sp<ABuffer> buffer = *out != NULL ? *out : new ABuffer(size); in fetchBlock() local
137 buffer->setRange(0, 0); in fetchBlock()
142 …if (block_size > 0 && (range_length == -1 || (int64_t)(buffer->size() + block_size) < range_length… in fetchBlock()
143 range_length = buffer->size() + block_size; in fetchBlock()
147 size_t bufferRemaining = buffer->capacity() - buffer->size(); in fetchBlock()
149 size_t bufferIncrement = buffer->size() / 2; in fetchBlock()
156 buffer->size() + bufferRemaining); in fetchBlock()
158 sp<ABuffer> copy = new ABuffer(buffer->size() + bufferRemaining); in fetchBlock()
159 memcpy(copy->data(), buffer->data(), buffer->size()); in fetchBlock()
160 copy->setRange(0, buffer->size()); in fetchBlock()
[all …]
/frameworks/base/core/java/android/util/
DJsonReader.java195 private final char[] buffer = new char[1024]; field in JsonReader
682 if ((pos < limit || fillBuffer(1)) && buffer[pos] == '>') { in objectValue()
725 if (buffer[i] == '\n') { in fillBuffer()
735 System.arraycopy(buffer, pos, buffer, 0, limit); in fillBuffer()
742 while ((total = in.read(buffer, limit, buffer.length - limit)) != -1) { in fillBuffer()
747 && limit > 0 && buffer[0] == '\ufeff') { in fillBuffer()
762 if (buffer[i] == '\n') { in getLineNumber()
772 if (buffer[i] == '\n') { in getColumnNumber()
783 int c = buffer[pos++]; in nextNonWhitespace()
797 char peek = buffer[pos]; in nextNonWhitespace()
[all …]
/frameworks/av/media/libstagefright/rtsp/
DARTPWriter.cpp176 static void StripStartcode(MediaBuffer *buffer) { in StripStartcode() argument
177 if (buffer->range_length() < 4) { in StripStartcode()
182 (const uint8_t *)buffer->data() + buffer->range_offset(); in StripStartcode()
185 buffer->set_range( in StripStartcode()
186 buffer->range_offset() + 4, buffer->range_length() - 4); in StripStartcode()
198 MediaBuffer *buffer; in onMessageReceived()
199 CHECK_EQ(mSource->read(&buffer), (status_t)OK); in onMessageReceived()
201 StripStartcode(buffer); in onMessageReceived()
202 makeH264SPropParamSets(buffer); in onMessageReceived()
203 buffer->release(); in onMessageReceived()
[all …]
DAAVCAssembler.cpp69 sp<ABuffer> buffer = *queue->begin(); in addNALUnit() local
73 mNextExpectedSeqNo = (uint32_t)buffer->int32Data(); in addNALUnit()
74 } else if ((uint32_t)buffer->int32Data() != mNextExpectedSeqNo) { in addNALUnit()
80 const uint8_t *data = buffer->data(); in addNALUnit()
81 size_t size = buffer->size(); in addNALUnit()
95 addSingleNALUnit(buffer); in addNALUnit()
104 bool success = addSingleTimeAggregationPacket(buffer); in addNALUnit()
126 void AAVCAssembler::addSingleNALUnit(const sp<ABuffer> &buffer) { in addSingleNALUnit() argument
127 ALOGV("addSingleNALUnit of size %zu", buffer->size()); in addSingleNALUnit()
129 hexdump(buffer->data(), buffer->size()); in addSingleNALUnit()
[all …]
/frameworks/base/core/jni/
Dandroid_hardware_UsbRequest.cpp81 jbyteArray buffer, jint length, jboolean out) in android_hardware_UsbRequest_queue_array() argument
89 if (buffer && length) { in android_hardware_UsbRequest_queue_array()
90 request->buffer = malloc(length); in android_hardware_UsbRequest_queue_array()
91 if (!request->buffer) in android_hardware_UsbRequest_queue_array()
93 memset(request->buffer, 0, length); in android_hardware_UsbRequest_queue_array()
96 env->GetByteArrayRegion(buffer, 0, length, (jbyte *)request->buffer); in android_hardware_UsbRequest_queue_array()
99 request->buffer = NULL; in android_hardware_UsbRequest_queue_array()
107 if (request->buffer) { in android_hardware_UsbRequest_queue_array()
109 free(request->buffer); in android_hardware_UsbRequest_queue_array()
110 request->buffer = NULL; in android_hardware_UsbRequest_queue_array()
[all …]

12345678910>>...36