Methods Summary |
---|
private android.filterfw.core.Frame | createNewFrame(android.filterfw.core.FrameFormat format)
Frame result = null;
switch(format.getTarget()) {
case FrameFormat.TARGET_SIMPLE:
result = new SimpleFrame(format, this);
break;
case FrameFormat.TARGET_NATIVE:
result = new NativeFrame(format, this);
break;
case FrameFormat.TARGET_GPU: {
GLFrame glFrame = new GLFrame(format, this);
glFrame.init(getGLEnvironment());
result = glFrame;
break;
}
case FrameFormat.TARGET_VERTEXBUFFER: {
result = new VertexFrame(format, this);
break;
}
default:
throw new RuntimeException("Unsupported frame target type: " +
FrameFormat.targetToString(format.getTarget()) + "!");
}
return result;
|
public android.filterfw.core.Frame | newBoundFrame(android.filterfw.core.FrameFormat format, int bindingType, long bindingId)
Frame result = null;
switch(format.getTarget()) {
case FrameFormat.TARGET_GPU: {
GLFrame glFrame = new GLFrame(format, this, bindingType, bindingId);
glFrame.init(getGLEnvironment());
result = glFrame;
break;
}
default:
throw new RuntimeException("Attached frames are not supported for target type: "
+ FrameFormat.targetToString(format.getTarget()) + "!");
}
return result;
|
public android.filterfw.core.Frame | newFrame(android.filterfw.core.FrameFormat format)
return createNewFrame(format);
|
public android.filterfw.core.Frame | releaseFrame(android.filterfw.core.Frame frame)
int refCount = frame.decRefCount();
if (refCount == 0 && frame.hasNativeAllocation()) {
frame.releaseNativeAllocation();
return null;
} else if (refCount < 0) {
throw new RuntimeException("Frame reference count dropped below 0!");
}
return frame;
|
public android.filterfw.core.Frame | retainFrame(android.filterfw.core.Frame frame)
frame.incRefCount();
return frame;
|