use of android.filterfw.core.ShaderProgram in project platform_frameworks_base by android.
the class FillLightFilter method initProgram.
public void initProgram(FilterContext context, int target) {
switch(target) {
case FrameFormat.TARGET_GPU:
ShaderProgram shaderProgram = new ShaderProgram(context, mFillLightShader);
Log.e("FillLight", "tile size: " + mTileSize);
shaderProgram.setMaximumTileSize(mTileSize);
mProgram = shaderProgram;
break;
default:
throw new RuntimeException("Filter FillLight does not support frames of " + "target " + target + "!");
}
mTarget = target;
}
use of android.filterfw.core.ShaderProgram in project platform_frameworks_base by android.
the class FisheyeFilter method initProgram.
public void initProgram(FilterContext context, int target) {
switch(target) {
case FrameFormat.TARGET_GPU:
ShaderProgram shaderProgram = new ShaderProgram(context, mFisheyeShader);
shaderProgram.setMaximumTileSize(mTileSize);
mProgram = shaderProgram;
break;
default:
throw new RuntimeException("Filter FisheyeFilter does not support frames of " + "target " + target + "!");
}
mTarget = target;
}
use of android.filterfw.core.ShaderProgram in project platform_frameworks_base by android.
the class BitmapOverlayFilter method initProgram.
public void initProgram(FilterContext context, int target) {
switch(target) {
case FrameFormat.TARGET_GPU:
ShaderProgram shaderProgram = new ShaderProgram(context, mOverlayShader);
shaderProgram.setMaximumTileSize(mTileSize);
mProgram = shaderProgram;
break;
default:
throw new RuntimeException("Filter FisheyeFilter does not support frames of " + "target " + target + "!");
}
mTarget = target;
}
use of android.filterfw.core.ShaderProgram in project platform_frameworks_base by android.
the class BlackWhiteFilter method initProgram.
public void initProgram(FilterContext context, int target) {
switch(target) {
case FrameFormat.TARGET_GPU:
ShaderProgram shaderProgram = new ShaderProgram(context, mBlackWhiteShader);
shaderProgram.setMaximumTileSize(mTileSize);
mProgram = shaderProgram;
updateParameters();
break;
default:
throw new RuntimeException("Filter Sharpen does not support frames of " + "target " + target + "!");
}
mTarget = target;
}
use of android.filterfw.core.ShaderProgram in project platform_frameworks_base by android.
the class MediaSource method prepare.
@Override
protected void prepare(FilterContext context) {
if (mLogVerbose)
Log.v(TAG, "Preparing MediaSource");
mFrameExtractor = new ShaderProgram(context, mFrameShader);
// SurfaceTexture defines (0,0) to be bottom-left. The filter framework
// defines (0,0) as top-left, so do the flip here.
mFrameExtractor.setSourceRect(0, 1, 1, -1);
createFormats();
}
Aggregations