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


Java AbsDisplayer.getExtraData方法代码示例

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


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

示例1: drawDanmakus

import master.flame.danmaku.danmaku.model.AbsDisplayer; //导入方法依赖的package包/类
protected RenderingState drawDanmakus(AbsDisplayer<?> disp, DanmakuTimer timer) {
    if (danmakuList != null) {
        Canvas canvas = (Canvas) disp.getExtraData();
        if (clearFlag > 0) {
            DrawHelper.clearCanvas(canvas);
            clearFlag--;
        } else {
            float[] refreshRect = mRenderer.getRefreshArea().mRefreshRect;
            mRectCache.push(refreshRect);
            float[] rect = mRectCache.getRect();
            DrawHelper.clearCanvas(canvas, Math.max(0, rect[0]), Math.max(0, rect[1]),
                    Math.min(disp.getWidth(), rect[2]), Math.min(disp.getHeight(), rect[3]));
        }
        long currMills = timer.currMillisecond;
        danmakus = danmakuList.sub(currMills - DanmakuFactory.MAX_DANMAKU_DURATION - 100,
                currMills);
        if (danmakus != null) {
            return mRenderer.draw(mDisp, danmakus, mStartRenderTime);
        }
    }
    return null;
}
 
开发者ID:jiangerji,项目名称:danmaku-project,代码行数:23,代码来源:DrawTask.java

示例2: drawDanmakus

