/frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation/ |
H A D | ABase.h | 29 /* Returns true if the size parameter is safe for new array allocation (32-bit) 51 bool isSafeArraySize(S size) { argument 52 return size >= 0 // in case S is signed, ignored if not. 53 && size <= 0xffffffff / sizeof(T); // max-unsigned-32-bit-int / element-size.
|
/frameworks/av/media/libstagefright/include/media/stagefright/foundation/ |
H A D | ABase.h | 29 /* Returns true if the size parameter is safe for new array allocation (32-bit) 51 bool isSafeArraySize(S size) { argument 52 return size >= 0 // in case S is signed, ignored if not. 53 && size <= 0xffffffff / sizeof(T); // max-unsigned-32-bit-int / element-size.
|
/frameworks/base/services/core/java/com/android/server/wm/ |
H A D | WindowList.java | 32 return size() > 0 ? get(size() - 1) : null; 36 return size() > 0 ? get(0) : null;
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
H A D | ShapeAnimation.cpp | 37 [](Canvas& canvas, float size, const SkPaint& paint) { 38 canvas.drawArc(0, 0, size, size, 50, 189, true, paint); 40 [](Canvas& canvas, float size, const SkPaint& paint) { 41 canvas.drawOval(0, 0, size, size, paint); 43 [](Canvas& canvas, float size, const SkPaint& paint) { 45 diamondPath.moveTo(size / 2, 0); 46 diamondPath.lineTo(size, size / [all...] |
/frameworks/av/media/libmedia/ |
H A D | MidiIoWrapper.cpp | 27 static int readAt(void *handle, void *buffer, int pos, int size) { argument 28 return ((android::MidiIoWrapper*)handle)->readAt(buffer, pos, size); 30 static int size(void *handle) { function 31 return ((android::MidiIoWrapper*)handle)->size(); 43 MidiIoWrapper::MidiIoWrapper(int fd, off64_t offset, int64_t size) { argument 47 mLength = size; 69 int MidiIoWrapper::readAt(void *buffer, int offset, int size) { 70 ALOGV("readAt(%p, %d, %d)", buffer, offset, size); 73 return mDataSource->readAt(offset, buffer, size); 80 if (offset + size > mLengt [all...] |
/frameworks/native/opengl/tests/gralloc/ |
H A D | gralloc.cpp | 30 void* lamecpy(void* d, void const* s, size_t size) { argument 33 while (size) { 35 size--; 42 size_t size = 128*256*4; local 43 void* temp = malloc(size); 44 void* temp2 = malloc(size); 45 memset(temp, 0, size); 46 memset(temp2, 0, size); 67 memset(vaddr, 0, size); 73 memcpy(temp, temp2, size); [all...] |
/frameworks/compile/mclinker/unittests/ |
H A D | LEB128Test.cpp | 44 size_t size; local 47 size = leb128::encode<uint32_t>(result, 2); 50 ASSERT_TRUE(size == 1); 53 size = leb128::encode<uint32_t>(result, 127); 56 ASSERT_TRUE(size == 1); 59 size = leb128::encode<uint32_t>(result, 128); 63 ASSERT_TRUE(size == 2); 66 size = leb128::encode<uint32_t>(result, 129); 70 ASSERT_TRUE(size == 2); 73 size 90 size_t size; local 136 size_t size; local 195 size_t size; local 230 size_t size; local 297 size_t size; local 414 size_t size; local 496 size_t size; local 512 size_t size; local [all...] |
/frameworks/base/tools/aapt2/io/ |
H A D | StringInputStream.cpp | 27 bool StringInputStream::Next(const void** data, size_t* size) { argument 28 if (offset_ == str_.size()) { 33 *size = str_.size() - offset_; 34 offset_ = str_.size();
|
H A D | FileInputStream_test.cpp | 35 ASSERT_THAT(TEMP_FAILURE_RETRY(write(file.fd, input.c_str(), input.size())), Eq(21)); 38 // Use a small buffer size so that we can call Next() a few times. 44 size_t size; local 45 ASSERT_TRUE(in.Next(reinterpret_cast<const void**>(&buffer), &size)) << in.GetError(); 46 ASSERT_THAT(size, Eq(10u)); 49 EXPECT_THAT(StringPiece(buffer, size), Eq("this is a ")); 51 ASSERT_TRUE(in.Next(reinterpret_cast<const void**>(&buffer), &size)); 52 ASSERT_THAT(size, Eq(10u)); 55 EXPECT_THAT(StringPiece(buffer, size), Eq("cool strin")); 60 ASSERT_TRUE(in.Next(reinterpret_cast<const void**>(&buffer), &size)); [all...] |
/frameworks/support/design/src/android/support/design/internal/ |
H A D | ParcelableSparseArray.java | 38 int size = source.readInt(); 39 int[] keys = new int[size]; 42 for (int i = 0; i < size; ++i) { 54 int size = size(); 55 int[] keys = new int[size]; 56 Parcelable[] values = new Parcelable[size]; 57 for (int i = 0; i < size; ++i) { 61 parcel.writeInt(size); 79 public ParcelableSparseArray[] newArray(int size) { [all...] |
/frameworks/av/media/libstagefright/codecs/on2/h264dec/omxdl/reference/vc/comm/src/ |
H A D | omxVCCOMM_LimitMVToRect.c | 52 * size - size of the current block or macroblock; must be equal to 8 or 66 * - size is not equal to either 8 or 16. 68 * twice the block size. 76 OMX_INT size 83 armRetArgErrIf((size != 8) && (size != 16), OMX_Sts_BadArgErr); 84 armRetArgErrIf((pRectVOPRef->width < (2* size)), OMX_Sts_BadArgErr); 85 armRetArgErrIf((pRectVOPRef->height < (2* size)), OMX_Sts_BadArgErr); 88 (2*pRectVOPRef->x + pRectVOPRef->width - Xcoord - size)); [all...] |
/frameworks/base/libs/androidfw/ |
H A D | ChunkIterator.cpp | 30 reinterpret_cast<const uint8_t*>(this_chunk) + dtohl(this_chunk->size)); 31 len_ -= dtohl(this_chunk->size); 58 const size_t size = dtohl(next_chunk_->size); local 60 last_error_ = "header size too small"; 64 if (header_size > size) { 65 last_error_ = "header size is larger than entire chunk"; 69 if (size > len_) { 70 last_error_ = "chunk size is bigger than given data"; 74 if ((size | header_siz [all...] |
/frameworks/rs/tests/lldb/cpp/InfiniteLoop/ |
H A D | InfiniteLoop.cpp | 26 static const int size = 64; local 33 tb.setX(size); 34 tb.setY(size); 51 uint32_t * output = new uint32_t[size*size]; 52 b->copy2DRangeTo(0, 0, size, size, output);
|
/frameworks/rs/tests/lldb/cpp/MultipleRSFiles/ |
H A D | MultipleRSFiles.cpp | 24 static const int size = 64; local 31 tb.setX(size); 32 tb.setY(size); 43 uint32_t * output = new uint32_t[size*size]; 44 b->copy2DRangeTo(0, 0, size, size, output);
|
/frameworks/rs/tests/lldb/cpp/WaitAttach/ |
H A D | WaitAttach.cpp | 23 static const int size = 8; local 30 tb.setX(size); 31 tb.setY(size); 40 uint32_t * output = new uint32_t[size*size]; 41 b->copy2DRangeTo(0, 0, size, size, output);
|
/frameworks/rs/tests/lldb/jni/NoDebugWaitAttach/jninodebugwaitattach/ |
H A D | jninodebugwaitattach.cpp | 30 static const int size = 8; local 39 tb.setX(size); 40 tb.setY(size); 49 uint32_t * output = new uint32_t[size*size]; 50 b->copy2DRangeTo(0, 0, size, size, output);
|
/frameworks/native/cmds/installd/tests/ |
H A D | installd_cache_test.cpp | 89 static int64_t size(const char* path) { function in namespace:android::installd 197 EXPECT_EQ(2 * kMbInBytes, size("com.example/cache/bar/bar1")); 198 EXPECT_EQ(2 * kMbInBytes, size("com.example/cache/bar/bar2")); 207 EXPECT_EQ(0, size("com.example/cache/bar/bar1")); 208 EXPECT_EQ(0, size("com.example/cache/bar/bar2")); 270 EXPECT_EQ(kMbInBytes, size("com.example/cache/group/file1")); 271 EXPECT_EQ(kMbInBytes, size("com.example/cache/group/file2")); 272 EXPECT_EQ(kMbInBytes, size("com.example/cache/group/dir/file1")); 273 EXPECT_EQ(kMbInBytes, size("com.example/cache/group/dir/file2")); 274 EXPECT_EQ(kMbInBytes, size("co [all...] |
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/perf/ |
H A D | LongStatsCollector.java | 36 public int size() { method in class:LongStatsCollector 37 return mAllValues.size(); 42 if (mAllValues.size() == 0) { 47 int size = mAllValues.size(); 48 long[] buffer = new long[size]; 49 for (int i = 0; i < size; i++) { 55 int midPoint = size / 2; 56 median = (size % 2 == 0) ? (buffer[midPoint - 1] + buffer[midPoint]) / 2 : buffer[midPoint]; 58 return new Stats(mAllValues.size(), mMi [all...] |
/frameworks/native/libs/ui/ |
H A D | FrameStats.cpp | 28 size_t size = timestampSize; local 29 size += 3 * desiredPresentTimesNano.size() * timestampSize; 31 return size; 34 status_t FrameStats::flatten(void* buffer, size_t size) const { 35 if (size < getFlattenedSize()) { 41 size_t frameCount = desiredPresentTimesNano.size(); 57 status_t FrameStats::unflatten(void const* buffer, size_t size) { argument 60 if (size < timestampSize) { 65 size_t frameCount = (size [all...] |
/frameworks/base/core/tests/utiltests/jni/ |
H A D | android_util_MemoryIntArrayTest.cpp | 26 jstring name, jint size) 33 if (size < 0) { 38 const int ashmemSize = sizeof(std::atomic_int) * size; 55 __attribute__((unused)) jobject clazz, jint fd, jint size) 61 if (size < 0) { 65 ioctl(fd, ASHMEM_SET_SIZE, size); 24 android_util_MemoryIntArrayTest_createAshmem(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jobject clazz, jstring name, jint size) argument 54 android_util_MemoryIntArrayTest_setAshmemSize(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jobject clazz, jint fd, jint size) argument
|
/frameworks/base/libs/hwui/ |
H A D | FboCache.cpp | 42 return mCache.size(); 54 for (size_t i = 0; i < mCache.size(); i++) { 63 if (mCache.size() > 0) { 64 fbo = mCache.itemAt(mCache.size() - 1); 65 mCache.removeAt(mCache.size() - 1); 73 if (mCache.size() < mMaxSize) {
|
/frameworks/av/media/mtp/tests/ |
H A D | MtpFfsHandle_test.cpp | 109 int size = TEST_PACKET_SIZE * SMALL_MULT; local 110 char buf[size + 1]; 111 buf[size] = '\0'; 113 mfr.length = size; 118 EXPECT_EQ(write(bulk_out, ss.str().c_str(), size), size); local 121 EXPECT_EQ(read(dummy_file.fd, buf, size), size); local 129 int size = TEST_PACKET_SIZE * MED_MULT; local 130 char buf[size 138 EXPECT_EQ(write(bulk_out, ss.str().c_str(), size), size); local 141 EXPECT_EQ(read(dummy_file.fd, buf, size), size); local 152 int size = TEST_PACKET_SIZE * SMALL_MULT; local 161 EXPECT_EQ(write(dummy_file.fd, ss.str().c_str(), size), size); local 181 int size = TEST_PACKET_SIZE * MED_MULT; local 190 EXPECT_EQ(write(dummy_file.fd, ss.str().c_str(), size), size); local 210 int size = TEST_PACKET_SIZE * MED_MULT; local 217 EXPECT_EQ(write(dummy_file.fd, ss.str().c_str(), size), size); local 249 int size = 0; local [all...] |
/frameworks/base/core/jni/android/graphics/ |
H A D | Utils.cpp | 52 size_t AssetStreamAdaptor::read(void* buffer, size_t size) { argument 56 if (0 == size) { 67 off64_t newOffset = fAsset->seek(size, SEEK_CUR); 69 SkDebugf("---- fAsset->seek(%d) failed\n", size); 74 amount = fAsset->read(buffer, size); 94 const off64_t size = asset->getLength(); local 95 if (size <= 0) { 96 SkDebugf("---- copyAsset: asset->getLength() returned %d\n", size); 100 sk_sp<SkData> data(SkData::MakeUninitialized(size)); 101 const off64_t len = asset->read(data->writable_data(), size); [all...] |
/frameworks/base/obex/javax/obex/ |
H A D | PrivateOutputStream.java | 69 public int size() { method in class:PrivateOutputStream 70 return mArray.size(); 86 if (mArray.size() == mMaxPacketSize) { 110 while ((mArray.size() + remainLength) >= mMaxPacketSize) { 111 int bufferLeft = mMaxPacketSize - mArray.size(); 124 * @param size the size of the array to return 127 public synchronized byte[] readBytes(int size) { argument 128 if (mArray.size() > 0) { 131 byte[] result = new byte[size]; [all...] |
/frameworks/minikin/tests/unittest/ |
H A D | UnicodeUtilsTest.cpp | 27 size_t size; local 28 ParseUnicode(buf, BUF_SIZE, "U+000D U+1F431 | 'a'", &size, &offset); 29 EXPECT_EQ(size, 4u);
|