Home
last modified time | relevance | path

Searched refs:mCache (Results 1 – 25 of 61) sorted by relevance

123

/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/
DRotationCacheTest.java43 private RotationCache<Object, Pair<Object, Integer>> mCache; field in RotationCacheTest
49 mCache = new RotationCache<>((o, rot) -> { in setUp()
57 assertThat(mCache.getOrCompute("hello", 0), equalTo(create("hello", 0))); in getOrCompute_computes()
58 assertThat(mCache.getOrCompute("hello", 1), equalTo(create("hello", 1))); in getOrCompute_computes()
59 assertThat(mCache.getOrCompute("hello", 2), equalTo(create("hello", 2))); in getOrCompute_computes()
60 assertThat(mCache.getOrCompute("hello", 3), equalTo(create("hello", 3))); in getOrCompute_computes()
65 assertNotNull(mCache.getOrCompute("hello", 1)); in getOrCompute_sameParam_sameRot_hitsCache()
68 assertThat(mCache.getOrCompute("hello", 1), equalTo(create("hello", 1))); in getOrCompute_sameParam_sameRot_hitsCache()
74 assertNotNull(mCache.getOrCompute("hello", 3)); in getOrCompute_sameParam_hitsCache_forAllRots()
75 assertNotNull(mCache.getOrCompute("hello", 2)); in getOrCompute_sameParam_hitsCache_forAllRots()
[all …]
/frameworks/native/opengl/tests/EGLTest/
Degl_cache_test.cpp36 mCache = egl_cache_t::get(); in SetUp()
40 mCache->setCacheFilename(""); in TearDown()
41 mCache->terminate(); in TearDown()
44 egl_cache_t* mCache; member in android::EGLCacheTest
49 mCache->setBlob("abcd", 4, "efgh", 4); in TEST_F()
50 ASSERT_EQ(0, mCache->getBlob("abcd", 4, buf, 4)); in TEST_F()
59 mCache->initialize(egl_display_t::get(EGL_DEFAULT_DISPLAY)); in TEST_F()
60 mCache->setBlob("abcd", 4, "efgh", 4); in TEST_F()
61 ASSERT_EQ(4, mCache->getBlob("abcd", 4, buf, 4)); in TEST_F()
70 mCache->initialize(egl_display_t::get(EGL_DEFAULT_DISPLAY)); in TEST_F()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DTaskSnapshotCacheTest.java48 private TaskSnapshotCache mCache; field in TaskSnapshotCacheTest
61 mCache = new TaskSnapshotCache(mWm, mLoader); in setUp()
67 mCache.putSnapshot(window.getTask(), createSnapshot()); in testAppRemoved()
68 assertNotNull(mCache.getSnapshot(window.getTask().mTaskId, 0 /* userId */, in testAppRemoved()
70 mCache.onAppRemoved(window.mActivityRecord); in testAppRemoved()
71 assertNull(mCache.getSnapshot(window.getTask().mTaskId, 0 /* userId */, in testAppRemoved()
78 mCache.putSnapshot(window.getTask(), createSnapshot()); in testAppDied()
79 assertNotNull(mCache.getSnapshot(window.getTask().mTaskId, 0 /* userId */, in testAppDied()
81 mCache.onAppDied(window.mActivityRecord); in testAppDied()
82 assertNull(mCache.getSnapshot(window.getTask().mTaskId, 0 /* userId */, in testAppDied()
[all …]
DTaskSnapshotLowResDisabledTest.java53 private TaskSnapshotCache mCache; field in TaskSnapshotLowResDisabledTest
64 mCache = new TaskSnapshotCache(mWm, mLoader); in setUp()
132 assertNull(mCache.getSnapshot(window.getTask().mTaskId, mWm.mCurrentUserId, in testReduced_notCached()
136 assertNull(mCache.getSnapshot(window.getTask().mTaskId, mWm.mCurrentUserId, in testReduced_notCached()
140 assertNotNull(mCache.getSnapshot(window.getTask().mTaskId, mWm.mCurrentUserId, in testReduced_notCached()
144 assertNull(mCache.getSnapshot(window.getTask().mTaskId, mWm.mCurrentUserId, in testReduced_notCached()
148 assertNull(mCache.getSnapshot(window.getTask().mTaskId, mWm.mCurrentUserId, in testReduced_notCached()
/frameworks/base/core/tests/coretests/src/android/content/res/
DConfigurationBoundResourceCacheTest.java33 ConfigurationBoundResourceCache<Float> mCache; field in ConfigurationBoundResourceCacheTest
42 mCache = new ConfigurationBoundResourceCache<>(); in setUp()
48 assertNull(mCache.getInstance(-1, res, null)); in testGetEmpty()
53 mCache.put(1, null, new DummyFloatConstantState(5f)); in testSetGet()
55 assertEquals(5f, mCache.getInstance(1, res, null)); in testSetGet()
56 assertNotSame(5f, mCache.getInstance(1, res, null)); in testSetGet()
57 assertEquals(null, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGet()
62 mCache.put(1, getActivity().getTheme(), new DummyFloatConstantState(5f)); in testSetGetThemed()
64 assertEquals(null, mCache.getInstance(1, res, null)); in testSetGetThemed()
65 assertEquals(5f, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGetThemed()
[all …]
/frameworks/base/rs/java/android/renderscript/
DScriptIntrinsicLUT.java33 private final byte mCache[] = new byte[1024]; field in ScriptIntrinsicLUT
40 mCache[ct] = (byte)ct; in ScriptIntrinsicLUT()
41 mCache[ct + 256] = (byte)ct; in ScriptIntrinsicLUT()
42 mCache[ct + 512] = (byte)ct; in ScriptIntrinsicLUT()
43 mCache[ct + 768] = (byte)ct; in ScriptIntrinsicLUT()
86 mCache[index] = (byte)value; in setRed()
98 mCache[index+256] = (byte)value; in setGreen()
110 mCache[index+512] = (byte)value; in setBlue()
122 mCache[index+768] = (byte)value; in setAlpha()
148 mTables.copyFromUnchecked(mCache); in forEach()
/frameworks/rs/support/java/src/androidx/renderscript/
DScriptIntrinsicLUT.java35 private final byte mCache[] = new byte[1024]; field in ScriptIntrinsicLUT
65 si.mCache[ct] = (byte)ct; in create()
66 si.mCache[ct + 256] = (byte)ct; in create()
67 si.mCache[ct + 512] = (byte)ct; in create()
68 si.mCache[ct + 768] = (byte)ct; in create()
92 mCache[index] = (byte)value;
104 mCache[index+256] = (byte)value;
116 mCache[index+512] = (byte)value;
128 mCache[index+768] = (byte)value;
143 mTables.copyFromUnchecked(mCache);
/frameworks/av/media/bufferpool/2.0/
DBufferPoolClient.cpp145 } mCache; member in android::hardware::media::bufferpool::V2_0::implementation::BufferPoolClient::Impl
189 std::weak_ptr<BufferPoolData> mCache; member
225 std::shared_ptr<BufferPoolData> cache = mCache.lock(); in fetchCache()
244 mCache = cache; in createCache()
325 std::lock_guard<std::mutex> lock(mCache.mLock); in isActive()
328 *lastTransactionUs = mCache.mLastChangeUs; in isActive()
329 active = mCache.mActive > 0; in isActive()
339 std::lock_guard<std::mutex> lock(mCache.mLock); in receiveInvalidation()
349 std::unique_lock<std::mutex> lock(mCache.mLock); in flush()
369 std::unique_lock<std::mutex> lock(mCache.mLock); in allocate()
[all …]
DClientManager.cpp149 } mCache; member in android::hardware::media::bufferpool::V2_0::implementation::ClientManager::Impl
173 std::unique_lock<std::mutex> lock(mCache.mMutex); in registerSender()
174 for (auto it = mCache.mClients.begin(); it != mCache.mClients.end(); ++it) { in registerSender()
186 mCache.mClients.erase(it); in registerSender()
190 if (!mCache.mConnecting) { in registerSender()
191 mCache.mConnecting = true; in registerSender()
205 mCache.mClients.push_back(std::make_pair(accessor, wclient)); in registerSender()
215 mCache.mConnecting = false; in registerSender()
217 mCache.mConnectCv.notify_all(); in registerSender()
220 mCache.mConnectCv.wait_for( in registerSender()
[all …]
/frameworks/opt/bitmap/src/com/android/bitmap/
DUnrefedPooledCache.java46 private final LinkedHashMap<K, V> mCache; field in UnrefedPooledCache
60 mCache = new LinkedHashMap<K, V>(0, 0.75f, true); in UnrefedPooledCache()
74 synchronized (mCache) { in get()
75 V result = mCache.get(key); in get()
95 synchronized (mCache) { in put()
98 prev = mCache.put(key, value); in put()
129 synchronized (mCache) { in poll()
132 for (Map.Entry<K, V> entry : mCache.entrySet()) { in poll()
155 mCache.remove(eldestUnref.getKey()); in poll()
175 synchronized (mCache) { in toDebugString()
[all …]
/frameworks/av/media/bufferpool/1.0/
DBufferPoolClient.cpp130 } mCache; member in android::hardware::media::bufferpool::V1_0::implementation::BufferPoolClient::Impl
171 std::weak_ptr<BufferPoolData> mCache; member
204 std::shared_ptr<BufferPoolData> cache = mCache.lock(); in fetchCache()
223 mCache = cache; in createCache()
288 std::lock_guard<std::mutex> lock(mCache.mLock); in isActive()
291 *lastTransactionUs = mCache.mLastChangeUs; in isActive()
292 active = mCache.mActive > 0; in isActive()
314 std::unique_lock<std::mutex> lock(mCache.mLock); in allocate()
317 auto cacheIt = mCache.mBuffers.find(bufferId); in allocate()
318 if (cacheIt != mCache.mBuffers.end()) { in allocate()
[all …]
DClientManager.cpp145 } mCache; member in android::hardware::media::bufferpool::V1_0::implementation::ClientManager::Impl
166 std::unique_lock<std::mutex> lock(mCache.mMutex); in registerSender()
167 for (auto it = mCache.mClients.begin(); it != mCache.mClients.end(); ++it) { in registerSender()
179 mCache.mClients.erase(it); in registerSender()
183 if (!mCache.mConnecting) { in registerSender()
184 mCache.mConnecting = true; in registerSender()
198 mCache.mClients.push_back(std::make_pair(accessor, wclient)); in registerSender()
207 mCache.mConnecting = false; in registerSender()
209 mCache.mConnectCv.notify_all(); in registerSender()
212 mCache.mConnectCv.wait_for( in registerSender()
[all …]
/frameworks/base/core/java/android/widget/
DRemoteViewsAdapter.java112 private final FixedSizeRemoteViewsCache mCache; field in RemoteViewsAdapter
283 synchronized (adapter.mCache) { in handleMessage()
284 adapter.mCache.reset(); in handleMessage()
291 synchronized (adapter.mCache.getTemporaryMetaData()) { in handleMessage()
292 newCount = adapter.mCache.getTemporaryMetaData().count; in handleMessage()
321 final int position = adapter.mCache.getNextIndexToLoad(); in handleMessage()
372 private final FixedSizeRemoteViewsCache mCache; field in RemoteViewsAdapter.RemoteViewsFrameLayout
378 mCache = cache; in RemoteViewsFrameLayout()
401 int viewHeight = mCache.getMetaData().getLoadingTemplate(getContext()).defaultHeight; in getDefaultView()
873 mCache = new FixedSizeRemoteViewsCache(DEFAULT_CACHE_SIZE, config); in RemoteViewsAdapter()
[all …]
/frameworks/base/services/core/java/com/android/server/hdmi/
DHdmiCecMessageCache.java39 private final SparseArray<SparseArray<HdmiCecMessage>> mCache = new SparseArray<>(); field in HdmiCecMessageCache
54 SparseArray<HdmiCecMessage> messages = mCache.get(address); in getMessage()
68 mCache.remove(address); in flushMessagesFrom()
75 mCache.clear(); in flushAll()
91 SparseArray<HdmiCecMessage> messages = mCache.get(source); in cacheMessage()
94 mCache.put(source, messages); in cacheMessage()
/frameworks/base/services/core/java/com/android/server/location/settings/
DSettingsStore.java58 private T mCache; field in SettingsStore
87 mCache = read(is.readInt(), is); in initializeCache()
88 Preconditions.checkState(mCache.getVersion() < VERSION_DOES_NOT_EXIST); in initializeCache()
95 if (mCache == null) { in initializeCache()
97 mCache = read(VERSION_DOES_NOT_EXIST, in initializeCache()
99 Preconditions.checkState(mCache.getVersion() < VERSION_DOES_NOT_EXIST); in initializeCache()
111 return mCache;
117 T oldSettings = mCache;
123 mCache = newSettings;
124 Preconditions.checkState(mCache.getVersion() < VERSION_DOES_NOT_EXIST);
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/
DNotificationInlineImageCache.java38 private final ConcurrentHashMap<Uri, PreloadImageTask> mCache; field in NotificationInlineImageCache
41 mCache = new ConcurrentHashMap<>(); in NotificationInlineImageCache()
51 return mCache.containsKey(uri); in hasEntry()
58 mCache.put(uri, newTask); in preload()
65 result = mCache.get(uri).get(timeoutMs, TimeUnit.MILLISECONDS); in get()
76 mCache.entrySet().removeIf(entry -> !wantedSet.contains(entry.getKey())); in purge()
81 mCache.forEach((key, value) -> { in cancelRunningTasks()
/frameworks/av/media/libdatasource/
DNuCachedSource2.cpp189 mCache(new PageCache(kPageSize)), in NuCachedSource2()
235 delete mCache; in ~NuCachedSource2()
236 mCache = NULL; in ~NuCachedSource2()
343 mSource->reconnectAtOffset(mCacheOffset + mCache->totalSize()); in fetchInternal()
364 PageCache::Page *page = mCache->acquirePage(); in fetchInternal()
367 mCacheOffset + mCache->totalSize(), page->mData, kPageSize); in fetchInternal()
377 mCache->releasePage(page); in fetchInternal()
387 mCache->releasePage(page); in fetchInternal()
396 mCache->appendPage(page); in fetchInternal()
423 if (mFetching && mCache->totalSize() >= mHighwaterThresholdBytes) { in onFetch()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/utils/
DRotationCache.java34 private final SparseArray<R> mCache = new SparseArray<>(4); field in RotationCache
50 mCache.clear(); in getOrCompute()
53 final int idx = mCache.indexOfKey(rotation); in getOrCompute()
55 return mCache.valueAt(idx); in getOrCompute()
58 mCache.put(rotation, result); in getOrCompute()
/frameworks/native/services/surfaceflinger/CompositionEngine/tests/
DHwcBufferCacheTest.cpp42 mCache.getHwcBuffer(inSlot, mBuffer1, &outSlot, &outBuffer); in testSlot()
47 mCache.getHwcBuffer(inSlot, mBuffer1, &outSlot, &outBuffer); in testSlot()
52 mCache.getHwcBuffer(inSlot, mBuffer2, &outSlot, &outBuffer); in testSlot()
57 mCache.getHwcBuffer(inSlot, mBuffer2, &outSlot, &outBuffer); in testSlot()
63 mCache.getHwcBuffer(inSlot, sp<GraphicBuffer>(), &outSlot, &outBuffer); in testSlot()
68 impl::HwcBufferCache mCache; member in android::compositionengine::__anonb6c3f11f0111::HwcBufferCacheTest
/frameworks/base/services/core/java/com/android/server/am/
DPlatformCompatCache.java148 private final ArrayMap<String, Pair<Boolean, WeakReference<ApplicationInfo>>> mCache = field in PlatformCompatCache.CacheItem
159 final int index = mCache.indexOfKey(app.packageName); in isChangeEnabled()
164 p = mCache.valueAt(index); in isChangeEnabled()
175 mCache.remove(app.packageName); in invalidate()
185 mCache.setValueAt(index, p); in fetchLocked()
187 mCache.put(app.packageName, p); in fetchLocked()
194 final int index = mCache.indexOfKey(app.packageName); in onApplicationInfoChanged()
204 final int index = mCache.indexOfKey(packageName); in onCompatChange()
206 final ApplicationInfo app = mCache.valueAt(index).second.get(); in onCompatChange()
210 mCache.removeAt(index); in onCompatChange()
/frameworks/native/services/surfaceflinger/CompositionEngine/src/
DClientCompositionRequestCache.cpp92 for (const auto& [cachedBufferId, cachedRequest] : mCache) { in exists()
104 for (auto& [cachedBufferId, cachedRequest] : mCache) { in add()
111 if (mCache.size() >= mMaxCacheSize) { in add()
112 mCache.pop_front(); in add()
115 mCache.emplace_back(bufferId, std::move(request)); in add()
119 for (auto it = mCache.begin(); it != mCache.end(); it++) { in remove()
121 mCache.erase(it); in remove()
/frameworks/base/services/core/java/com/android/server/locksettings/
DLockSettingsStorage.java108 private final Cache mCache = new Cache(); field in LockSettingsStorage
173 mCache.putKeyValue(key, value, userId); in writeKeyValue()
183 synchronized (mCache) { in readKeyValue()
184 if (mCache.hasKeyValue(key, userId)) { in readKeyValue()
185 return mCache.peekKeyValue(key, defaultValue, userId); in readKeyValue()
187 version = mCache.getVersion(); in readKeyValue()
202 mCache.putKeyValueIfUnchanged(key, result, userId, version); in readKeyValue()
221 mCache.removeKey(key, userId); in removeKey()
230 synchronized (mCache) { in prefetchUser()
231 if (mCache.isFetched(userId)) { in prefetchUser()
[all …]
/frameworks/minikin/include/minikin/
DBoundsCache.h49 mCache.clear(); in clear()
64 BoundsValue* value = mCache.get(key); in getOrCreate()
78 mCache.put(key, ve.value.release()); in getOrCreate()
91 BoundsCache(uint32_t maxEntries) : mCache(maxEntries) { in BoundsCache()
92 mCache.setOnEntryRemovedListener(this); in BoundsCache()
103 android::LruCache<LayoutCacheKey, BoundsValue*> mCache GUARDED_BY(mMutex) GUARDED_BY(mMutex);
/frameworks/base/core/java/android/service/selectiontoolbar/
DSelectionToolbarRenderService.java64 private final SparseArray<Pair<RemoteCallbackWrapper, CleanCacheRunnable>> mCache = field in SelectionToolbarRenderService
75 if (mCache.indexOfKey(callingUid) < 0) {
76 mCache.put(callingUid, new Pair<>(new RemoteCallbackWrapper(callback),
79 Pair<RemoteCallbackWrapper, CleanCacheRunnable> toolbarPair = mCache.get(callingUid);
98 Pair<RemoteCallbackWrapper, CleanCacheRunnable> toolbarPair = mCache.get(callingUid);
101 mCache.remove(callingUid);
239 Pair<RemoteCallbackWrapper, CleanCacheRunnable> toolbarPair = mCache.get(mCleanUid); in run()
242 mCache.remove(mCleanUid); in run()
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DFrameManager.java58 private BackingCache mCache; field in FrameManager
294 mCache.setSize(bytes); in setCacheSize()
303 return mCache.getSize(); in getCacheSize()
380 mCache.clear(); in clearCache()
396 mCache = new BackingCacheNone(); in FrameManager()
399 mCache = new BackingCacheLru(); in FrameManager()
402 mCache = new BackingCacheLfu(); in FrameManager()
410 return mCache.fetchBacking(mode, access, dimensions, elemSize); in fetchBacking()
421 if (!backing.shouldCache() || !mCache.cacheBacking(backing)) { in onBackingAvailable()
436 mCache.clear(); in destroyBackings()

123