use of android.filterfw.core.FrameManager in project android_frameworks_base by ResurrectionRemix.
the class FilterEffect method frameFromTexture.
/**
* Converts a texture into a Frame.
*/
protected Frame frameFromTexture(int texId, int width, int height) {
FrameManager manager = getFilterContext().getFrameManager();
FrameFormat format = ImageFormat.create(width, height, ImageFormat.COLORSPACE_RGBA, FrameFormat.TARGET_GPU);
Frame frame = manager.newBoundFrame(format, GLFrame.EXISTING_TEXTURE_BINDING, texId);
frame.setTimestamp(Frame.TIMESTAMP_UNKNOWN);
return frame;
}
Aggregations