当前位置: 首页>>代码示例>>Java>>正文


Java IDrawingCache.destroy方法代码示例

本文整理汇总了Java中master.flame.danmaku.danmaku.model.IDrawingCache.destroy方法的典型用法代码示例。如果您正苦于以下问题:Java IDrawingCache.destroy方法的具体用法?Java IDrawingCache.destroy怎么用?Java IDrawingCache.destroy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在master.flame.danmaku.danmaku.model.IDrawingCache的用法示例。


在下文中一共展示了IDrawingCache.destroy方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: evictAllNotInScreen

import master.flame.danmaku.danmaku.model.IDrawingCache; //导入方法依赖的package包/类
private void evictAllNotInScreen(boolean removeAllReferences) {
    if (mCaches != null) {
        IDanmakuIterator it = mCaches.iterator();
        while (it.hasNext()) {
            BaseDanmaku danmaku = it.next();
            IDrawingCache<?> cache = danmaku.cache;
            boolean hasReferences = cache != null && cache.hasReferences();
            if (removeAllReferences && hasReferences) {
                if (cache.get() != null) {
                    mRealSize -= cache.size();
                    cache.destroy();
                }
                entryRemoved(true, danmaku, null);
                it.remove();
                continue;
            }
            if (danmaku.hasDrawingCache() == false || danmaku.isOutside()) {
                entryRemoved(true, danmaku, null);
                it.remove();
            }
        }
        // mCaches.clear();
    }
    mRealSize = 0;
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:26,代码来源:CacheManagingDrawTask.java

示例2: onDanmakuRemoved

import master.flame.danmaku.danmaku.model.IDrawingCache; //导入方法依赖的package包/类
@Override
protected void onDanmakuRemoved(BaseDanmaku danmaku) {
    super.onDanmakuRemoved(danmaku);
    if (mCacheManager != null) {
        if (++mRemaininCacheCount > 5) {  // control frequency (it does not require very precise
            mCacheManager.requestClearTimeout();
            mRemaininCacheCount = 0;
        }
    } else {
        IDrawingCache<?> cache = danmaku.getDrawingCache();
        if (cache != null) {
            if (cache.hasReferences()) {
                cache.decreaseReference();
            } else {
                cache.destroy();
            }
            danmaku.cache = null;
        }
    }
}
 
开发者ID:amikey,项目名称:DanmakuFlameMaster,代码行数:21,代码来源:CacheManagingDrawTask.java

示例3: evictAllNotInScreen

import master.flame.danmaku.danmaku.model.IDrawingCache; //导入方法依赖的package包/类
private void evictAllNotInScreen(boolean removeAllReferences) {
    if (mCaches != null) {
        IDanmakuIterator it = mCaches.iterator();
        while (it.hasNext()) {
            BaseDanmaku danmaku = it.next();
            IDrawingCache<?> cache = danmaku.cache;
            boolean hasReferences = cache != null && cache.hasReferences();
            if (removeAllReferences && hasReferences) {
                if (cache.get() != null) {
                    mRealSize -= cache.size();
                    cache.destroy();
                }
                entryRemoved(true, danmaku, null);
                it.remove();
                continue;
            }
            if (danmaku.isOutside()) {
                entryRemoved(true, danmaku, null);
                it.remove();
            }
        }
        // mCaches.clear();
    }
    mRealSize = 0;
}
 
开发者ID:amikey,项目名称:DanmakuFlameMaster,代码行数:26,代码来源:CacheManagingDrawTask.java

示例4: evictAllNotInScreen

import master.flame.danmaku.danmaku.model.IDrawingCache; //导入方法依赖的package包/类
private synchronized void evictAllNotInScreen(boolean removeAllReferences) {
    if (mCaches != null) {
        IDanmakuIterator it = mCaches.iterator();
        while (it.hasNext()) {
            BaseDanmaku danmaku = it.next();
            IDrawingCache<?> cache = danmaku.cache;
            boolean hasReferences = cache != null && cache.hasReferences();
            if (removeAllReferences && hasReferences) {
                if (cache.get() != null) {
                    mRealSize -= cache.size();
                    cache.destroy();
                }
                entryRemoved(true, danmaku, null);
                it.remove();
                continue;
            }
            if (danmaku.hasDrawingCache() == false || danmaku.isOutside()) {
                entryRemoved(true, danmaku, null);
                it.remove();
            }
        }
        // mCaches.clear();
    }
    mRealSize = 0;
}
 
开发者ID:jiangerji,项目名称:danmaku-project,代码行数:26,代码来源:CacheManagingDrawTask.java

示例5: evictAllNotInScreen

import master.flame.danmaku.danmaku.model.IDrawingCache; //导入方法依赖的package包/类
private void evictAllNotInScreen(boolean removeAllReferences) {
    if (this.mCaches != null) {
        IDanmakuIterator it = this.mCaches.iterator();
        while (it.hasNext()) {
            BaseDanmaku danmaku = it.next();
            IDrawingCache<?> cache = danmaku.cache;
            boolean hasReferences;
            if (cache == null || !cache.hasReferences()) {
                hasReferences = false;
            } else {
                hasReferences = true;
            }
            if (removeAllReferences && hasReferences) {
                if (cache.get() != null) {
                    this.mRealSize -= cache.size();
                    cache.destroy();
                }
                entryRemoved(true, danmaku, null);
                it.remove();
            } else if (!danmaku.hasDrawingCache() || danmaku.isOutside()) {
                entryRemoved(true, danmaku, null);
                it.remove();
            }
        }
    }
    this.mRealSize = 0;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:28,代码来源:CacheManagingDrawTask.java

示例6: clearCache

import master.flame.danmaku.danmaku.model.IDrawingCache; //导入方法依赖的package包/类
private long clearCache(BaseDanmaku oldValue) {
    IDrawingCache<?> cache = oldValue.cache;
    if (cache == null) {
        return 0;
    }
    if (cache.hasReferences()) {
        cache.decreaseReference();
        oldValue.cache = null;
        return 0;
    }
    long size = sizeOf(oldValue);
    cache.destroy();
    oldValue.cache = null;
    return size;
}
 
开发者ID:amikey,项目名称:DanmakuFlameMaster,代码行数:16,代码来源:CacheManagingDrawTask.java


注:本文中的master.flame.danmaku.danmaku.model.IDrawingCache.destroy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。