本文整理了Java中android.renderscript.Allocation.ioReceive()
方法的一些代码示例,展示了Allocation.ioReceive()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Allocation.ioReceive()
方法的具体详情如下:
包路径:android.renderscript.Allocation
类名称:Allocation
方法名:ioReceive
暂无
代码示例来源:origin: gearvrf/GearVRf-Demos
@Override
public void run() {
// Find out how many frames have arrived
int pendingFrames;
synchronized(this) {
pendingFrames = mPendingFrames;
mPendingFrames = 0;
mProcessingHandler.removeCallbacks(this);
}
// Get to newest input
for (int i = 0; i < pendingFrames; i++) {
mInputAllocation.ioReceive();
}
if( mNeedYuvConversion )
{
mScriptIntrinsic.setInput(mInputAllocation);
mScriptIntrinsic.forEach(mInterAllocation);
mScript.forEach_root(mInterAllocation, mOutputAllocation);
}
else {
mScript.forEach_root(mInputAllocation, mOutputAllocation);
}
mOutputAllocation.ioSend();
}
}
代码示例来源:origin: googlesamples/android-HdrViewfinder
@Override
public void run() {
// Find out how many frames have arrived
int pendingFrames;
synchronized(this) {
pendingFrames = mPendingFrames;
mPendingFrames = 0;
// Discard extra messages in case processing is slower than frame rate
mProcessingHandler.removeCallbacks(this);
}
// Get to newest input
for (int i = 0; i < pendingFrames; i++) {
mInputAllocation.ioReceive();
}
mHdrMergeScript.set_gFrameCounter(mFrameCounter++);
mHdrMergeScript.set_gCurrentFrame(mInputAllocation);
mHdrMergeScript.set_gCutPointX(mCutPointX);
if (mCheckMerge && mMode == MODE_HDR) {
mHdrMergeScript.set_gDoMerge(1);
} else {
mHdrMergeScript.set_gDoMerge(0);
}
// Run processing pass
mHdrMergeScript.forEach_mergeHdrFrames(mPrevAllocation, mOutputAllocation);
mOutputAllocation.ioSend();
}
}
内容来源于网络,如有侵权,请联系作者删除!