/frameworks/compile/mclinker/unittests/ |
D | LEB128Test.cpp | 42 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/ |
D | ArrowKeyMovementMethod.java | 33 private static boolean isSelecting(Spannable buffer) { in isSelecting() argument 34 return ((MetaKeyKeyListener.getMetaState(buffer, MetaKeyKeyListener.META_SHIFT_ON) == 1) || in isSelecting() 35 (MetaKeyKeyListener.getMetaState(buffer, MetaKeyKeyListener.META_SELECTING) != 0)); in isSelecting() 38 private static int getCurrentLineTop(Spannable buffer, Layout layout) { in getCurrentLineTop() argument 39 return layout.getLineTop(layout.getLineForOffset(Selection.getSelectionEnd(buffer))); in getCurrentLineTop() 51 protected boolean handleMovementKey(TextView widget, Spannable buffer, int keyCode, in handleMovementKey() argument 58 && MetaKeyKeyListener.getMetaState(buffer, in handleMovementKey() 65 return super.handleMovementKey(widget, buffer, keyCode, movementMetaState, event); in handleMovementKey() 69 protected boolean left(TextView widget, Spannable buffer) { in left() argument 71 if (isSelecting(buffer)) { in left() [all …]
|
D | ScrollingMovementMethod.java | 30 protected boolean left(TextView widget, Spannable buffer) { in left() argument 31 return scrollLeft(widget, buffer, 1); in left() 35 protected boolean right(TextView widget, Spannable buffer) { in right() argument 36 return scrollRight(widget, buffer, 1); in right() 40 protected boolean up(TextView widget, Spannable buffer) { in up() argument 41 return scrollUp(widget, buffer, 1); in up() 45 protected boolean down(TextView widget, Spannable buffer) { in down() argument 46 return scrollDown(widget, buffer, 1); in down() 50 protected boolean pageUp(TextView widget, Spannable buffer) { in pageUp() argument 51 return scrollPageUp(widget, buffer); in pageUp() [all …]
|
D | LinkMovementMethod.java | 44 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 …]
|
/frameworks/base/tools/aapt2/util/ |
D | BigBuffer_test.cpp | 24 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/ |
D | BufferItem.cpp | 117 static void writeAligned(void*& buffer, size_t& size, T value) { in writeAligned() argument 118 size -= FlattenableUtils::align<alignof(T)>(buffer); in writeAligned() 119 FlattenableUtils::write(buffer, size, value); in writeAligned() 123 void*& buffer, size_t& size, int*& fds, size_t& count) const { in flatten() argument 131 uint32_t& flags = *static_cast<uint32_t*>(buffer); in flatten() 134 FlattenableUtils::advance(buffer, size, sizeof(uint32_t)); in flatten() 138 status_t err = mGraphicBuffer->flatten(buffer, size, fds, count); in flatten() 140 size -= FlattenableUtils::align<4>(buffer); in flatten() 144 status_t err = mFence->flatten(buffer, size, fds, count); in flatten() 146 size -= FlattenableUtils::align<4>(buffer); in flatten() [all …]
|
/frameworks/native/libs/vr/libpdx/ |
D | serialization_tests.cpp | 1287 Payload buffer; in TEST() local 1292 buffer = {ENCODING_TYPE_TRUE}; in TEST() 1293 error = Deserialize(&result, &buffer); in TEST() 1298 buffer = {ENCODING_TYPE_FALSE}; in TEST() 1299 error = Deserialize(&result, &buffer); in TEST() 1305 Payload buffer; in TEST() local 1310 buffer = {ENCODING_TYPE_POSITIVE_FIXINT_MIN}; in TEST() 1311 error = Deserialize(&result, &buffer); in TEST() 1316 buffer = {ENCODING_TYPE_POSITIVE_FIXINT_MAX}; in TEST() 1317 error = Deserialize(&result, &buffer); in TEST() [all …]
|
/frameworks/av/media/libstagefright/foundation/ |
D | MediaBufferGroup.cpp | 64 MediaBuffer *buffer = new MediaBuffer(mem); in MediaBufferGroup() local 65 buffer->getSharedControl()->clear(); in MediaBufferGroup() 66 add_buffer(buffer); in MediaBufferGroup() 73 MediaBuffer *buffer = new MediaBuffer(buffer_size); in MediaBufferGroup() local 74 if (buffer->data() == nullptr) { in MediaBufferGroup() 75 delete buffer; // don't call release, it's not properly formed in MediaBufferGroup() 79 add_buffer(buffer); in MediaBufferGroup() 84 for (MediaBuffer *buffer : mBuffers) { in ~MediaBufferGroup() 85 if (buffer->refcount() != 0) { in ~MediaBufferGroup() 86 const int localRefcount = buffer->localRefcount(); in ~MediaBufferGroup() [all …]
|
/frameworks/av/media/libstagefright/ |
D | XINGSeeker.cpp | 85 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 …]
|
D | MPEG2TSWriter.cpp | 88 void appendAACFrames(MediaBuffer *buffer); 89 void appendAVCFrame(MediaBuffer *buffer); 252 void MPEG2TSWriter::SourceInfo::appendAVCFrame(MediaBuffer *buffer) { in appendAVCFrame() argument 256 if (mBuffer == NULL || buffer->range_length() > mBuffer->capacity()) { in appendAVCFrame() 257 mBuffer = new ABuffer(buffer->range_length()); in appendAVCFrame() 262 (const uint8_t *)buffer->data() in appendAVCFrame() 263 + buffer->range_offset(), in appendAVCFrame() 264 buffer->range_length()); in appendAVCFrame() 267 CHECK(buffer->meta_data()->findInt64(kKeyTime, &timeUs)); in appendAVCFrame() 271 if (buffer->meta_data()->findInt32(kKeyIsSyncFrame, &isSync) in appendAVCFrame() [all …]
|
/frameworks/base/media/jni/ |
D | android_media_Utils.cpp | 359 sp<ABuffer> buffer; in ConvertMessageToMap() local 360 CHECK(msg->findBuffer(key, &buffer)); in ConvertMessageToMap() 363 env, buffer->data(), buffer->size()); in ConvertMessageToMap() 525 sp<ABuffer> buffer = new ABuffer(limit - position); in ConvertKeyValueArraysToMessage() local 530 memcpy(buffer->data(), in ConvertKeyValueArraysToMessage() 532 buffer->size()); in ConvertKeyValueArraysToMessage() 545 buffer->size(), in ConvertKeyValueArraysToMessage() 546 (jbyte *)buffer->data()); in ConvertKeyValueArraysToMessage() 551 msg->setBuffer(key.c_str(), buffer); in ConvertKeyValueArraysToMessage() 611 uint32_t Image_getJpegSize(LockedImage* buffer, bool usingRGBAOverride) { in Image_getJpegSize() argument [all …]
|
/frameworks/av/media/libnbaio/ |
D | SourceAudioBufferProvider.cpp | 48 status_t SourceAudioBufferProvider::getNextBuffer(Buffer *buffer) 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() 67 mAllocated = calloc(buffer->frameCount, mFrameSize); in getNextBuffer() 72 mSize = buffer->frameCount; in getNextBuffer() 76 ssize_t actual = mSource->read(mAllocated, buffer->frameCount); in getNextBuffer() [all …]
|
/frameworks/base/libs/hwui/ |
D | RenderBufferCache.cpp | 79 void RenderBufferCache::deleteBuffer(RenderBuffer* buffer) { in deleteBuffer() argument 80 if (buffer) { in deleteBuffer() 82 RenderBuffer::formatName(buffer->getFormat()), in deleteBuffer() 83 buffer->getWidth(), buffer->getHeight()); in deleteBuffer() 85 mSize -= buffer->getSize(); in deleteBuffer() 86 delete buffer; in deleteBuffer() 98 RenderBuffer* buffer = nullptr; in get() local 107 buffer = entry.mBuffer; in get() 108 mSize -= buffer->getSize(); in get() 113 buffer = new RenderBuffer(format, width, height); in get() [all …]
|
/frameworks/base/core/java/android/hardware/camera2/marshal/impl/ |
D | MarshalQueryablePrimitive.java | 64 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/av/services/audiopolicy/common/managerdefinitions/src/ |
D | VolumeCurve.cpp | 67 char buffer[SIZE]; in dump() local 69 snprintf(buffer, SIZE, " {"); in dump() 70 result.append(buffer); in dump() 72 snprintf(buffer, SIZE, "(%3d, %5d)", in dump() 74 result.append(buffer); in dump() 83 char buffer[SIZE]; in dump() local 87 snprintf(buffer, SIZE, "%s %02d %02d ", in dump() 89 result.append(buffer); in dump() 91 snprintf(buffer, SIZE, "%04x : %02d, ", mIndexCur.keyAt(i), mIndexCur.valueAt(i)); in dump() 92 result.append(buffer); in dump() [all …]
|
/frameworks/base/core/java/android/net/ |
D | SntpClient.java | 103 byte[] buffer = new byte[NTP_PACKET_SIZE]; in requestTime() 104 DatagramPacket request = new DatagramPacket(buffer, buffer.length, address, port); in requestTime() 109 buffer[0] = NTP_MODE_CLIENT | (NTP_VERSION << 3); in requestTime() 114 writeTimeStamp(buffer, TRANSMIT_TIME_OFFSET, requestTime); in requestTime() 119 DatagramPacket response = new DatagramPacket(buffer, buffer.length); in requestTime() 125 final byte leap = (byte) ((buffer[0] >> 6) & 0x3); in requestTime() 126 final byte mode = (byte) (buffer[0] & 0x7); in requestTime() 127 final int stratum = (int) (buffer[1] & 0xff); in requestTime() 128 final long originateTime = readTimeStamp(buffer, ORIGINATE_TIME_OFFSET); in requestTime() 129 final long receiveTime = readTimeStamp(buffer, RECEIVE_TIME_OFFSET); in requestTime() [all …]
|
/frameworks/base/tests/AccessoryDisplay/common/src/com/android/accessorydisplay/common/ |
D | Transport.java | 231 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/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/ |
D | HSWanMetricsElementTest.java | 49 ByteBuffer buffer = ByteBuffer.allocate(HSWanMetricsElement.EXPECTED_BUFFER_SIZE) in getTestBuffer() local 54 buffer.put((byte) wanInfo); in getTestBuffer() 55 buffer.putInt((int) (TEST_DOWNLINK_SPEED & 0xFFFFFFFFL)); in getTestBuffer() 56 buffer.putInt((int) (TEST_UPLINK_SPEED & 0xFFFFFFFFL)); in getTestBuffer() 57 buffer.put((byte) (TEST_DOWNLINK_LOAD & 0xFF)); in getTestBuffer() 58 buffer.put((byte) (TEST_UPLINK_LOAD & 0xFF)); in getTestBuffer() 59 buffer.putShort((short) (TEST_LMD & 0xFFFF)); in getTestBuffer() 60 buffer.position(0); in getTestBuffer() 61 return buffer; in getTestBuffer() 82 ByteBuffer buffer = ByteBuffer.allocate(HSWanMetricsElement.EXPECTED_BUFFER_SIZE - 1); in parseBufferWithLessThanExpectedSize() local [all …]
|
D | HSConnectionCapabilityElementTest.java | 48 private void appendProtocolPortTuple(ByteBuffer buffer, ProtocolPortTuple tuple) { in appendProtocolPortTuple() argument 49 buffer.put((byte) tuple.getProtocol()); in appendProtocolPortTuple() 50 buffer.putShort((short) tuple.getPort()); in appendProtocolPortTuple() 51 buffer.put((byte) tuple.getStatus()); in appendProtocolPortTuple() 61 ByteBuffer buffer = ByteBuffer.allocate(tuples.length * ProtocolPortTuple.RAW_BYTE_SIZE) in getTestBuffer() local 64 appendProtocolPortTuple(buffer, tuple); in getTestBuffer() 66 buffer.position(0); in getTestBuffer() 67 return buffer; in getTestBuffer() 91 ByteBuffer buffer = ByteBuffer.allocate(ProtocolPortTuple.RAW_BYTE_SIZE - 1); in parseBufferWithLessThanMinimumSize() local 92 buffer.put(new byte[ProtocolPortTuple.RAW_BYTE_SIZE - 1]); in parseBufferWithLessThanMinimumSize() [all …]
|
/frameworks/base/core/jni/ |
D | android_hardware_HardwareBuffer.cpp | 62 explicit GraphicBufferWrapper(const sp<GraphicBuffer>& buffer) in GraphicBufferWrapper() argument 63 : buffer(buffer) {} in GraphicBufferWrapper() 65 sp<GraphicBuffer> buffer; member in GraphicBufferWrapper 85 sp<GraphicBuffer> buffer = new GraphicBuffer(width, height, pixelFormat, layers, in android_hardware_HardwareBuffer_create() local 87 status_t error = buffer->initCheck(); in android_hardware_HardwareBuffer_create() 95 GraphicBufferWrapper* wrapper = new GraphicBufferWrapper(buffer); in android_hardware_HardwareBuffer_create() 113 return reinterpret_cast<GraphicBufferWrapper*>(nativeObject)->buffer.get(); in GraphicBufferWrapper_to_GraphicBuffer() 118 GraphicBuffer* buffer = GraphicBufferWrapper_to_GraphicBuffer(nativeObject); in android_hardware_HardwareBuffer_getWidth() local 119 return static_cast<jint>(buffer->getWidth()); in android_hardware_HardwareBuffer_getWidth() 124 GraphicBuffer* buffer = GraphicBufferWrapper_to_GraphicBuffer(nativeObject); in android_hardware_HardwareBuffer_getHeight() local [all …]
|
D | android_hardware_UsbRequest.cpp | 81 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 …]
|
/frameworks/base/core/java/android/hardware/ |
D | SerialPort.java | 87 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/ |
D | HTTPDownloader.cpp | 136 sp<ABuffer> buffer = *out != NULL ? *out : new ABuffer(size); in fetchBlock() local 138 buffer->setRange(0, 0); in fetchBlock() 143 …if (block_size > 0 && (range_length == -1 || (int64_t)(buffer->size() + block_size) < range_length… in fetchBlock() 144 range_length = buffer->size() + block_size; in fetchBlock() 148 size_t bufferRemaining = buffer->capacity() - buffer->size(); in fetchBlock() 150 size_t bufferIncrement = buffer->size() / 2; in fetchBlock() 157 buffer->size() + bufferRemaining); in fetchBlock() 159 sp<ABuffer> copy = new ABuffer(buffer->size() + bufferRemaining); in fetchBlock() 160 memcpy(copy->data(), buffer->data(), buffer->size()); in fetchBlock() 161 copy->setRange(0, buffer->size()); in fetchBlock() [all …]
|
/frameworks/base/core/java/android/util/ |
D | JsonReader.java | 195 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/ |
D | ARTPWriter.cpp | 176 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 …]
|