import master.flame.danmaku.danmaku.model.AbsDisplayer; //导入方法依赖的package包/类
protected RenderingState drawDanmakus(AbsDisplayer disp, DanmakuTimer timer) {
    if (clearRetainerFlag) {
        mRenderer.clearRetainer();
        clearRetainerFlag = false;
    }
    if (danmakuList != null) {
        Canvas canvas = (Canvas) disp.getExtraData();
        DrawHelper.clearCanvas(canvas);
        if (mIsHidden) {
            return mRenderingState;
        }
        long beginMills = timer.currMillisecond - mContext.mDanmakuFactory.MAX_DANMAKU_DURATION - 100;
        long endMills = timer.currMillisecond + mContext.mDanmakuFactory.MAX_DANMAKU_DURATION;
        if(mLastBeginMills > beginMills || timer.currMillisecond > mLastEndMills) {
            IDanmakus subDanmakus = danmakuList.sub(beginMills, endMills);
            if(subDanmakus != null) {
                danmakus = subDanmakus;
            }
            mLastBeginMills = beginMills;
            mLastEndMills = endMills;
        } else {
            beginMills = mLastBeginMills;
            endMills = mLastEndMills;
        }
        if (danmakus != null && !danmakus.isEmpty()) {
            RenderingState renderingState = mRenderingState = mRenderer.draw(mDisp, danmakus, mStartRenderTime);
            if (renderingState.nothingRendered) {
                if(mLastDanmaku != null && mLastDanmaku.isTimeOut()) {
                    mLastDanmaku = null;
                    if (mTaskListener != null) {
                        mTaskListener.onDanmakusDrawingFinished();
                    }
                }
                if (renderingState.beginTime == RenderingState.UNKNOWN_TIME) {
                    renderingState.beginTime = beginMills;
                }
                if (renderingState.endTime == RenderingState.UNKNOWN_TIME) {
                    renderingState.endTime = endMills;
                }
            }
            return renderingState;
        } else {
            mRenderingState.nothingRendered = true;
            mRenderingState.beginTime = beginMills;
            mRenderingState.endTime = endMills;
            return mRenderingState;
        }
    }
    return null;
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:51,代码来源:DrawTask.java

示例3: drawDanmakus

import master.flame.danmaku.danmaku.model.AbsDisplayer; //导入方法依赖的package包/类
protected RenderingState drawDanmakus(AbsDisplayer disp, DanmakuTimer timer) {
    if (clearRetainerFlag) {
        mRenderer.clearRetainer();
        clearRetainerFlag = false;
    }
    if (danmakuList != null) {
        Canvas canvas = (Canvas) disp.getExtraData();
        DrawHelper.clearCanvas(canvas);
        if (mIsHidden) {
            return mRenderingState;
        }
        long beginMills = timer.currMillisecond - mContext.mDanmakuFactory.MAX_DANMAKU_DURATION - 100;
        long endMills = timer.currMillisecond + mContext.mDanmakuFactory.MAX_DANMAKU_DURATION;
        if(mLastBeginMills > beginMills || timer.currMillisecond > mLastEndMills) {
            IDanmakus subDanmakus = danmakuList.sub(beginMills, endMills);
            if(subDanmakus != null) {
                danmakus = subDanmakus;
            } else if (danmakus != null) {
                BaseDanmaku last = danmakus.last();
                if (last == null || last.isTimeOut()) {
                    danmakus.clear();
                }
            }
            mLastBeginMills = beginMills;
            mLastEndMills = endMills;
        } else {
            beginMills = mLastBeginMills;
            endMills = mLastEndMills;
        }
        if (danmakus != null && !danmakus.isEmpty()) {
            RenderingState renderingState = mRenderingState = mRenderer.draw(mDisp, danmakus, mStartRenderTime);
            if (renderingState.nothingRendered) {
                if(mTaskListener != null && mLastDanmaku != null && mLastDanmaku.isTimeOut()) {
                    mTaskListener.onDanmakusDrawingFinished();
                }
                if (renderingState.beginTime == RenderingState.UNKNOWN_TIME) {
                    renderingState.beginTime = beginMills;
                }
                if (renderingState.endTime == RenderingState.UNKNOWN_TIME) {
                    renderingState.endTime = endMills;
                }
            }
            return renderingState;
        } else {
            mRenderingState.nothingRendered = true;
            mRenderingState.beginTime = beginMills;
            mRenderingState.endTime = endMills;
            return mRenderingState;
        }
    }
    return null;
}
 
开发者ID:dingdingyr,项目名称:DanmakuFlameMaster-,代码行数:53,代码来源:DrawTask.java

示例4: drawDanmakus

import master.flame.danmaku.danmaku.model.AbsDisplayer; //导入方法依赖的package包/类
protected RenderingState drawDanmakus(AbsDisplayer disp, DanmakuTimer timer) {
    if (clearRetainerFlag) {
        mRenderer.clearRetainer();
        clearRetainerFlag = false;
    }
    if (danmakuList != null) {
        Canvas canvas = (Canvas) disp.getExtraData();
        DrawHelper.clearCanvas(canvas);
        if (mIsHidden) {
            return mRenderingState;
        }
        long beginMills = timer.currMillisecond - mContext.mDanmakuFactory.MAX_DANMAKU_DURATION - 100;
        long endMills = timer.currMillisecond + mContext.mDanmakuFactory.MAX_DANMAKU_DURATION;
        if(mLastBeginMills > beginMills || timer.currMillisecond > mLastEndMills) {
            IDanmakus subDanmakus = danmakuList.sub(beginMills, endMills);
            if(subDanmakus != null) {
                danmakus = subDanmakus;
            } else {
                danmakus.clear();
            }
            mLastBeginMills = beginMills;
            mLastEndMills = endMills;
        } else {
            beginMills = mLastBeginMills;
            endMills = mLastEndMills;
        }
        if (danmakus != null && !danmakus.isEmpty()) {
            RenderingState renderingState = mRenderingState = mRenderer.draw(mDisp, danmakus, mStartRenderTime);
            if (renderingState.nothingRendered) {
                if(mTaskListener != null && mLastDanmaku != null && mLastDanmaku.isTimeOut()) {
                    mTaskListener.onDanmakusDrawingFinished();
                }
                if (renderingState.beginTime == RenderingState.UNKNOWN_TIME) {
                    renderingState.beginTime = beginMills;
                }
                if (renderingState.endTime == RenderingState.UNKNOWN_TIME) {
                    renderingState.endTime = endMills;
                }
            }
            return renderingState;
        } else {
            mRenderingState.nothingRendered = true;
            mRenderingState.beginTime = beginMills;
            mRenderingState.endTime = endMills;
            return mRenderingState;
        }
    }
    return null;
}
 
开发者ID:liucloo,项目名称:ijkPlayer-Danmaku,代码行数:50,代码来源:DrawTask.java


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