Home
last modified time | relevance | path

Searched refs:mCache (Results 1 – 25 of 59) 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
41 mCache = new ConfigurationBoundResourceCache<Float>(getActivity().getResources()); in setUp()
45 assertNull(mCache.get(-1, null)); in testGetEmpty()
49 mCache.put(1, null, new DummyFloatConstantState(5f)); in testSetGet()
50 assertEquals(5f, mCache.get(1, null)); in testSetGet()
51 assertNotSame(5f, mCache.get(1, null)); in testSetGet()
52 assertEquals(null, mCache.get(1, getActivity().getTheme())); in testSetGet()
56 mCache.put(1, getActivity().getTheme(), new DummyFloatConstantState(5f)); in testSetGetThemed()
57 assertEquals(null, mCache.get(1, null)); in testSetGetThemed()
58 assertEquals(5f, mCache.get(1, getActivity().getTheme())); in testSetGetThemed()
[all …]
/frameworks/base/libs/hwui/
DFboCache.cpp51 return mCache.size(); in getSize()
63 for (size_t i = 0; i < mCache.size(); i++) { in clear()
64 const GLuint fbo = mCache.itemAt(i); in clear()
67 mCache.clear(); in clear()
72 if (mCache.size() > 0) { in get()
73 fbo = mCache.itemAt(mCache.size() - 1); in get()
74 mCache.removeAt(mCache.size() - 1); in get()
82 if (mCache.size() < mMaxSize) { in put()
83 mCache.add(fbo); in put()
DResourceCache.cpp38 for (size_t i = 0; i < mCache->size(); ++i) { in logCache()
39 ResourceReference* ref = mCache->valueAt(i); in logCache()
41 i, mCache->keyAt(i), mCache->valueAt(i)); in logCache()
49 mCache = new KeyedVector<const void*, ResourceReference*>(); in ResourceCache()
54 delete mCache; in ~ResourceCache()
83 ssize_t index = mCache->indexOfKey(resource); in incrementRefcountLocked()
84 ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : NULL; in incrementRefcountLocked()
85 if (ref == NULL || mCache->size() == 0) { in incrementRefcountLocked()
87 mCache->add(resource, ref); in incrementRefcountLocked()
122 ssize_t index = mCache->indexOfKey(resource); in decrementRefcountLocked()
[all …]
DLayerCache.cpp53 return mCache.size(); in getCount()
92 size_t count = mCache.size(); in clear()
94 deleteLayer(mCache.itemAt(i).mLayer); in clear()
96 mCache.clear(); in clear()
103 ssize_t index = mCache.indexOf(entry); in get()
106 entry = mCache.itemAt(index); in get()
107 mCache.removeAt(index); in get()
137 size_t size = mCache.size(); in dump()
139 const LayerEntry& entry = mCache.itemAt(i); in dump()
154 position = mCache.size() - 1; in put()
[all …]
DRenderBufferCache.cpp103 size_t count = mCache.size(); in clear()
105 deleteBuffer(mCache.itemAt(i).mBuffer); in clear()
107 mCache.clear(); in clear()
114 ssize_t index = mCache.indexOf(entry); in get()
117 entry = mCache.itemAt(index); in get()
118 mCache.removeAt(index); in get()
146 RenderBuffer* victim = mCache.itemAt(position).mBuffer; in put()
148 mCache.removeAt(position); in put()
153 mCache.add(entry); in put()
DTextureCache.cpp41 mCache(LruCache<uint32_t, Texture*>::kUnlimitedCapacity), in TextureCache()
65 mCache(LruCache<uint32_t, Texture*>::kUnlimitedCapacity), in TextureCache()
71 mCache.clear(); in ~TextureCache()
75 mCache.setOnEntryRemovedListener(this); in init()
98 mCache.removeOldest(); in setMaxSize()
133 LruCache<uint32_t, Texture*>::Iterator iter(mCache); in resetMarkInUse()
158 Texture* texture = mCache.get(bitmap->pixelRef()->getStableID()); in getCachedTexture()
169 Texture* oldest = mCache.peekOldestValue(); in getCachedTexture()
171 mCache.removeOldest(); in getCachedTexture()
188 mCache.put(bitmap->pixelRef()->getStableID(), texture); in getCachedTexture()
[all …]
DTextDropShadowCache.cpp98 mCache(LruCache<ShadowText, ShadowTexture*>::kUnlimitedCapacity), in TextDropShadowCache()
113 mCache(LruCache<ShadowText, ShadowTexture*>::kUnlimitedCapacity), in TextDropShadowCache()
119 mCache.clear(); in ~TextDropShadowCache()
123 mCache.setOnEntryRemovedListener(this); in init()
142 mCache.removeOldest(); in setMaxSize()
168 mCache.clear(); in clear()
174 ShadowTexture* texture = mCache.get(entry); in get()
202 mCache.removeOldest(); in get()
226 mCache.put(entry, texture); in get()
DGradientCache.cpp66 mCache(LruCache<GradientCacheEntry, Texture*>::kUnlimitedCapacity), in GradientCache()
78 mCache.setOnEntryRemovedListener(this); in GradientCache()
86 mCache(LruCache<GradientCacheEntry, Texture*>::kUnlimitedCapacity), in GradientCache()
88 mCache.setOnEntryRemovedListener(this); in GradientCache()
92 mCache.clear(); in ~GradientCache()
110 mCache.removeOldest(); in setMaxSize()
134 Texture* texture = mCache.get(gradient); in get()
144 mCache.clear(); in clear()
185 mCache.removeOldest(); in addLinearGradient()
191 mCache.put(gradient, texture); in addLinearGradient()
DPathCache.cpp153 mCache(LruCache<PathDescription, PathTexture*>::kUnlimitedCapacity), in PathCache()
163 mCache.setOnEntryRemovedListener(this); in PathCache()
173 mCache.clear(); in ~PathCache()
191 mCache.removeOldest(); in setMaxSize()
245 mCache.removeOldest(); in purgeCache()
252 mCache.removeOldest(); in trim()
291 mCache.put(entry, texture); in generateTexture()
304 mCache.clear(); in clear()
367 LruCache<PathDescription, PathTexture*>::Iterator i(mCache); in remove()
399 mCache.remove(pathsToRemove.itemAt(i)); in clearGarbage()
[all …]
/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
58 si.mCache[ct] = (byte)ct; in create()
59 si.mCache[ct + 256] = (byte)ct; in create()
60 si.mCache[ct + 512] = (byte)ct; in create()
61 si.mCache[ct + 768] = (byte)ct; in create()
85 mCache[index] = (byte)value; in setRed()
97 mCache[index+256] = (byte)value; in setGreen()
109 mCache[index+512] = (byte)value; in setBlue()
121 mCache[index+768] = (byte)value; in setAlpha()
136 mTables.copyFromUnchecked(mCache); in forEach()
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/model/
DKeyStoreLruCache.java34 LruCache<Integer, V> mCache; field in KeyStoreLruCache
37 mCache = new LruCache<Integer, V>(cacheSize) { in KeyStoreLruCache()
48 return mCache.get(key.id); in get()
64 return mCache.get(key.id); in getAndInvalidateIfModified()
69 mCache.put(key.id, value); in put()
75 mCache.remove(key.id); in remove()
81 mCache.evictAll(); in evictAll()
87 return mCache.size(); in size()
92 mCache.resize(cacheSize); in trimToSize()
/frameworks/base/services/core/java/com/android/server/
DLockSettingsStorage.java66 private final Cache mCache = new Cache(); field in LockSettingsStorage
90 mCache.putKeyValue(key, value, userId); in writeKeyValue()
99 synchronized (mCache) { in readKeyValue()
100 if (mCache.hasKeyValue(key, userId)) { in readKeyValue()
101 return mCache.peekKeyValue(key, defaultValue, userId); in readKeyValue()
103 version = mCache.getVersion(); in readKeyValue()
118 mCache.putKeyValueIfUnchanged(key, result, userId, version); in readKeyValue()
124 synchronized (mCache) { in prefetchUser()
125 if (mCache.isFetched(userId)) { in prefetchUser()
128 mCache.setFetched(userId); in prefetchUser()
[all …]
/frameworks/base/core/java/android/widget/
DRemoteViewsAdapter.java79 private FixedSizeRemoteViewsCache mCache; field in RemoteViewsAdapter
234 synchronized (adapter.mCache) { in onServiceConnected()
235 adapter.mCache.commitTemporaryMetaData(); in onServiceConnected()
854 mCache = sCachedRemoteViewsCaches.get(key); in RemoteViewsAdapter()
855 synchronized (mCache.mMetaData) { in RemoteViewsAdapter()
856 if (mCache.mMetaData.count > 0) { in RemoteViewsAdapter()
863 mCache = new FixedSizeRemoteViewsCache(sDefaultCacheSize); in RemoteViewsAdapter()
903 synchronized (mCache.mMetaData) { in saveRemoteViewsCache()
904 metaDataCount = mCache.mMetaData.count; in saveRemoteViewsCache()
906 synchronized (mCache) { in saveRemoteViewsCache()
[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/volley/tests/src/com/android/volley/
DNetworkDispatcherTest.java37 private MockCache mCache; field in NetworkDispatcherTest
50 mCache = new MockCache(); in setUp()
52 mDispatcher = new NetworkDispatcher(mNetworkQueue, mNetwork, mCache, mDelivery); in setUp()
88 assertFalse(mCache.putCalled); in test_shouldCacheFalse()
97 assertTrue(mCache.putCalled); in test_shouldCacheTrue()
98 assertNotNull(mCache.entryPut); in test_shouldCacheTrue()
99 assertTrue(Arrays.equals(mCache.entryPut.data, CANNED_DATA)); in test_shouldCacheTrue()
100 assertEquals("bananaphone", mCache.keyPut); in test_shouldCacheTrue()
DCacheDispatcherTest.java35 private MockCache mCache; field in CacheDispatcherTest
47 mCache = new MockCache(); in setUp()
52 mDispatcher = new CacheDispatcher(mCacheQueue, mNetworkQueue, mCache, mDelivery); in setUp()
68 assertFalse(mCache.getCalled); in testCancelledRequest()
85 mCache.setEntryToReturn(entry); in testNonExpiredCacheHit()
95 mCache.setEntryToReturn(entry); in testSoftExpiredCacheHit()
108 mCache.setEntryToReturn(entry); in testExpiredCacheHit()
/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/av/media/libstagefright/
DNuCachedSource2.cpp189 mCache(new PageCache(kPageSize)), in NuCachedSource2()
236 delete mCache; in ~NuCachedSource2()
237 mCache = NULL; in ~NuCachedSource2()
328 mSource->reconnectAtOffset(mCacheOffset + mCache->totalSize()); in fetchInternal()
349 PageCache::Page *page = mCache->acquirePage(); in fetchInternal()
352 mCacheOffset + mCache->totalSize(), page->mData, kPageSize); in fetchInternal()
362 mCache->releasePage(page); in fetchInternal()
372 mCache->releasePage(page); in fetchInternal()
381 mCache->appendPage(page); in fetchInternal()
408 if (mFetching && mCache->totalSize() >= mHighwaterThresholdBytes) { in onFetch()
[all …]
/frameworks/base/packages/Keyguard/src/com/android/keyguard/
DMultiUserAvatarCache.java27 private final HashMap<Integer, Drawable> mCache; field in MultiUserAvatarCache
30 mCache = new HashMap<Integer, Drawable>(); in MultiUserAvatarCache()
41 mCache.remove(userId); in clear()
45 return mCache.get(userId); in get()
49 mCache.put(userId, image); in put()
/frameworks/base/core/java/android/content/res/
DConfigurationBoundResourceCache.java29 private final ArrayMap<String, LongSparseArray<WeakReference<ConstantState<T>>>> mCache = field in ConfigurationBoundResourceCache
58 themedCache = mCache.get(themeKey); in put()
61 mCache.put(themeKey, themedCache); in put()
81 themedCache = mCache.get(themeKey); in get()
112 final int size = mCache.size(); in onConfigurationChange()
115 themeCache = mCache.valueAt(i); in onConfigurationChange()
118 mCache.removeAt(i); in onConfigurationChange()
/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/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/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