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;
}
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;
}
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;
}
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;
}
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!");
}
}
Aggregations