Searched refs:pool (Results 1 - 25 of 52) sorted by relevance

123

/frameworks/base/libs/hwui/tests/unit/
H A DOffscreenBufferPoolTests.cpp72 OffscreenBufferPool pool; local
73 EXPECT_EQ(0u, pool.getCount()) << "pool must be created empty";
74 EXPECT_EQ(0u, pool.getSize()) << "pool must be created empty";
76 EXPECT_EQ(DeviceInfo::multiplyByResolution(4 * 4), pool.getMaxSize());
80 OffscreenBufferPool pool; local
82 auto layer = pool.get(renderThread.renderState(), 100u, 200u);
86 ASSERT_LT(layer->getSizeInBytes(), pool.getMaxSize());
88 pool
103 OffscreenBufferPool pool; local
144 OffscreenBufferPool pool; local
179 OffscreenBufferPool pool; local
216 OffscreenBufferPool pool; local
227 OffscreenBufferPool pool; local
[all...]
/frameworks/support/v7/recyclerview/src/androidTest/java/androidx/recyclerview/widget/
H A DRecycledViewPoolTest.java44 RecyclerView.RecycledViewPool pool = new RecyclerView.RecycledViewPool();
45 assertEquals(0, pool.getRecycledViewCount(0));
46 assertEquals(0, pool.size());
57 RecyclerView.RecycledViewPool pool = new RecyclerView.RecycledViewPool();
58 pool.putRecycledView(makeHolder(0));
59 pool.putRecycledView(makeHolder(1));
60 pool.putRecycledView(makeHolder(2));
61 pool.putRecycledView(makeHolder(2));
63 assertEquals(1, pool.getRecycledViewCount(0));
64 assertEquals(1, pool
[all...]
/frameworks/base/tools/aapt2/
H A DStringPool_test.cpp37 StringPool pool; local
39 StringPool::Ref ref = pool.MakeRef("wut");
44 StringPool pool; local
46 StringPool::Ref ref_a = pool.MakeRef("wut");
47 StringPool::Ref ref_b = pool.MakeRef("hey");
54 StringPool pool; local
56 StringPool::Ref ref_a = pool.MakeRef("wut");
57 StringPool::Ref ref_b = pool.MakeRef("wut");
61 EXPECT_THAT(pool.size(), Eq(1u));
65 StringPool pool; local
76 StringPool pool; local
88 StringPool pool; local
115 StringPool pool; local
143 StringPool pool; local
161 StringPool pool; local
175 StringPool pool; local
186 StringPool pool; local
205 StringPool pool; local
218 StringPool pool; local
244 StringPool pool; local
312 StringPool pool; local
[all...]
H A DResourceValues_test.cpp40 StringPool pool; local
43 a.values[Plural::One] = util::make_unique<String>(pool.MakeRef("one"));
44 a.values[Plural::Other] = util::make_unique<String>(pool.MakeRef("other"));
47 b.values[Plural::One] = util::make_unique<String>(pool.MakeRef("une"));
48 b.values[Plural::Other] = util::make_unique<String>(pool.MakeRef("autre"));
51 c.values[Plural::One] = util::make_unique<String>(pool.MakeRef("one"));
52 c.values[Plural::Other] = util::make_unique<String>(pool.MakeRef("other"));
59 StringPool pool; local
62 a.values[Plural::One] = util::make_unique<String>(pool.MakeRef("one"));
63 a.values[Plural::Other] = util::make_unique<String>(pool
70 StringPool pool; local
94 StringPool pool; local
105 StringPool pool; local
203 StringPool pool; local
[all...]
H A DStringPool.cpp251 void StringPool::Merge(StringPool&& pool) { argument
252 // First, change the owning pool for the incoming strings.
253 for (std::unique_ptr<Entry>& entry : pool.strings_) {
258 std::move(pool.styles_.begin(), pool.styles_.end(), std::back_inserter(styles_));
259 pool.styles_.clear();
260 std::move(pool.strings_.begin(), pool.strings_.end(), std::back_inserter(strings_));
261 pool.strings_.clear();
262 indexed_strings_.insert(pool
434 Flatten(BigBuffer* out, const StringPool& pool, bool utf8, IDiagnostics* diag) argument
503 FlattenUtf8(BigBuffer* out, const StringPool& pool, IDiagnostics* diag) argument
507 FlattenUtf16(BigBuffer* out, const StringPool& pool, IDiagnostics* diag) argument
[all...]
H A DStringPool.h49 // style data is stored as an array indexed by the same indices as the main string pool array.
156 static bool FlattenUtf8(BigBuffer* out, const StringPool& pool, IDiagnostics* diag);
157 static bool FlattenUtf16(BigBuffer* out, const StringPool& pool, IDiagnostics* diag);
163 // Adds a string to the pool, unless it already exists. Returns a reference to the string in the
164 // pool.
167 // Adds a string to the pool, unless it already exists, with a context object that can be used
168 // when sorting the string pool. Returns a reference to the string in the pool.
171 // Adds a string from another string pool. Returns a reference to the string in the string pool
[all...]
/frameworks/base/core/tests/coretests/src/android/database/sqlite/
H A DSQLiteConnectionPoolTest.java75 SQLiteConnectionPool pool = SQLiteConnectionPool.open(mTestConf);
76 pool.setupIdleConnectionHandler(thread.getLooper(), 100);
77 SQLiteConnection c1 = pool.acquireConnection("pragma user_version", 0, null);
79 pool.releaseConnection(c1);
80 SQLiteConnection c2 = pool.acquireConnection("pragma user_version", 0, null);
82 pool.releaseConnection(c2);
84 SQLiteConnection c3 = pool.acquireConnection("pragma user_version", 0, null);
87 pool.releaseConnection(c3);
88 pool.close();
/frameworks/base/tools/aapt2/compile/
H A DPseudolocaleGenerator.h27 StyledString* string, Pseudolocalizer::Method method, StringPool* pool);
H A DPseudolocaleGenerator_test.cpp25 StringPool pool; local
31 util::make_unique<StyledString>(pool.MakeRef(original_style)).get(),
32 Pseudolocalizer::Method::kNone, &pool);
52 util::make_unique<StyledString>(pool.MakeRef(original_style)).get(),
53 Pseudolocalizer::Method::kAccent, &pool);
72 StringPool pool; local
78 util::make_unique<StyledString>(pool.MakeRef(original_style)).get(),
79 Pseudolocalizer::Method::kAccent, &pool);
94 StringPool pool; local
100 util::make_unique<StyledString>(pool
116 StringPool pool; local
155 StringPool pool; local
[all...]
H A DPseudolocaleGenerator.cpp113 StringPool* pool) {
213 return util::make_unique<StyledString>(pool->MakeRef(localized));
224 Visitor(StringPool* pool, Pseudolocalizer::Method method) argument
225 : pool_(pool), method_(method), localizer_(method) {}
315 StringPool* pool, ResourceEntry* entry) {
316 Visitor visitor(pool, method);
111 PseudolocalizeStyledString(StyledString* string, Pseudolocalizer::Method method, StringPool* pool) argument
313 PseudolocalizeIfNeeded(const Pseudolocalizer::Method method, ResourceConfigValue* original_value, StringPool* pool, ResourceEntry* entry) argument
/frameworks/base/media/mca/filterfw/jni/
H A Djni_util.h102 // Return the shared instance to this type's pool.
107 // Delete this type's pool.
112 // Register a new C++ object with the pool. This does not affect the Java
114 // assignments. Pass true to owns if the object pool owns the object.
123 // Return the object in the pool with the specified ID.
141 // object. Pass true to owns if the object pool owns the object.
151 // Remove the object with the given ID from this pool, and delete it. This
215 ObjectPool<T>* pool = ObjectPool<T>::Instance(); local
216 return pool ? pool
235 ObjectPool<T>* pool = ObjectPool<T>::Instance(); local
249 ObjectPool<T>* pool = ObjectPool<T>::Instance(); local
259 ObjectPool<T>* pool = ObjectPool<T>::Instance(); local
[all...]
/frameworks/base/tools/aapt/
H A DStringPool.cpp47 void printStringPool(const ResStringPool* pool) argument
49 if (pool->getError() == NO_INIT) {
50 printf("String pool is unitialized.\n");
52 } else if (pool->getError() != NO_ERROR) {
53 printf("String pool is corrupt/invalid.\n");
58 const size_t N = pool->size();
61 if (pool->isUTF8()) {
62 uniqueStrings.add(pool->string8At(i, &len));
64 uniqueStrings.add(pool->stringAt(i, &len));
68 printf("String pool o
[all...]
H A DStringPool.h31 void printStringPool(const ResStringPool* pool);
35 * generating the string pool resource data structure that can be parsed with
88 * Add a new string to the pool. If mergeDuplicates is true, thenif
120 status_t writeStringBlock(const sp<AaptFile>& pool);
123 * Find out an offset in the pool for a particular string. If the string
124 * pool is sorted, this can not be called until after createStringBlock()
127 * multiple times in the pool, the first offset will be returned. Returns
133 * Find all of the offsets in the pool for a particular string. If the
134 * string pool is sorted, this can not be called until after
147 const StringPool& pool; member in class:StringPool::ConfigSorter
[all...]
/frameworks/base/libs/androidfw/tests/
H A DCommonHelpers.cpp60 std::string GetStringFromPool(const ResStringPool* pool, uint32_t idx) { argument
61 String8 str = pool->string8ObjectAt(idx);
H A DIdmap_test.cpp67 const ResStringPool* pool = target_table_.getTableStringBlock(block); local
68 ASSERT_TRUE(pool != NULL);
69 ASSERT_LT(val.data, pool->size());
72 const char16_t* target_str16 = pool->stringAt(val.data, &str_len);
83 pool = target_table_.getTableStringBlock(new_block);
84 ASSERT_TRUE(pool != NULL);
85 ASSERT_LT(val.data, pool->size());
87 target_str16 = pool->stringAt(val.data, &str_len);
H A DTestHelpers.cpp72 const ResStringPool* pool = table.getTableStringBlock(block); local
73 if (pool == NULL) {
74 return AssertionFailure() << "table has no string pool for block " << block;
77 const String8 actual_str = pool->string8ObjectAt(val.data);
H A DCommonHelpers.h37 std::string GetStringFromPool(const ResStringPool* pool, uint32_t idx);
/frameworks/minikin/libs/minikin/
H A DWordBreaker.h62 // An singleton implementation of the ICU line breaker pool.
70 static ICULineBreakerPoolImpl pool; local
71 return pool;
126 // Caller must release the pool.
127 WordBreaker(ICULineBreakerPool* pool);
/frameworks/base/tools/aapt2/format/proto/
H A DProtoSerialize.h49 void SerializeStringPoolToPb(const StringPool& pool, pb::StringPool* out_pb_pool, IDiagnostics* diag);
/frameworks/minikin/tests/unittest/
H A DWordBreakerTests.cpp566 TestableICULineBreakerPoolImpl pool; local
572 ICULineBreakerPool::Slot enUSBreaker = pool.acquire(enUS);
573 ICULineBreakerPool::Slot enUSBreaker2 = pool.acquire(enUS);
574 ICULineBreakerPool::Slot frFRBreaker = pool.acquire(frFR);
590 TestableICULineBreakerPoolImpl pool; local
596 ICULineBreakerPool::Slot enUSBreaker = pool.acquire(enUS);
601 pool.release(std::move(enUSBreaker));
605 ICULineBreakerPool::Slot frFRBreaker = pool.acquire(frFR);
610 ICULineBreakerPool::Slot enUSBreaker2 = pool.acquire(enUS);
617 TestableICULineBreakerPoolImpl pool; local
[all...]
/frameworks/base/tools/aapt2/format/binary/
H A DXmlFlattener.cpp67 StringPool pool;
178 StringFlattenDest{pool.MakeRef(str, StringPool::Context(priority)), dest});
323 // Merge the package pools into the main pool.
325 visitor.pool.Merge(std::move(package_pool_entry.second));
328 // Sort the string pool so that attribute resource IDs show up first.
329 visitor.pool.Sort([](const StringPool::Context& a, const StringPool::Context& b) -> int {
333 // Now we flatten the string pool references into the correct places.
344 StringPool::FlattenUtf16(buffer_, visitor.pool, context->GetDiagnostics());
346 StringPool::FlattenUtf8(buffer_, visitor.pool, context->GetDiagnostics());
353 for (const auto& str : visitor.pool
[all...]
/frameworks/base/core/java/android/net/
H A DNetworkStats.java1133 Entry pool = tunGetPool(tunIfaceTotal, underlyingIfaceTotal);
1134 if (pool.isEmpty()) {
1138 addTrafficToApplications(tunUid, tunIface, underlyingIface, tunIfaceTotal, pool);
1184 Entry pool = new Entry();
1185 pool.rxBytes = Math.min(tunIfaceTotal.rxBytes, underlyingIfaceTotal.rxBytes);
1186 pool.rxPackets = Math.min(tunIfaceTotal.rxPackets, underlyingIfaceTotal.rxPackets);
1187 pool.txBytes = Math.min(tunIfaceTotal.txBytes, underlyingIfaceTotal.txBytes);
1188 pool.txPackets = Math.min(tunIfaceTotal.txPackets, underlyingIfaceTotal.txPackets);
1189 pool.operations = Math.min(tunIfaceTotal.operations, underlyingIfaceTotal.operations);
1190 return pool;
1193 addTrafficToApplications(int tunUid, String tunIface, String underlyingIface, Entry tunIfaceTotal, Entry pool) argument
[all...]
/frameworks/base/tools/aapt2/util/
H A DUtil.cpp412 StringPiece16 GetString16(const android::ResStringPool& pool, size_t idx) { argument
414 const char16_t* str = pool.stringAt(idx, &len);
421 std::string GetString(const android::ResStringPool& pool, size_t idx) { argument
423 const char* str = pool.string8At(idx, &len);
427 return Utf16ToUtf8(GetString16(pool, idx));
/frameworks/native/vulkan/nulldrv/
H A Dnull_driver.cpp717 CommandPool* pool = static_cast<CommandPool*>(allocator->pfnAllocation( local
720 if (!pool)
722 pool->allocator = *allocator;
723 *cmd_pool = GetHandleToCommandPool(pool);
730 CommandPool* pool = GetCommandPoolFromHandle(cmd_pool); local
731 pool->allocator.pfnFree(pool->allocator.pUserData, pool);
741 CommandPool& pool = *GetCommandPoolFromHandle(alloc_info->commandPool); local
745 static_cast<VkCommandBuffer_T*>(pool
768 CommandPool& pool = *GetCommandPoolFromHandle(cmd_pool); local
980 CreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo*, const VkAllocationCallbacks* , VkDescriptorPool* pool) argument
1077 CreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo*, const VkAllocationCallbacks* , VkQueryPool* pool) argument
[all...]
/frameworks/base/core/java/com/android/internal/util/function/pooled/
H A DPooledLambdaImpl.java148 Pool pool = (mFlags & FLAG_ACQUIRED_FROM_MESSAGE_CALLBACKS_POOL) != 0
157 pool.release(this);
397 static <E extends PooledLambda> E acquire(Pool pool, Object func, argument
400 PooledLambdaImpl r = acquire(pool);
437 static PooledLambdaImpl acquire(Pool pool) { argument
438 PooledLambdaImpl r = pool.acquire();
442 pool == sMessageCallbacksPool ? 1 : 0);

Completed in 348 milliseconds

123