资源简介
功能强大的弹幕库,压缩包包括demo,A站B站都是用的这个
代码片段和文件信息
/*
* Copyright (C) 2013 Chen Hui
*
* Licensed under the Apache License Version 2.0 (the “License“);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing software
* distributed under the License is distributed on an “AS IS“ BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package master.flame.danmaku.controller;
import android.content.Context;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Message;
import android.os.SystemClock;
import master.flame.danmaku.danmaku.model.AbsDisplayer;
import master.flame.danmaku.danmaku.model.baseDanmaku;
import master.flame.danmaku.danmaku.model.DanmakuTimer;
import master.flame.danmaku.danmaku.model.IDanmakuIterator;
import master.flame.danmaku.danmaku.model.IDanmakus;
import master.flame.danmaku.danmaku.model.IDrawingCache;
import master.flame.danmaku.danmaku.model.android.DanmakuGlobalConfig;
import master.flame.danmaku.danmaku.model.android.DanmakuGlobalConfig.ConfigChangedCallback;
import master.flame.danmaku.danmaku.model.android.DanmakuGlobalConfig.DanmakuConfigTag;
import master.flame.danmaku.danmaku.model.android.Danmakus;
import master.flame.danmaku.danmaku.model.android.DrawingCache;
import master.flame.danmaku.danmaku.model.android.DrawingCachePoolManager;
import master.flame.danmaku.danmaku.model.objectpool.Pool;
import master.flame.danmaku.danmaku.model.objectpool.Pools;
import master.flame.danmaku.danmaku.parser.DanmakuFactory;
import master.flame.danmaku.danmaku.renderer.IRenderer.RenderingState;
import master.flame.danmaku.danmaku.util.DanmakuUtils;
import tv.cjump.jni.NativeBitmapFactory;
public class CacheManagingDrawTask extends DrawTask {
private static final int MAX_CACHE_SCREEN_SIZE = 3;
private int mMaxCacheSize = 2;
private CacheManager mCacheManager;
private DanmakuTimer mCacheTimer;
public CacheManagingDrawTask(DanmakuTimer timer Context context AbsDisplayer> disp
TaskListener taskListener int maxCacheSize) {
super(timer context disp taskListener);
NativeBitmapFactory.loadLibs();
mMaxCacheSize = maxCacheSize;
if (NativeBitmapFactory.isInNativeAlloc()) {
mMaxCacheSize = maxCacheSize * 3;
}
mCacheManager = new CacheManager(maxCacheSize MAX_CACHE_SCREEN_SIZE);
}
@Override
protected void initTimer(DanmakuTimer timer) {
mTimer = timer;
mCacheTimer = new DanmakuTimer();
mCacheTimer.update(timer.currMillisecond);
}
@Override
public void addDanmaku(baseDanmaku danmaku) {
if (mCacheManager == null)
return;
mCacheManager.addDanmaku(danmaku);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-01-21 09:47 DanmakuFlameMaster-master\
文件 359 2015-01-21 09:47 DanmakuFlameMaster-master\.gitignore
文件 106 2015-01-21 09:47 DanmakuFlameMaster-master\.gitmodules
文件 1274 2015-01-21 09:47 DanmakuFlameMaster-master\.travis.yml
目录 0 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\
文件 973 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\build.gradle
目录 0 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\
目录 0 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\
文件 467 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\.classpath
文件 854 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\.project
目录 0 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\.settings\
文件 23660 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\.settings\org.eclipse.jdt.core.prefs
文件 315 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\.settings\org.eclipse.jdt.ui.prefs
文件 908 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\AndroidManifest.xm
文件 3930 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\build.xm
目录 0 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\
目录 0 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\
目录 0 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\
目录 0 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\danmaku\
目录 0 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\danmaku\controller\
文件 29842 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\danmaku\controller\CacheManagingDrawTask.java
文件 11627 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\danmaku\controller\DanmakuFilters.java
文件 19776 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\danmaku\controller\DrawHandler.java
文件 2695 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\danmaku\controller\DrawHelper.java
文件 7961 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\danmaku\controller\DrawTask.java
文件 2543 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\danmaku\controller\IDanmakuView.java
文件 1554 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\danmaku\controller\IDrawTask.java
目录 0 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\danmaku\danmaku\
目录 0 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\danmaku\danmaku\loader\
文件 1156 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\danmaku\danmaku\loader\ILoader.java
文件 607 2015-01-21 09:47 DanmakuFlameMaster-master\DanmakuFlameMaster\src\main\java\master\flame\danmaku\danmaku\loader\IllegalDataException.java
............此处省略125个文件信息
- 上一篇:AD 元件库
- 下一篇:大气辐射传输模型6sv2.1.exe
评论
共有 条评论