/frameworks/native/libs/binder/ |
D | TextOutput.cpp | 49 char buf[16]; in operator <<() local 50 sprintf(buf, "%d", val); in operator <<() 51 to.print(buf, strlen(buf)); in operator <<() 57 char buf[16]; in operator <<() local 58 sprintf(buf, "%ld", val); in operator <<() 59 to.print(buf, strlen(buf)); in operator <<() 65 char buf[16]; in operator <<() local 66 sprintf(buf, "%u", val); in operator <<() 67 to.print(buf, strlen(buf)); in operator <<() 73 char buf[16]; in operator <<() local [all …]
|
/frameworks/native/libs/gui/tests/ |
D | SurfaceTextureClient_test.cpp | 220 ANativeWindowBuffer* buf; in TEST_F() local 221 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F() 222 EXPECT_EQ(1, buf->width); in TEST_F() 223 EXPECT_EQ(1, buf->height); in TEST_F() 224 EXPECT_EQ(PIXEL_FORMAT_RGBA_8888, buf->format); in TEST_F() 225 ASSERT_EQ(OK, mANW->cancelBuffer(mANW.get(), buf, -1)); in TEST_F() 230 ANativeWindowBuffer* buf; in TEST_F() local 233 ASSERT_EQ(OK, native_window_dequeue_buffer_and_wait(mANW.get(), &buf)); in TEST_F() 234 EXPECT_EQ(16, buf->width); in TEST_F() 235 EXPECT_EQ(8, buf->height); in TEST_F() [all …]
|
D | CpuConsumer_test.cpp | 165 void checkPixel(const CpuConsumer::LockedBuffer &buf, in checkPixel() argument 168 switch(buf.format) { in checkPixel() 171 uint16_t *bPtr = (uint16_t*)buf.data; in checkPixel() 172 bPtr += y * buf.stride + x; in checkPixel() 190 uint8_t *bPtr = (uint8_t*)buf.data; in checkPixel() 191 bPtr += y * buf.stride + x; in checkPixel() 198 uint16_t *bPtr = ((uint16_t*)buf.data) + y * buf.stride + x; in checkPixel() 205 uint8_t *bPtr = (uint8_t*)buf.data; in checkPixel() 206 bPtr += (y * buf.stride + x) * bytesPerPixel; in checkPixel() 214 ADD_FAILURE() << "Unknown format for check:" << buf.format; in checkPixel() [all …]
|
D | FillBuffer.cpp | 25 void fillYV12Buffer(uint8_t* buf, int w, int h, int stride) { in fillYV12Buffer() argument 39 buf[yuvTexOffsetY + (y * yuvTexStrideY) + x] = intensity; in fillYV12Buffer() 41 buf[yuvTexOffsetU + (y * yuvTexStrideU) + x] = intensity; in fillYV12Buffer() 43 buf[yuvTexOffsetV + (y*2 * yuvTexStrideV) + x*2 + 0] = in fillYV12Buffer() 44 buf[yuvTexOffsetV + (y*2 * yuvTexStrideV) + x*2 + 1] = in fillYV12Buffer() 45 buf[yuvTexOffsetV + ((y*2+1) * yuvTexStrideV) + x*2 + 0] = in fillYV12Buffer() 46 buf[yuvTexOffsetV + ((y*2+1) * yuvTexStrideV) + x*2 + 1] = in fillYV12Buffer() 54 void fillYV12BufferRect(uint8_t* buf, int w, int h, int stride, in fillYV12BufferRect() argument 66 buf[yuvTexOffsetY + (y * yuvTexStrideY) + x] = inside ? 240 : 64; in fillYV12BufferRect() 70 buf[yuvTexOffsetU + (y * yuvTexStrideU) + x] = 16; in fillYV12BufferRect() [all …]
|
/frameworks/base/tools/layoutlib/create/src/com/android/tools/layoutlib/java/ |
D | IntegralToString.java | 139 char[] buf = new char[bufLen]; in intToString() 144 buf[--cursor] = DIGITS[radix * q - i]; in intToString() 149 buf[--cursor] = '-'; in intToString() 152 return new String(buf, cursor, bufLen - cursor); in intToString() 209 char[] buf = (sb != null) ? BUFFER.get() : new char[bufLen]; 217 buf[--cursor] = ONES[r]; 218 buf[--cursor] = TENS[r]; 227 buf[--cursor] = DIGITS[r]; 232 buf[--cursor] = '-'; 236 sb.append(buf, cursor, bufLen - cursor); [all …]
|
/frameworks/base/core/jni/ |
D | android_server_Watchdog.cpp | 32 char buf[64]; in dumpOneStack() local 34 snprintf(buf, sizeof(buf), "/proc/%d/stack", tid); in dumpOneStack() 35 int stackFd = open(buf, O_RDONLY); in dumpOneStack() 38 strncat(buf, ":\n", sizeof(buf) - strlen(buf) - 1); in dumpOneStack() 39 write(outFd, buf, strlen(buf)); in dumpOneStack() 43 while ((nBytes = read(stackFd, buf, sizeof(buf))) > 0) { in dumpOneStack() 44 write(outFd, buf, nBytes); in dumpOneStack() 56 char buf[128]; in dumpKernelStacks() local 74 snprintf(buf, sizeof(buf), "\n----- begin pid %d kernel stacks -----\n", getpid()); in dumpKernelStacks() 75 write(outFd, buf, strlen(buf)); in dumpKernelStacks() [all …]
|
D | android_os_SystemProperties.cpp | 35 char buf[PROPERTY_VALUE_MAX]; in SystemProperties_getSS() local 45 len = property_get(key, buf, ""); in SystemProperties_getSS() 49 rvJ = env->NewStringUTF(buf); in SystemProperties_getSS() 71 char buf[PROPERTY_VALUE_MAX]; in SystemProperties_get_int() local 82 len = property_get(key, buf, ""); in SystemProperties_get_int() 84 result = strtol(buf, &end, 0); in SystemProperties_get_int() 85 if (end == buf) { in SystemProperties_get_int() 101 char buf[PROPERTY_VALUE_MAX]; in SystemProperties_get_long() local 112 len = property_get(key, buf, ""); in SystemProperties_get_long() 114 result = strtoll(buf, &end, 0); in SystemProperties_get_long() [all …]
|
/frameworks/native/opengl/tests/EGLTest/ |
D | egl_cache_test.cpp | 44 uint8_t buf[4] = { 0xee, 0xee, 0xee, 0xee }; in TEST_F() local 46 ASSERT_EQ(0, mCache->getBlob("abcd", 4, buf, 4)); in TEST_F() 47 ASSERT_EQ(0xee, buf[0]); in TEST_F() 48 ASSERT_EQ(0xee, buf[1]); in TEST_F() 49 ASSERT_EQ(0xee, buf[2]); in TEST_F() 50 ASSERT_EQ(0xee, buf[3]); in TEST_F() 54 uint8_t buf[4] = { 0xee, 0xee, 0xee, 0xee }; in TEST_F() local 57 ASSERT_EQ(4, mCache->getBlob("abcd", 4, buf, 4)); in TEST_F() 58 ASSERT_EQ('e', buf[0]); in TEST_F() 59 ASSERT_EQ('f', buf[1]); in TEST_F() [all …]
|
/frameworks/av/media/libstagefright/codecs/aacenc/src/ |
D | transform.c | 42 static void Shuffle(int *buf, int num, const unsigned char* bitTab) in Shuffle() argument 48 part0 = buf; in Shuffle() 49 part1 = buf + num; in Shuffle() 73 static void Radix4First(int *buf, int num) in Radix4First() argument 80 r0 = buf[0] + buf[2]; in Radix4First() 81 r1 = buf[1] + buf[3]; in Radix4First() 82 r2 = buf[0] - buf[2]; in Radix4First() 83 r3 = buf[1] - buf[3]; in Radix4First() 84 r4 = buf[4] + buf[6]; in Radix4First() 85 r5 = buf[5] + buf[7]; in Radix4First() [all …]
|
/frameworks/av/media/libstagefright/codecs/aacenc/src/asm/ARMV7/ |
D | R4R8First_v7.s | 44 VADD.S32 d4, d0, d1 @ r0 = buf[0] + buf[2]@i0 = buf[1] + buf[3]@ 45 VSUB.S32 d5, d0, d1 @ r1 = buf[0] - buf[2]@i1 = buf[1] - buf[3]@ 46 VSUB.S32 d7, d2, d3 @ r2 = buf[4] - buf[6]@i2 = buf[5] - buf[7]@ 47 VADD.S32 d6, d2, d3 @ r3 = buf[4] + buf[6]@i3 = buf[5] + buf[7]@ 55 VADD.S32 d4, d8, d9 @ r0 = buf[ 8] + buf[10]@i0 = buf[ 9] + buf[11]@ 56 VSUB.S32 d7, d10, d11 @ r1 = buf[12] - buf[14]@i1 = buf[13] - buf[15]@ 57 VADD.S32 d6, d10, d11 @ r2 = buf[12] + buf[14]@i2 = buf[13] + buf[15]@ 59 VSUB.S32 d5, d8, d9 @ r3 = buf[ 8] - buf[10]@i3 = buf[ 9] - buf[11]@ 134 VADD.S32 d4, d0, d1 @ r0 = buf[0] + buf[2]@ r1 = buf[1] + buf[3]@ 135 VSUB.S32 d5, d0, d1 @ r2 = buf[0] - buf[2]@ r3 = buf[1] - buf[3]@ [all …]
|
/frameworks/base/services/net/java/android/net/util/ |
D | IpUtils.java | 46 private static int checksum(ByteBuffer buf, int seed, int start, int end) { in checksum() argument 48 final int bufPosition = buf.position(); in checksum() 52 buf.position(start); in checksum() 53 ShortBuffer shortBuf = buf.asShortBuffer(); in checksum() 56 buf.position(bufPosition); in checksum() 66 short b = buf.get(start); in checksum() 83 ByteBuffer buf, int headerOffset, int protocol, int transportLen) { in pseudoChecksumIPv4() argument 85 partial += intAbs(buf.getShort(headerOffset + 12)); in pseudoChecksumIPv4() 86 partial += intAbs(buf.getShort(headerOffset + 14)); in pseudoChecksumIPv4() 87 partial += intAbs(buf.getShort(headerOffset + 16)); in pseudoChecksumIPv4() [all …]
|
/frameworks/minikin/tests/ |
D | WordBreakerTests.cpp | 39 uint16_t buf[] = {'h', 'e', 'l', 'l' ,'o', ' ', 'w', 'o', 'r', 'l', 'd'}; in TEST_F() local 42 breaker.setText(buf, NELEM(buf)); in TEST_F() 49 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST_F() 57 uint16_t buf[] = {'h', 'e', 'l', 0x00AD, 'l' ,'o', ' ', 'w', 'o', 'r', 'l', 'd'}; in TEST_F() local 60 breaker.setText(buf, NELEM(buf)); in TEST_F() 66 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end in TEST_F() 73 uint16_t buf[] = {'U', 'S', 0x00A2, ' ', 'J', 'P', 0x00A5}; // US¢ JP¥ in TEST_F() local 76 breaker.setText(buf, NELEM(buf)); in TEST_F() 83 EXPECT_EQ((ssize_t)NELEM(buf), breaker.next()); // end of string in TEST_F() 85 EXPECT_EQ((ssize_t)NELEM(buf), breaker.wordEnd()); in TEST_F() [all …]
|
D | UnicodeUtils.cpp | 23 void ParseUnicode(uint16_t* buf, size_t buf_size, const char* src, size_t* result_size, in ParseUnicode() argument 37 buf[output_ix++] = (uint16_t)src[input_ix++]; in ParseUnicode() 56 buf[output_ix++] = codepoint; in ParseUnicode() 60 buf[output_ix++] = U16_LEAD(codepoint); in ParseUnicode() 61 buf[output_ix++] = U16_TRAIL(codepoint); in ParseUnicode() 86 uint16_t buf[BUF_SIZE]; in TEST() local 89 ParseUnicode(buf, BUF_SIZE, "U+000D U+1F431 | 'a'", &size, &offset); in TEST() 92 EXPECT_EQ(buf[0], 0x000D); in TEST() 93 EXPECT_EQ(buf[1], 0xD83D); in TEST() 94 EXPECT_EQ(buf[2], 0xDC31); in TEST() [all …]
|
/frameworks/base/services/core/java/com/android/server/connectivity/ |
D | KeepalivePacketData.java | 115 ByteBuffer buf = ByteBuffer.allocate(length); in nattKeepalivePacket() local 116 buf.order(ByteOrder.BIG_ENDIAN); in nattKeepalivePacket() 117 buf.putShort((short) 0x4500); // IP version and TOS in nattKeepalivePacket() 118 buf.putShort((short) length); in nattKeepalivePacket() 119 buf.putInt(0); // ID, flags, offset in nattKeepalivePacket() 120 buf.put((byte) 64); // TTL in nattKeepalivePacket() 121 buf.put((byte) OsConstants.IPPROTO_UDP); in nattKeepalivePacket() 122 int ipChecksumOffset = buf.position(); in nattKeepalivePacket() 123 buf.putShort((short) 0); // IP checksum in nattKeepalivePacket() 124 buf.put(srcAddress.getAddress()); in nattKeepalivePacket() [all …]
|
/frameworks/base/tools/aapt/ |
D | ZipEntry.cpp | 387 unsigned char buf[kLFHLen]; in read() local 392 if (fread(buf, 1, kLFHLen, fp) != kLFHLen) { in read() 397 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) { in read() 403 mVersionToExtract = ZipEntry::getShortLE(&buf[0x04]); in read() 404 mGPBitFlag = ZipEntry::getShortLE(&buf[0x06]); in read() 405 mCompressionMethod = ZipEntry::getShortLE(&buf[0x08]); in read() 406 mLastModFileTime = ZipEntry::getShortLE(&buf[0x0a]); in read() 407 mLastModFileDate = ZipEntry::getShortLE(&buf[0x0c]); in read() 408 mCRC32 = ZipEntry::getLongLE(&buf[0x0e]); in read() 409 mCompressedSize = ZipEntry::getLongLE(&buf[0x12]); in read() [all …]
|
D | ZipEntry.h | 116 static inline unsigned short getShortLE(const unsigned char* buf) { in getShortLE() argument 117 return buf[0] | (buf[1] << 8); in getShortLE() 119 static inline unsigned long getLongLE(const unsigned char* buf) { in getLongLE() argument 120 return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24); in getLongLE() 122 static inline void putShortLE(unsigned char* buf, short val) { in putShortLE() argument 123 buf[0] = (unsigned char) val; in putShortLE() 124 buf[1] = (unsigned char) (val >> 8); in putShortLE() 126 static inline void putLongLE(unsigned char* buf, long val) { in putLongLE() argument 127 buf[0] = (unsigned char) val; in putLongLE() 128 buf[1] = (unsigned char) (val >> 8); in putLongLE() [all …]
|
/frameworks/base/services/net/java/android/net/dhcp/ |
D | DhcpPacket.java | 356 Inet4Address srcIp, short destUdp, short srcUdp, ByteBuffer buf, in fillInPacket() argument 368 buf.clear(); in fillInPacket() 369 buf.order(ByteOrder.BIG_ENDIAN); in fillInPacket() 372 buf.put(ETHER_BROADCAST); in fillInPacket() 373 buf.put(mClientMac); in fillInPacket() 374 buf.putShort((short) OsConstants.ETH_P_IP); in fillInPacket() 381 ipHeaderOffset = buf.position(); in fillInPacket() 382 buf.put(IP_VERSION_HEADER_LEN); in fillInPacket() 383 buf.put(IP_TOS_LOWDELAY); // tos: IPTOS_LOWDELAY in fillInPacket() 384 ipLengthOffset = buf.position(); in fillInPacket() [all …]
|
/frameworks/volley/src/main/java/com/android/volley/toolbox/ |
D | ByteArrayPool.java | 93 byte[] buf = mBuffersBySize.get(i); in getBuf() 94 if (buf.length >= len) { in getBuf() 95 mCurrentSize -= buf.length; in getBuf() 97 mBuffersByLastUse.remove(buf); in getBuf() 98 return buf; in getBuf() 110 public synchronized void returnBuf(byte[] buf) { in returnBuf() argument 111 if (buf == null || buf.length > mSizeLimit) { in returnBuf() 114 mBuffersByLastUse.add(buf); in returnBuf() 115 int pos = Collections.binarySearch(mBuffersBySize, buf, BUF_COMPARATOR); in returnBuf() 119 mBuffersBySize.add(pos, buf); in returnBuf() [all …]
|
/frameworks/compile/libbcc/include/bcinfo/Wrap/ |
D | BCHeaderField.h | 48 bool Write(uint8_t* buf, size_t buf_len) { in Write() argument 57 WriteFixedSubfield(static_cast<FixedSubfield>(ID_), buf); in Write() 59 buf + sizeof(FixedSubfield)); in Write() 60 memcpy(buf + kTagLenSize, data_, len_); in Write() 63 memset(buf + fields_len, 0, pad_len); in Write() 68 bool Read(const uint8_t* buf, size_t buf_len) { in Read() argument 71 ReadFixedSubfield(&field, buf); in Read() 73 ReadFixedSubfield(&field, buf + sizeof(FixedSubfield)); in Read() 76 memcpy(data_, buf + kTagLenSize, len_); in Read() 89 static size_t GetDataSizeFromSerialized(const uint8_t* buf) { in GetDataSizeFromSerialized() argument [all …]
|
/frameworks/base/tests/touchlag/ |
D | touchlag.cpp | 50 void clearBuffer(Buffer* buf, uint32_t pixel) { in clearBuffer() argument 51 android_memset32(buf->pixels, pixel, buf->s * buf->h * 4); in clearBuffer() 54 void drawTwoPixels(Buffer* buf, uint32_t pixel, ssize_t x, ssize_t y, size_t w) { in drawTwoPixels() argument 55 if (y>0 && y<ssize_t(buf->h)) { in drawTwoPixels() 56 uint32_t* bits = buf->pixels + y * buf->s; in drawTwoPixels() 57 if (x>=0 && x<ssize_t(buf->w)) { in drawTwoPixels() 61 if ((x+W)>=0 && (x+W)<ssize_t(buf->w)) { in drawTwoPixels() 67 void drawHLine(Buffer* buf, uint32_t pixel, ssize_t x, ssize_t y, size_t w) { in drawHLine() argument 68 if (y>0 && y<ssize_t(buf->h)) { in drawHLine() 74 if (x+w > buf->w) { in drawHLine() [all …]
|
/frameworks/minikin/libs/minikin/ |
D | FontLanguage.cpp | 31 FontLanguage::FontLanguage(const char* buf, size_t length) : FontLanguage() { in FontLanguage() argument 34 char c = buf[i]; in FontLanguage() 38 mLanguage = buf[0] | (buf[1] << 8) | ((i == 3) ? (buf[2] << 16) : 0); in FontLanguage() 49 char c = buf[next]; in FontLanguage() 52 if (next - i == 4 && 'A' <= buf[i] && buf[i] <= 'Z') { in FontLanguage() 53 mScript = SCRIPT_TAG(buf[i], buf[i + 1], buf[i + 2], buf[i + 3]); in FontLanguage() 109 char buf[16]; in getString() local 111 buf[i++] = mLanguage & 0xFF ; in getString() 112 buf[i++] = (mLanguage >> 8) & 0xFF; in getString() 114 if (third_letter != 0) buf[i++] = third_letter; in getString() [all …]
|
/frameworks/av/media/libstagefright/codecs/aacenc/src/asm/ARMV5E/ |
D | R4R8First_v5.s | 95 add r8, r0, r2 @ r0 = buf[0] + buf[2]@ 96 add r9, r1, r3 @ i0 = buf[1] + buf[3]@ 98 sub r0, r0, r2 @ r1 = buf[0] - buf[2]@ 99 sub r1, r1, r3 @ i1 = buf[1] - buf[3]@ 101 add r2, r4, r6 @ r2 = buf[4] + buf[6]@ 102 add r3, r5, r7 @ i2 = buf[5] + buf[7]@ 104 sub r4, r4, r6 @ r3 = buf[4] - buf[6]@ 105 sub r5, r5, r7 @ i3 = buf[5] - buf[7]@ 148 add r0, r2, r4 @ r0 = buf[ 8] + buf[10]@ 149 add r1, r3, r5 @ i0 = buf[ 9] + buf[11]@ [all …]
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/ |
D | ResponseData.java | 36 public abstract void format(ByteArrayOutputStream buf); in format() argument 38 public static void writeLength(ByteArrayOutputStream buf, int length) { in writeLength() argument 43 buf.write(0x81); in writeLength() 45 buf.write(length); in writeLength() 59 public void format(ByteArrayOutputStream buf) { in format() argument 62 buf.write(tag); // tag in format() 63 buf.write(1); // length in format() 64 buf.write(mId); // identifier of item chosen in format() 98 public void format(ByteArrayOutputStream buf) { in format() argument 99 if (buf == null) { in format() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/ |
D | MemoryFileProviderTest.java | 39 byte[] buf = new byte[MemoryFileProvider.TEST_BLOB.length]; in testRead() 42 int count = in.read(buf); in testRead() 43 assertEquals(buf.length, count); in testRead() 46 assertTrue(Arrays.equals(MemoryFileProvider.TEST_BLOB, buf)); in testRead() 59 byte[] buf = new byte[MemoryFileProvider.TEST_BLOB.length]; in testClose() 60 int count = in.read(buf); in testClose() 61 assertEquals(buf.length, count); in testClose() 62 assertTrue(Arrays.equals(MemoryFileProvider.TEST_BLOB, buf)); in testClose() 72 byte[] buf = new byte[MemoryFileProvider.TEST_BLOB.length]; in testFile() 75 int count = in.read(buf); in testFile() [all …]
|
/frameworks/av/media/libstagefright/webm/ |
D | WebmElement.cpp | 85 int WebmElement::serializePayloadSize(uint8_t *buf) { in serializePayloadSize() argument 86 return serializeCodedUnsigned(encodeUnsigned(mSize), buf); in serializePayloadSize() 89 uint64_t WebmElement::serializeInto(uint8_t *buf) { in serializeInto() argument 90 uint8_t *cur = buf; in serializeInto() 97 return cur - buf; in serializeInto() 101 uint8_t buf[8]; in totalSize() local 103 return sizeOf(mId) + serializePayloadSize(buf) + mSize; in totalSize() 108 uint8_t *buf = new uint8_t[size]; in serialize() local 109 serializeInto(buf); in serialize() 110 return buf; in serialize() [all …]
|