If we want to use remain count in ClearCache,
we should also properly clear face, size, and index.
But it is difficult to support it now.
And since there is no use for remain count, we will remove this feature for now.
Change-Id: I67bddd7ec695b5b724d45c1e6886492c3cd4eb7d
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
return error;
}
-void FontFaceManager::ClearCache(const std::size_t remainCount)
+void FontFaceManager::ClearCache()
{
- if(remainCount == 0u)
- {
- // Clear all cache.
- mLRUFaceSizeCache.Clear();
- }
- else
- {
- // While the cache count is bigger than remainCount, remove oldest glyph.
- while(mLRUFaceSizeCache.Count() > remainCount)
- {
- auto removedData = mLRUFaceSizeCache.Pop();
- DALI_LOG_INFO(gFontClientLogFilter, Debug::Verbose, "FontClient::Plugin::FontFaceManager::ClearCache[%zu / %zu]. Remove oldest face size : %p\n", mLRUFaceSizeCache.Count(), remainCount, removedData->mFreeTypeSize);
- }
- }
+ mLRUFaceSizeCache.Clear();
for(auto& item : mFreeTypeFaces)
{
/**
* @brief Clear all cached face size informations.
- *
- * @param[in] remainCount The number of remained cache items after call this API. Default is 0, clear all items.
*/
- void ClearCache(const std::size_t remainCount = 0u);
+ void ClearCache();
private:
TextAbstraction::FontFileManager mFontFileManager; ///< Handle to the font file manager.