Home
last modified time | relevance | path

Searched refs:size (Results 1 – 25 of 4526) sorted by relevance

12345678910>>...182

/frameworks/native/libs/gui/
DBufferItem.cpp64 static void addAligned(size_t& size, T /* value */) { in addAligned() argument
65 size = FlattenableUtils::align<sizeof(T)>(size); in addAligned()
66 size += sizeof(T); in addAligned()
70 size_t size = 0; in getPodSize() local
71 addAligned(size, mCrop); in getPodSize()
72 addAligned(size, mTransform); in getPodSize()
73 addAligned(size, mScalingMode); in getPodSize()
74 addAligned(size, low32(mTimestamp)); in getPodSize()
75 addAligned(size, high32(mTimestamp)); in getPodSize()
76 addAligned(size, mIsAutoTimestamp); in getPodSize()
[all …]
DBitTube.cpp50 size_t size = DEFAULT_SOCKET_BUFFER_SIZE; in init() local
54 setsockopt(sockets[0], SOL_SOCKET, SO_SNDBUF, &size, sizeof(size)); in init()
55 setsockopt(sockets[1], SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)); in init()
89 ssize_t BitTube::write(void const* vaddr, size_t size) { in write() argument
92 len = ::send(mSendFd, vaddr, size, MSG_DONTWAIT | MSG_NOSIGNAL); in write()
99 ssize_t BitTube::read(void* vaddr, size_t size) { in read() argument
102 len = ::recv(mReceiveFd, vaddr, size, MSG_DONTWAIT); in read()
134 ssize_t size = tube->write(vaddr, count * objSize); in sendObjects() local
137 LOG_ALWAYS_FATAL_IF((size >= 0) && (size % static_cast<ssize_t>(objSize)), in sendObjects()
140 count, objSize, size); in sendObjects()
[all …]
/frameworks/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/engine/
Dbugdroid.rs21 int size;
116 float3 p1 = { size * 0.5f, size * 0.5f, size * 0.3f };
117 float3 p2 = { size * 0.5f, size * 0.5f, size * 0.65f };
118 float radius = size * 0.22f;
120 p2.z = size * 0.4f;
123 v -= circle(p1, radius*0.9f, normal, size * 0.05f, 144, img);
127 float3 p1 = { size * (0.5f - armOffset), size * 0.5f, size * 0.4f };
128 float3 p2 = { size * (0.5f - armOffset), size * 0.5f, size * 0.57f };
129 v = max(v, pill(p1, p2, size * 0.09f, 144, img));
132 float3 p1 = { size * (0.5f + armOffset), size * 0.5f, size * 0.4f };
[all …]
/frameworks/compile/mclinker/unittests/
DLEB128Test.cpp44 size_t size; in TEST_F() local
47 size = leb128::encode<uint32_t>(result, 2); in TEST_F()
50 ASSERT_TRUE(size == 1); in TEST_F()
53 size = leb128::encode<uint32_t>(result, 127); in TEST_F()
56 ASSERT_TRUE(size == 1); in TEST_F()
59 size = leb128::encode<uint32_t>(result, 128); in TEST_F()
63 ASSERT_TRUE(size == 2); in TEST_F()
66 size = leb128::encode<uint32_t>(result, 129); in TEST_F()
70 ASSERT_TRUE(size == 2); in TEST_F()
73 size = leb128::encode<uint32_t>(result, 130); in TEST_F()
[all …]
/frameworks/native/cmds/installd/tests/
Dinstalld_cache_test.cpp89 static int64_t size(const char* path) { in size() function
197 EXPECT_EQ(2 * kMbInBytes, size("com.example/cache/bar/bar1")); in TEST_F()
198 EXPECT_EQ(2 * kMbInBytes, size("com.example/cache/bar/bar2")); in TEST_F()
207 EXPECT_EQ(0, size("com.example/cache/bar/bar1")); in TEST_F()
208 EXPECT_EQ(0, size("com.example/cache/bar/bar2")); in TEST_F()
270 EXPECT_EQ(kMbInBytes, size("com.example/cache/group/file1")); in TEST_F()
271 EXPECT_EQ(kMbInBytes, size("com.example/cache/group/file2")); in TEST_F()
272 EXPECT_EQ(kMbInBytes, size("com.example/cache/group/dir/file1")); in TEST_F()
273 EXPECT_EQ(kMbInBytes, size("com.example/cache/group/dir/file2")); in TEST_F()
274 EXPECT_EQ(kMbInBytes, size("com.example/cache/group/tomb/file1")); in TEST_F()
[all …]
/frameworks/av/media/libstagefright/
DESDS.cpp29 ESDS::ESDS(const void *data, size_t size) in ESDS() argument
30 : mData(new uint8_t[size]), in ESDS()
31 mSize(size), in ESDS()
36 memcpy(mData, data, size); in ESDS()
60 status_t ESDS::getCodecSpecificInfo(const void **data, size_t *size) const { in getCodecSpecificInfo()
66 *size = mDecoderSpecificLength; in getCodecSpecificInfo()
72 size_t offset, size_t size, in skipDescriptorHeader() argument
74 if (size == 0) { in skipDescriptorHeader()
79 --size; in skipDescriptorHeader()
84 if (size == 0) { in skipDescriptorHeader()
[all …]
/frameworks/base/libs/hwui/tests/common/scenes/
DShapeAnimation.cpp37 [](Canvas& canvas, float size, const SkPaint& paint) { in createContent()
38 canvas.drawArc(0, 0, size, size, 50, 189, true, paint); in createContent()
40 [](Canvas& canvas, float size, const SkPaint& paint) { in createContent()
41 canvas.drawOval(0, 0, size, size, paint); in createContent()
43 [](Canvas& canvas, float size, const SkPaint& paint) { in createContent()
45 diamondPath.moveTo(size / 2, 0); in createContent()
46 diamondPath.lineTo(size, size / 2); in createContent()
47 diamondPath.lineTo(size / 2, size); in createContent()
48 diamondPath.lineTo(0, size / 2); in createContent()
52 [](Canvas& canvas, float size, const SkPaint& paint) { in createContent()
[all …]
/frameworks/ex/framesequence/jni/
DStream.cpp42 size_t Stream::peek(void* buffer, size_t size) { in peek() argument
44 if (size > peek_remaining) { in peek()
46 mPeekBuffer = new char[size]; in peek()
51 size_t read = doRead(mPeekBuffer + mPeekOffset, size - peek_remaining); in peek()
55 size = min(size, mPeekSize - mPeekOffset); in peek()
56 memcpy(buffer, mPeekBuffer + mPeekOffset, size); in peek()
57 return size; in peek()
60 size_t Stream::read(void* buffer, size_t size) { in read() argument
64 bytes_read = min(size, peek_remaining); in read()
73 size -= bytes_read; in read()
[all …]
/frameworks/base/tools/aapt2/util/
DBigBuffer.cpp27 void* BigBuffer::NextBlockImpl(size_t size) { in NextBlockImpl() argument
30 if (block.block_size_ - block.size >= size) { in NextBlockImpl()
31 void* out_buffer = block.buffer.get() + block.size; in NextBlockImpl()
32 block.size += size; in NextBlockImpl()
33 size_ += size; in NextBlockImpl()
38 const size_t actual_size = std::max(block_size_, size); in NextBlockImpl()
46 block.size = size; in NextBlockImpl()
50 size_ += size; in NextBlockImpl()
57 if (block.size != block.block_size_) { in NextBlock()
58 void* out_buffer = block.buffer.get() + block.size; in NextBlock()
[all …]
/frameworks/av/media/mtp/tests/
DMtpFfsHandle_test.cpp109 int size = TEST_PACKET_SIZE * SMALL_MULT; in TEST_F() local
110 char buf[size + 1]; in TEST_F()
111 buf[size] = '\0'; in TEST_F()
113 mfr.length = size; in TEST_F()
118 EXPECT_EQ(write(bulk_out, ss.str().c_str(), size), size); in TEST_F()
121 EXPECT_EQ(read(dummy_file.fd, buf, size), size); in TEST_F()
129 int size = TEST_PACKET_SIZE * MED_MULT; in TEST_F() local
130 char buf[size + 1]; in TEST_F()
131 buf[size] = '\0'; in TEST_F()
133 mfr.length = size; in TEST_F()
[all …]
/frameworks/av/media/libstagefright/mpeg2ts/
DESQueue.cpp92 const uint8_t *ptr, size_t size, sp<MetaData> *metaData) { in parseAC3SyncFrame() argument
118 ABitReader bits(ptr, size); in parseAC3SyncFrame()
198 static bool IsSeeminglyValidAC3Header(const uint8_t *ptr, size_t size) { in IsSeeminglyValidAC3Header() argument
199 return parseAC3SyncFrame(ptr, size, NULL) > 0; in IsSeeminglyValidAC3Header()
203 const uint8_t *ptr, size_t size, size_t *frameLength) { in IsSeeminglyValidADTSHeader() argument
204 if (size < 7) { in IsSeeminglyValidADTSHeader()
229 if (frameLengthInHeader > size) { in IsSeeminglyValidADTSHeader()
237 static bool IsSeeminglyValidMPEGAudioHeader(const uint8_t *ptr, size_t size) { in IsSeeminglyValidMPEGAudioHeader() argument
238 if (size < 3) { in IsSeeminglyValidMPEGAudioHeader()
275 const void *data, size_t size, int64_t timeUs, in appendData() argument
[all …]
/frameworks/native/libs/binder/
DMemoryDealer.cpp115 const sp<IMemoryHeap>& heap, ssize_t offset, size_t size);
129 explicit SimpleBestFitAllocator(size_t size);
132 size_t allocate(size_t size, uint32_t flags = 0);
134 size_t size() const;
143 chunk_t(size_t start, size_t size) in chunk_t()
144 : start(start), size(size), free(1), prev(0), next(0) { in chunk_t()
147 size_t size : 28; member
153 ssize_t alloc(size_t size, uint32_t flags);
168 const sp<IMemoryHeap>& heap, ssize_t offset, size_t size) in Allocation() argument
169 : MemoryBase(heap, offset, size), mDealer(dealer) in Allocation()
[all …]
DMemoryHeapBase.cpp43 MemoryHeapBase::MemoryHeapBase(size_t size, uint32_t flags, char const * name) in MemoryHeapBase() argument
48 size = ((size + pagesize-1) & ~(pagesize-1)); in MemoryHeapBase()
49 int fd = ashmem_create_region(name == NULL ? "MemoryHeapBase" : name, size); in MemoryHeapBase()
52 if (mapfd(fd, size) == NO_ERROR) { in MemoryHeapBase()
60 MemoryHeapBase::MemoryHeapBase(const char* device, size_t size, uint32_t flags) in MemoryHeapBase() argument
72 size = ((size + pagesize-1) & ~(pagesize-1)); in MemoryHeapBase()
73 if (mapfd(fd, size) == NO_ERROR) { in MemoryHeapBase()
79 MemoryHeapBase::MemoryHeapBase(int fd, size_t size, uint32_t flags, uint32_t offset) in MemoryHeapBase() argument
84 size = ((size + pagesize-1) & ~(pagesize-1)); in MemoryHeapBase()
85 mapfd(fcntl(fd, F_DUPFD_CLOEXEC, 0), size, offset); in MemoryHeapBase()
[all …]
/frameworks/rs/tests/lldb/cpp/BranchingFunCalls/
DBranchingFunCalls.cpp23 static const int size = 64; in main() local
30 tb.setX(size); in main()
31 tb.setY(size); in main()
37 int * input = new int[size*size]; in main()
38 for(int i = 0; i < size*size; ++i) { in main()
39 input[i] = i - (size*size / 2); in main()
41 a->copy2DRangeFrom(0, 0, size, size, input); in main()
49 int32_t * output = new int32_t[size*size]; in main()
50 b->copy2DRangeTo(0, 0, size, size, output); in main()
/frameworks/minikin/tests/unittest/
DLayoutTest.cpp33 EXPECT_LE(expected.size(), length); in expectAdvances()
34 for (size_t i = 0; i < expected.size(); ++i) { in expectAdvances()
39 EXPECT_EQ(UNTOUCHED_MARKER, advances[expected.size()]); in expectAdvances()
80 layout.doLayout(text.data(), 0, text.size(), text.size(), kBidi_LTR, FontStyle(), paint, in TEST_F()
90 expectedValues.resize(text.size()); in TEST_F()
91 for (size_t i = 0; i < expectedValues.size(); ++i) { in TEST_F()
99 layout.doLayout(text.data(), 0, text.size(), text.size(), kBidi_LTR, FontStyle(), paint, in TEST_F()
109 expectedValues.resize(text.size()); in TEST_F()
110 for (size_t i = 0; i < expectedValues.size(); ++i) { in TEST_F()
118 layout.doLayout(text.data(), 0, text.size(), text.size(), kBidi_LTR, FontStyle(), paint, in TEST_F()
[all …]
/frameworks/native/libs/sensor/
DBitTube.cpp71 size_t size = DEFAULT_SOCKET_BUFFER_SIZE; in init() local
75 setsockopt(sockets[0], SOL_SOCKET, SO_SNDBUF, &size, sizeof(size)); in init()
76 setsockopt(sockets[1], SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)); in init()
105 ssize_t BitTube::write(void const* vaddr, size_t size) in write() argument
109 len = ::send(mSendFd, vaddr, size, MSG_DONTWAIT | MSG_NOSIGNAL); in write()
116 ssize_t BitTube::read(void* vaddr, size_t size) in read() argument
120 len = ::recv(mReceiveFd, vaddr, size, MSG_DONTWAIT); in read()
147 ssize_t size = tube->write(vaddr, count*objSize); in sendObjects() local
150 LOG_ALWAYS_FATAL_IF((size >= 0) && (size % static_cast<ssize_t>(objSize)), in sendObjects()
152 count, objSize, size); in sendObjects()
[all …]
DSensor.cpp468 status_t Sensor::flatten(void* buffer, size_t size) const { in flatten()
469 if (size < getFlattenedSize()) { in flatten()
473 flattenString8(buffer, size, mName); in flatten()
474 flattenString8(buffer, size, mVendor); in flatten()
475 FlattenableUtils::write(buffer, size, mVersion); in flatten()
476 FlattenableUtils::write(buffer, size, mHandle); in flatten()
477 FlattenableUtils::write(buffer, size, mType); in flatten()
478 FlattenableUtils::write(buffer, size, mMinValue); in flatten()
479 FlattenableUtils::write(buffer, size, mMaxValue); in flatten()
480 FlattenableUtils::write(buffer, size, mResolution); in flatten()
[all …]
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
DStaggeredGrid.java55 public int size; field in StaggeredGrid.Location
57 public Location(int row, int offset, int size) { in Location() argument
60 this.size = size; in Location()
86 return mFirstIndex + mLocations.size() - 1; in getLastIndex()
93 return mLocations.size(); in getSize()
99 if (indexInArray < 0 || indexInArray >= mLocations.size()) { in getLocation()
107 for (int i = 0, size = mLocations.size(); i < size; i++) { in debugPrint()
139 if (mLocations.size() == 0) { in prependVisbleItemsWithCache()
168 int size = mProvider.createItem(itemIndex, false, mTmpItem, false); in prependVisbleItemsWithCache() local
169 if (size != loc.size) { in prependVisbleItemsWithCache()
[all …]
/frameworks/rs/tests/lldb/jni/BranchingFunCalls/jnibranchingfuncalls/
Djnibranchingfuncalls.cpp30 static const int size = 64; in Java_com_android_rs_jnibranchingfuncalls_MainActivity_nativeRS() local
39 tb.setX(size); in Java_com_android_rs_jnibranchingfuncalls_MainActivity_nativeRS()
40 tb.setY(size); in Java_com_android_rs_jnibranchingfuncalls_MainActivity_nativeRS()
46 int * input = new int[size*size]; in Java_com_android_rs_jnibranchingfuncalls_MainActivity_nativeRS()
47 for(int i = 0; i < size*size; ++i) { in Java_com_android_rs_jnibranchingfuncalls_MainActivity_nativeRS()
48 input[i] = i - (size*size / 2); in Java_com_android_rs_jnibranchingfuncalls_MainActivity_nativeRS()
50 a->copy2DRangeFrom(0, 0, size, size, input); in Java_com_android_rs_jnibranchingfuncalls_MainActivity_nativeRS()
58 int32_t * output = new int32_t[size*size]; in Java_com_android_rs_jnibranchingfuncalls_MainActivity_nativeRS()
59 b->copy2DRangeTo(0, 0, size, size, output); in Java_com_android_rs_jnibranchingfuncalls_MainActivity_nativeRS()
/frameworks/base/tools/layoutlib/bridge/src/dalvik/system/
DVMRuntime_Delegate.java36 int size = ((minLength & 1) == 0) ? minLength + 1 : minLength; in newUnpaddedArray() local
37 return java.lang.reflect.Array.newInstance(componentType, size); in newUnpaddedArray()
42 int size = dataBytes / 2; in newUnpaddedArray() local
43 return new char[size]; in newUnpaddedArray()
45 int size = ((minLength & 1) == 0) ? minLength + 1 : minLength; in newUnpaddedArray() local
46 return new int[size]; in newUnpaddedArray()
51 int size = dataBytes; in newUnpaddedArray() local
52 return new byte[size]; in newUnpaddedArray()
57 int size = dataBytes; in newUnpaddedArray() local
58 return new boolean[size]; in newUnpaddedArray()
[all …]
/frameworks/native/opengl/tests/gralloc/
Dgralloc.cpp30 void* lamecpy(void* d, void const* s, size_t size) { in lamecpy() argument
33 while (size) { in lamecpy()
35 size--; in lamecpy()
42 size_t size = 128*256*4; in main() local
43 void* temp = malloc(size); in main()
44 void* temp2 = malloc(size); in main()
45 memset(temp, 0, size); in main()
46 memset(temp2, 0, size); in main()
67 memset(vaddr, 0, size); in main()
73 memcpy(temp, temp2, size); in main()
[all …]
/frameworks/support/v7/recyclerview/jvm-tests/src/android/support/v7/util/
DSortedListTest.java116 assertEquals("empty", mList.size(), 0); in testEmpty()
123 assertEquals(size(), 1); in testAdd()
128 assertEquals(size(), 2); in testAdd()
134 assertEquals(size(), 3); in testAdd()
145 assertEquals(1, size()); in testAddDuplicate()
146 assertEquals(1, mAdditions.size()); in testAddDuplicate()
147 assertEquals(0, mUpdates.size()); in testAddDuplicate()
154 assertEquals(0, mRemovals.size()); in testRemove()
157 assertEquals(1, mRemovals.size()); in testRemove()
159 assertEquals(0, size()); in testRemove()
[all …]
/frameworks/av/media/libmedia/
DMidiIoWrapper.cpp27 static int readAt(void *handle, void *buffer, int pos, int size) { in readAt() argument
28 return ((android::MidiIoWrapper*)handle)->readAt(buffer, pos, size); in readAt()
30 static int size(void *handle) { in size() function
31 return ((android::MidiIoWrapper*)handle)->size(); in size()
43 MidiIoWrapper::MidiIoWrapper(int fd, off64_t offset, int64_t size) { in MidiIoWrapper() argument
47 mLength = size; in MidiIoWrapper()
69 int MidiIoWrapper::readAt(void *buffer, int offset, int size) { in readAt() argument
70 ALOGV("readAt(%p, %d, %d)", buffer, offset, size); in readAt()
73 return mDataSource->readAt(offset, buffer, size); in readAt()
80 if (offset + size > mLength) { in readAt()
[all …]
/frameworks/compile/mclinker/lib/Target/
DELFAttributeData.cpp21 size_t size = 0; in ReadTag() local
24 leb128::decode<uint64_t>(pBuf, size)); in ReadTag()
26 if (size > pBufSize) in ReadTag()
29 pBuf += size; in ReadTag()
30 pBufSize -= size; in ReadTag()
40 size_t size = 0; in ReadValue() local
41 uint64_t int_value = leb128::decode<uint64_t>(pBuf, size); in ReadValue()
44 if (size > pBufSize) in ReadValue()
47 pBuf += size; in ReadValue()
48 pBufSize -= size; in ReadValue()
[all …]
/frameworks/av/media/libstagefright/foundation/
DMetaData.cpp99 size_t size; in findCString() local
100 if (!findData(key, &type, &data, &size) || type != TYPE_C_STRING) { in findCString()
112 size_t size; in findInt32() local
113 if (!findData(key, &type, &data, &size) || type != TYPE_INT32) { in findInt32()
117 CHECK_EQ(size, sizeof(*value)); in findInt32()
127 size_t size; in findInt64() local
128 if (!findData(key, &type, &data, &size) || type != TYPE_INT64) { in findInt64()
132 CHECK_EQ(size, sizeof(*value)); in findInt64()
142 size_t size; in findFloat() local
143 if (!findData(key, &type, &data, &size) || type != TYPE_FLOAT) { in findFloat()
[all …]

12345678910>>...182