FileDocCategorySizeDatePackage
SimpleFrameManager.javaAPI DocAndroid 5.1 API3299Thu Mar 12 22:22:30 GMT 2015android.filterfw.core

SimpleFrameManager

public class SimpleFrameManager extends android.filterfw.core.FrameManager
hide

Fields Summary
Constructors Summary
public SimpleFrameManager()

    
Methods Summary
private android.filterfw.core.FramecreateNewFrame(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.FramenewBoundFrame(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.FramenewFrame(android.filterfw.core.FrameFormat format)

        return createNewFrame(format);
    
public android.filterfw.core.FramereleaseFrame(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.FrameretainFrame(android.filterfw.core.Frame frame)

        frame.incRefCount();
        return frame;