Search in sources :

Example 41 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project android_frameworks_base by ResurrectionRemix.

the class VignetteFilter method initProgram.

public void initProgram(FilterContext context, int target) {
    switch(target) {
        case FrameFormat.TARGET_GPU:
            ShaderProgram shaderProgram = new ShaderProgram(context, mVignetteShader);
            shaderProgram.setMaximumTileSize(mTileSize);
            mProgram = shaderProgram;
            break;
        default:
            throw new RuntimeException("Filter Sharpen does not support frames of " + "target " + target + "!");
    }
    mTarget = target;
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Example 42 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project android_frameworks_base by ResurrectionRemix.

the class SepiaFilter method initProgram.

public void initProgram(FilterContext context, int target) {
    switch(target) {
        case FrameFormat.TARGET_GPU:
            ShaderProgram shaderProgram = new ShaderProgram(context, mSepiaShader);
            shaderProgram.setMaximumTileSize(mTileSize);
            mProgram = shaderProgram;
            break;
        default:
            throw new RuntimeException("Filter Sharpen does not support frames of " + "target " + target + "!");
    }
    mTarget = target;
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Example 43 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project android_frameworks_base by ResurrectionRemix.

the class SharpenFilter method initProgram.

public void initProgram(FilterContext context, int target) {
    switch(target) {
        case FrameFormat.TARGET_GPU:
            ShaderProgram shaderProgram = new ShaderProgram(context, mSharpenShader);
            shaderProgram.setMaximumTileSize(mTileSize);
            mProgram = shaderProgram;
            break;
        default:
            throw new RuntimeException("Filter Sharpen does not support frames of " + "target " + target + "!");
    }
    mTarget = target;
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Example 44 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project android_frameworks_base by ResurrectionRemix.

the class CrossProcessFilter method initProgram.

public void initProgram(FilterContext context, int target) {
    switch(target) {
        case FrameFormat.TARGET_GPU:
            ShaderProgram shaderProgram = new ShaderProgram(context, mCrossProcessShader);
            shaderProgram.setMaximumTileSize(mTileSize);
            mProgram = shaderProgram;
            break;
        default:
            throw new RuntimeException("Filter CrossProcess does not support frames of " + "target " + target + "!");
    }
    mTarget = target;
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Example 45 with ShaderProgram

use of android.filterfw.core.ShaderProgram in project android_frameworks_base by ResurrectionRemix.

the class ResizeFilter method createProgram.

protected void createProgram(FilterContext context, FrameFormat format) {
    if (mLastFormat != null && mLastFormat.getTarget() == format.getTarget())
        return;
    mLastFormat = format;
    switch(format.getTarget()) {
        case FrameFormat.TARGET_NATIVE:
            throw new RuntimeException("Native ResizeFilter not implemented yet!");
        case FrameFormat.TARGET_GPU:
            ShaderProgram prog = ShaderProgram.createIdentity(context);
            mProgram = prog;
            break;
        default:
            throw new RuntimeException("ResizeFilter could not create suitable program!");
    }
}
Also used : ShaderProgram(android.filterfw.core.ShaderProgram)

Aggregations

ShaderProgram (android.filterfw.core.ShaderProgram)198 Frame (android.filterfw.core.Frame)18 MutableFrameFormat (android.filterfw.core.MutableFrameFormat)18 Quad (android.filterfw.geometry.Quad)18 FrameFormat (android.filterfw.core.FrameFormat)12 Point (android.filterfw.geometry.Point)12 NativeFrame (android.filterfw.core.NativeFrame)1