Home
last modified time | relevance | path

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

123

/frameworks/native/opengl/tests/EGLTest/
Degl_cache_test.cpp32 mCache = egl_cache_t::get(); in SetUp()
36 mCache->setCacheFilename(""); in TearDown()
37 mCache->terminate(); in TearDown()
40 egl_cache_t* mCache; member in android::EGLCacheTest
45 mCache->setBlob("abcd", 4, "efgh", 4); in TEST_F()
46 ASSERT_EQ(0, mCache->getBlob("abcd", 4, buf, 4)); in TEST_F()
55 mCache->initialize(egl_display_t::get(EGL_DEFAULT_DISPLAY)); in TEST_F()
56 mCache->setBlob("abcd", 4, "efgh", 4); in TEST_F()
57 ASSERT_EQ(4, mCache->getBlob("abcd", 4, buf, 4)); in TEST_F()
66 mCache->initialize(egl_display_t::get(EGL_DEFAULT_DISPLAY)); in TEST_F()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/res/
DConfigurationBoundResourceCacheTest.java30 ConfigurationBoundResourceCache<Float> mCache; field in ConfigurationBoundResourceCacheTest
39 mCache = new ConfigurationBoundResourceCache<>(); in setUp()
45 assertNull(mCache.getInstance(-1, res, null)); in testGetEmpty()
50 mCache.put(1, null, new DummyFloatConstantState(5f)); in testSetGet()
52 assertEquals(5f, mCache.getInstance(1, res, null)); in testSetGet()
53 assertNotSame(5f, mCache.getInstance(1, res, null)); in testSetGet()
54 assertEquals(null, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGet()
59 mCache.put(1, getActivity().getTheme(), new DummyFloatConstantState(5f)); in testSetGetThemed()
61 assertEquals(null, mCache.getInstance(1, res, null)); in testSetGetThemed()
62 assertEquals(5f, mCache.getInstance(1, res, getActivity().getTheme())); in testSetGetThemed()
[all …]
/frameworks/base/libs/hwui/
DFboCache.cpp42 return mCache.size(); in getSize()
54 for (size_t i = 0; i < mCache.size(); i++) { in clear()
55 const GLuint fbo = mCache.itemAt(i); in clear()
58 mCache.clear(); in clear()
63 if (mCache.size() > 0) { in get()
64 fbo = mCache.itemAt(mCache.size() - 1); in get()
65 mCache.removeAt(mCache.size() - 1); in get()
73 if (mCache.size() < mMaxSize) { in put()
74 mCache.add(fbo); in put()
DResourceCache.cpp33 for (size_t i = 0; i < mCache->size(); ++i) { in logCache()
34 ResourceReference* ref = mCache->valueAt(i); in logCache()
36 i, mCache->keyAt(i), mCache->valueAt(i)); in logCache()
44 mCache = new KeyedVector<const void*, ResourceReference*>(); in ResourceCache()
49 delete mCache; in ~ResourceCache()
70 ssize_t index = mCache->indexOfKey(resource); in incrementRefcountLocked()
71 ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : nullptr; in incrementRefcountLocked()
72 if (ref == nullptr || mCache->size() == 0) { in incrementRefcountLocked()
74 mCache->add(resource, ref); in incrementRefcountLocked()
89 ssize_t index = mCache->indexOfKey(resource); in decrementRefcountLocked()
[all …]
DLayerCache.cpp46 return mCache.size(); in getCount()
85 for (auto entry : mCache) { in clear()
88 mCache.clear(); in clear()
95 auto iter = mCache.find(entry); in get()
97 if (iter != mCache.end()) { in get()
99 mCache.erase(iter); in get()
125 for (auto entry : mCache) { in dump()
138 Layer* victim = mCache.begin()->mLayer; in put()
140 mCache.erase(mCache.begin()); in put()
150 mCache.insert(entry); in put()
DTextureCache.cpp36 : mCache(LruCache<uint32_t, Texture*>::kUnlimitedCapacity) in TextureCache()
41 mCache.setOnEntryRemovedListener(this); in TextureCache()
50 mCache.clear(); in ~TextureCache()
92 LruCache<uint32_t, Texture*>::Iterator iter(mCache); in resetMarkInUse()
119 Texture* texture = mCache.get(bitmap->pixelRef()->getStableID()); in getCachedTexture()
130 Texture* oldest = mCache.peekOldestValue(); in getCachedTexture()
132 mCache.removeOldest(); in getCachedTexture()
150 mCache.put(bitmap->pixelRef()->getStableID(), texture); in getCachedTexture()
203 mCache.remove(pixelRefId); in clearGarbage()
209 mCache.clear(); in clear()
[all …]
DRenderBufferCache.cpp91 for (auto entry : mCache) { in clear()
94 mCache.clear(); in clear()
101 auto iter = mCache.find(entry); in get()
103 if (iter != mCache.end()) { in get()
105 mCache.erase(iter); in get()
131 RenderBuffer* victim = mCache.begin()->mBuffer; in put()
133 mCache.erase(mCache.begin()); in put()
138 mCache.insert(entry); in put()
DTextDropShadowCache.cpp100 : mCache(LruCache<ShadowText, ShadowTexture*>::kUnlimitedCapacity) in TextDropShadowCache()
103 mCache.setOnEntryRemovedListener(this); in TextDropShadowCache()
108 mCache.clear(); in ~TextDropShadowCache()
145 mCache.clear(); in clear()
151 ShadowTexture* texture = mCache.get(entry); in get()
176 LOG_ALWAYS_FATAL_IF(!mCache.removeOldest(), in get()
178 PRIu32 ", mCache.size() = %zu", mSize, mCache.size()); in get()
196 mCache.put(entry, texture); in get()
DPatchCache.cpp37 , mCache(LruCache<PatchDescription, Patch*>::kUnlimitedCapacity) in PatchCache()
91 LruCache<PatchDescription, Patch*>::Iterator i(mCache); in clearCache()
95 mCache.clear(); in clearCache()
107 LruCache<PatchDescription, Patch*>::Iterator i(mCache); in remove()
161 mCache.remove(*pair.getFirst()); in clearGarbage()
244 const Patch* mesh = mCache.get(description); in get()
259 mCache.put(description, newMesh); in get()
/frameworks/base/rs/java/android/renderscript/
DScriptIntrinsicLUT.java28 private final byte mCache[] = new byte[1024]; field in ScriptIntrinsicLUT
35 mCache[ct] = (byte)ct; in ScriptIntrinsicLUT()
36 mCache[ct + 256] = (byte)ct; in ScriptIntrinsicLUT()
37 mCache[ct + 512] = (byte)ct; in ScriptIntrinsicLUT()
38 mCache[ct + 768] = (byte)ct; in ScriptIntrinsicLUT()
77 mCache[index] = (byte)value; in setRed()
89 mCache[index+256] = (byte)value; in setGreen()
101 mCache[index+512] = (byte)value; in setBlue()
113 mCache[index+768] = (byte)value; in setAlpha()
139 mTables.copyFromUnchecked(mCache); in forEach()
/frameworks/support/v8/renderscript/java/src/android/support/v8/renderscript/
DScriptIntrinsicLUT.java30 private final byte mCache[] = new byte[1024]; field in ScriptIntrinsicLUT
60 si.mCache[ct] = (byte)ct; in create()
61 si.mCache[ct + 256] = (byte)ct; in create()
62 si.mCache[ct + 512] = (byte)ct; in create()
63 si.mCache[ct + 768] = (byte)ct; in create()
87 mCache[index] = (byte)value;
99 mCache[index+256] = (byte)value;
111 mCache[index+512] = (byte)value;
123 mCache[index+768] = (byte)value;
138 mTables.copyFromUnchecked(mCache);
/frameworks/base/core/java/android/widget/
DRemoteViewsAdapter.java82 private final FixedSizeRemoteViewsCache mCache; field in RemoteViewsAdapter
234 synchronized (adapter.mCache) { in onServiceConnected()
235 adapter.mCache.commitTemporaryMetaData(); in onServiceConnected()
292 private final FixedSizeRemoteViewsCache mCache; field in RemoteViewsAdapter.RemoteViewsFrameLayout
296 mCache = cache; in RemoteViewsFrameLayout()
311 return mCache.getMetaData().createDefaultLoadingView(this); in getDefaultView()
815 mCache = sCachedRemoteViewsCaches.get(key); in RemoteViewsAdapter()
816 synchronized (mCache.mMetaData) { in RemoteViewsAdapter()
817 if (mCache.mMetaData.count > 0) { in RemoteViewsAdapter()
824 mCache = new FixedSizeRemoteViewsCache(sDefaultCacheSize); in RemoteViewsAdapter()
[all …]
/frameworks/base/services/core/java/com/android/server/
DLockSettingsStorage.java72 private final Cache mCache = new Cache(); field in LockSettingsStorage
124 mCache.putKeyValue(key, value, userId); in writeKeyValue()
133 synchronized (mCache) { in readKeyValue()
134 if (mCache.hasKeyValue(key, userId)) { in readKeyValue()
135 return mCache.peekKeyValue(key, defaultValue, userId); in readKeyValue()
137 version = mCache.getVersion(); in readKeyValue()
152 mCache.putKeyValueIfUnchanged(key, result, userId, version); in readKeyValue()
158 synchronized (mCache) { in prefetchUser()
159 if (mCache.isFetched(userId)) { in prefetchUser()
162 mCache.setFetched(userId); in prefetchUser()
[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/libstagefright/
DNuCachedSource2.cpp189 mCache(new PageCache(kPageSize)), in NuCachedSource2()
235 delete mCache; in ~NuCachedSource2()
236 mCache = NULL; in ~NuCachedSource2()
339 mSource->reconnectAtOffset(mCacheOffset + mCache->totalSize()); in fetchInternal()
360 PageCache::Page *page = mCache->acquirePage(); in fetchInternal()
363 mCacheOffset + mCache->totalSize(), page->mData, kPageSize); in fetchInternal()
373 mCache->releasePage(page); in fetchInternal()
383 mCache->releasePage(page); in fetchInternal()
392 mCache->appendPage(page); in fetchInternal()
419 if (mFetching && mCache->totalSize() >= mHighwaterThresholdBytes) { in onFetch()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/model/
DTaskKeyLruCache.java43 private final LruCache<Integer, V> mCache; field in TaskKeyLruCache
52 mCache = new LruCache<Integer, V>(cacheSize) { in TaskKeyLruCache()
69 return mCache.get(key.id); in get()
89 return mCache.get(key.id); in getAndInvalidateIfModified()
99 mCache.put(key.id, value); in put()
105 mCache.remove(key.id); in remove()
111 mCache.evictAll(); in evictAll()
117 mCache.trimToSize(cacheSize); in trimToSize()
/frameworks/volley/src/test/java/com/android/volley/
DNetworkDispatcherTest.java40 private MockCache mCache; field in NetworkDispatcherTest
50 mCache = new MockCache(); in setUp()
52 mDispatcher = new NetworkDispatcher(mNetworkQueue, mNetwork, mCache, mDelivery); in setUp()
86 assertFalse(mCache.putCalled); in shouldCacheFalse()
95 assertTrue(mCache.putCalled); in shouldCacheTrue()
96 assertNotNull(mCache.entryPut); in shouldCacheTrue()
97 assertTrue(Arrays.equals(mCache.entryPut.data, CANNED_DATA)); in shouldCacheTrue()
98 assertEquals("bananaphone", mCache.keyPut); in shouldCacheTrue()
DCacheDispatcherTest.java39 private MockCache mCache; field in CacheDispatcherTest
48 mCache = new MockCache(); in setUp()
53 mDispatcher = new CacheDispatcher(mCacheQueue, mNetworkQueue, mCache, mDelivery); in setUp()
67 assertFalse(mCache.getCalled); in cancelledRequest()
84 mCache.setEntryToReturn(entry); in nonExpiredCacheHit()
94 mCache.setEntryToReturn(entry); in softExpiredCacheHit()
107 mCache.setEntryToReturn(entry); in expiredCacheHit()
/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/minikin/libs/minikin/
DHbFontCache.cpp49 HbFontCache() : mCache(kMaxEntries) { in HbFontCache()
50 mCache.setOnEntryRemovedListener(this); in HbFontCache()
59 return mCache.get(fontId); in get()
63 mCache.put(fontId, font); in put()
67 mCache.clear(); in clear()
71 mCache.remove(fontId); in remove()
77 LruCache<int32_t, hb_font_t*> mCache; member in android::HbFontCache
/frameworks/support/samples/Support4Demos/src/com/example/android/supportv4/media/
DAlbumArtCache.java48 private final LruCache<String, Bitmap[]> mCache; field in AlbumArtCache
61 mCache = new LruCache<String, Bitmap[]>(maxSize) { in AlbumArtCache()
71 Bitmap[] result = mCache.get(artUrl); in getBigImage()
76 Bitmap[] result = mCache.get(artUrl); in getIconImage()
85 Bitmap[] bitmap = mCache.get(artUrl); in fetch()
103 mCache.put(artUrl, bitmaps); in fetch()
107 Log.d(TAG, "doInBackground: putting bitmap in cache. cache size=" + mCache.size()); in fetch()
/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()
/frameworks/base/packages/Osu/src/com/android/hotspot2/osu/
DOSUCache.java34 private final Map<OSUProvider, ScanInstance> mCache = new HashMap<>(); field in OSUCache
77 mCache.clear(); in clearAll()
122 Map<OSUProvider, ScanInstance> aged = new HashMap<>(mCache); in scanEnd()
126 mCache.put(entry.getKey(), new ScanInstance(entry.getValue(), mInstant)); in scanEnd()
145 mCache.remove(entry.getKey()); in scanEnd()
155 Map<OSUProvider, ScanResult> results = new HashMap<>(mCache.size()); in scanEnd()
156 for (Map.Entry<OSUProvider, ScanInstance> entry : mCache.entrySet()) { in scanEnd()
/frameworks/native/libs/binder/
DPermissionCache.cpp43 ssize_t index = mCache.indexOf(e); in check()
45 *granted = mCache.itemAt(index).granted; in check()
66 index = mCache.indexOf(e); in cache()
68 mCache.add(e); in cache()
74 mCache.clear(); in purge()
/frameworks/volley/src/main/java/com/android/volley/
DCacheDispatcher.java43 private final Cache mCache; field in CacheDispatcher
65 mCache = cache; in CacheDispatcher()
84 mCache.initialize(); in run()
100 Cache.Entry entry = mCache.get(request.getCacheKey()); in run()

123