Merge "Add @UnsupportedAppUsage annotations"

This commit is contained in:
Treehugger Robot
2018-08-06 12:17:06 +00:00
committed by Gerrit Code Review
17 changed files with 83 additions and 66 deletions

View File

@@ -1784,72 +1784,6 @@ Landroid/database/sqlite/SQLiteStatement;-><init>(Landroid/database/sqlite/SQLit
Landroid/database/sqlite/SqliteWrapper;->checkSQLiteException(Landroid/content/Context;Landroid/database/sqlite/SQLiteException;)V Landroid/database/sqlite/SqliteWrapper;->checkSQLiteException(Landroid/content/Context;Landroid/database/sqlite/SQLiteException;)V
Landroid/database/sqlite/SqliteWrapper;->delete(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I Landroid/database/sqlite/SqliteWrapper;->delete(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I
Landroid/database/sqlite/SqliteWrapper;->update(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I Landroid/database/sqlite/SqliteWrapper;->update(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
Landroid/filterfw/core/Filter;-><init>(Ljava/lang/String;)V
Landroid/filterfw/core/Filter;->isAvailable(Ljava/lang/String;)Z
Landroid/filterfw/core/Filter;->setInputValue(Ljava/lang/String;Ljava/lang/Object;)V
Landroid/filterfw/core/FilterContext;->getFrameManager()Landroid/filterfw/core/FrameManager;
Landroid/filterfw/core/FilterContext;->getGLEnvironment()Landroid/filterfw/core/GLEnvironment;
Landroid/filterfw/core/FilterGraph;->getFilter(Ljava/lang/String;)Landroid/filterfw/core/Filter;
Landroid/filterfw/core/FilterGraph;->tearDown(Landroid/filterfw/core/FilterContext;)V
Landroid/filterfw/core/Frame;->getBitmap()Landroid/graphics/Bitmap;
Landroid/filterfw/core/Frame;->getFormat()Landroid/filterfw/core/FrameFormat;
Landroid/filterfw/core/Frame;->getTimestamp()J
Landroid/filterfw/core/Frame;->release()Landroid/filterfw/core/Frame;
Landroid/filterfw/core/Frame;->setInts([I)V
Landroid/filterfw/core/Frame;->setTimestamp(J)V
Landroid/filterfw/core/FrameFormat;->getHeight()I
Landroid/filterfw/core/FrameFormat;->getTarget()I
Landroid/filterfw/core/FrameFormat;->getWidth()I
Landroid/filterfw/core/FrameFormat;->mutableCopy()Landroid/filterfw/core/MutableFrameFormat;
Landroid/filterfw/core/FrameManager;->duplicateFrame(Landroid/filterfw/core/Frame;)Landroid/filterfw/core/Frame;
Landroid/filterfw/core/FrameManager;->newBoundFrame(Landroid/filterfw/core/FrameFormat;IJ)Landroid/filterfw/core/Frame;
Landroid/filterfw/core/FrameManager;->newFrame(Landroid/filterfw/core/FrameFormat;)Landroid/filterfw/core/Frame;
Landroid/filterfw/core/GLEnvironment;->activate()V
Landroid/filterfw/core/GLEnvironment;->activateSurfaceWithId(I)V
Landroid/filterfw/core/GLEnvironment;->deactivate()V
Landroid/filterfw/core/GLEnvironment;->isActive()Z
Landroid/filterfw/core/GLEnvironment;->registerSurfaceFromMediaRecorder(Landroid/media/MediaRecorder;)I
Landroid/filterfw/core/GLEnvironment;->setSurfaceTimestamp(J)V
Landroid/filterfw/core/GLEnvironment;->swapBuffers()V
Landroid/filterfw/core/GLEnvironment;->unregisterSurfaceId(I)V
Landroid/filterfw/core/GLFrame;->generateMipMap()V
Landroid/filterfw/core/GLFrame;->getTextureId()I
Landroid/filterfw/core/GLFrame;->setBitmap(Landroid/graphics/Bitmap;)V
Landroid/filterfw/core/GLFrame;->setTextureParameter(II)V
Landroid/filterfw/core/GraphRunner;->getError()Ljava/lang/Exception;
Landroid/filterfw/core/GraphRunner;->getGraph()Landroid/filterfw/core/FilterGraph;
Landroid/filterfw/core/GraphRunner;->run()V
Landroid/filterfw/core/GraphRunner;->setDoneCallback(Landroid/filterfw/core/GraphRunner$OnRunnerDoneListener;)V
Landroid/filterfw/core/GraphRunner;->stop()V
Landroid/filterfw/core/MutableFrameFormat;-><init>(II)V
Landroid/filterfw/core/MutableFrameFormat;->setBytesPerSample(I)V
Landroid/filterfw/core/MutableFrameFormat;->setDimensions(II)V
Landroid/filterfw/core/Program;->process(Landroid/filterfw/core/Frame;Landroid/filterfw/core/Frame;)V
Landroid/filterfw/core/Program;->process([Landroid/filterfw/core/Frame;Landroid/filterfw/core/Frame;)V
Landroid/filterfw/core/Program;->setHostValue(Ljava/lang/String;Ljava/lang/Object;)V
Landroid/filterfw/core/ShaderProgram;-><init>(Landroid/filterfw/core/FilterContext;Ljava/lang/String;)V
Landroid/filterfw/core/ShaderProgram;->createIdentity(Landroid/filterfw/core/FilterContext;)Landroid/filterfw/core/ShaderProgram;
Landroid/filterfw/core/ShaderProgram;->process([Landroid/filterfw/core/Frame;Landroid/filterfw/core/Frame;)V
Landroid/filterfw/core/ShaderProgram;->setHostValue(Ljava/lang/String;Ljava/lang/Object;)V
Landroid/filterfw/core/ShaderProgram;->setMaximumTileSize(I)V
Landroid/filterfw/core/ShaderProgram;->setSourceRect(FFFF)V
Landroid/filterfw/core/ShaderProgram;->setSourceRegion(Landroid/filterfw/geometry/Quad;)V
Landroid/filterfw/format/ImageFormat;->create(I)Landroid/filterfw/core/MutableFrameFormat;
Landroid/filterfw/format/ImageFormat;->create(II)Landroid/filterfw/core/MutableFrameFormat;
Landroid/filterfw/format/ImageFormat;->create(IIII)Landroid/filterfw/core/MutableFrameFormat;
Landroid/filterfw/geometry/Point;-><init>()V
Landroid/filterfw/geometry/Point;-><init>(FF)V
Landroid/filterfw/geometry/Point;->x:F
Landroid/filterfw/geometry/Point;->y:F
Landroid/filterfw/geometry/Quad;-><init>()V
Landroid/filterfw/geometry/Quad;-><init>(Landroid/filterfw/geometry/Point;Landroid/filterfw/geometry/Point;Landroid/filterfw/geometry/Point;Landroid/filterfw/geometry/Point;)V
Landroid/filterfw/geometry/Quad;->p0:Landroid/filterfw/geometry/Point;
Landroid/filterfw/geometry/Quad;->p1:Landroid/filterfw/geometry/Point;
Landroid/filterfw/geometry/Quad;->p2:Landroid/filterfw/geometry/Point;
Landroid/filterfw/geometry/Quad;->p3:Landroid/filterfw/geometry/Point;
Landroid/filterfw/GraphEnvironment;-><init>()V
Landroid/filterfw/GraphEnvironment;->getRunner(II)Landroid/filterfw/core/GraphRunner;
Landroid/filterfw/GraphEnvironment;->loadGraph(Landroid/content/Context;I)I
Landroid/graphics/ColorMatrixColorFilter;->setColorMatrixArray([F)V Landroid/graphics/ColorMatrixColorFilter;->setColorMatrixArray([F)V
Landroid/graphics/FontFamily;->mNativePtr:J Landroid/graphics/FontFamily;->mNativePtr:J
Landroid/graphics/FontListParser;->parse(Ljava/io/InputStream;)Landroid/text/FontConfig; Landroid/graphics/FontListParser;->parse(Ljava/io/InputStream;)Landroid/text/FontConfig;

View File

@@ -17,6 +17,7 @@
package android.filterfw; package android.filterfw;
import android.annotation.UnsupportedAppUsage;
import android.content.Context; import android.content.Context;
import android.filterfw.core.AsyncRunner; import android.filterfw.core.AsyncRunner;
import android.filterfw.core.FilterGraph; import android.filterfw.core.FilterGraph;
@@ -83,6 +84,7 @@ public class GraphEnvironment extends MffEnvironment {
/** /**
* Create a new GraphEnvironment with default components. * Create a new GraphEnvironment with default components.
*/ */
@UnsupportedAppUsage
public GraphEnvironment() { public GraphEnvironment() {
super(null); super(null);
} }
@@ -128,6 +130,7 @@ public class GraphEnvironment extends MffEnvironment {
* @param resourceId The ID of the graph resource to load. * @param resourceId The ID of the graph resource to load.
* @return A unique ID for the graph. * @return A unique ID for the graph.
*/ */
@UnsupportedAppUsage
public int loadGraph(Context context, int resourceId) { public int loadGraph(Context context, int resourceId) {
// Read the file into a graph // Read the file into a graph
FilterGraph graph = null; FilterGraph graph = null;
@@ -180,6 +183,7 @@ public class GraphEnvironment extends MffEnvironment {
MODE_SYNCHRONOUS or MODE_ASYNCHRONOUS. MODE_SYNCHRONOUS or MODE_ASYNCHRONOUS.
* @return A GraphRunner instance for this graph. * @return A GraphRunner instance for this graph.
*/ */
@UnsupportedAppUsage
public GraphRunner getRunner(int graphId, int executionMode) { public GraphRunner getRunner(int graphId, int executionMode) {
switch (executionMode) { switch (executionMode) {
case MODE_ASYNCHRONOUS: case MODE_ASYNCHRONOUS:

View File

@@ -17,6 +17,7 @@
package android.filterfw.core; package android.filterfw.core;
import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.FilterContext; import android.filterfw.core.FilterContext;
import android.filterfw.core.FilterPort; import android.filterfw.core.FilterPort;
import android.filterfw.core.KeyValueMap; import android.filterfw.core.KeyValueMap;
@@ -69,6 +70,7 @@ public abstract class Filter {
private boolean mLogVerbose; private boolean mLogVerbose;
private static final String TAG = "Filter"; private static final String TAG = "Filter";
@UnsupportedAppUsage
public Filter(String name) { public Filter(String name) {
mName = name; mName = name;
mFramesToRelease = new HashSet<Frame>(); mFramesToRelease = new HashSet<Frame>();
@@ -81,6 +83,7 @@ public abstract class Filter {
/** Tests to see if a given filter is installed on the system. Requires /** Tests to see if a given filter is installed on the system. Requires
* full filter package name, including filterpack. * full filter package name, including filterpack.
*/ */
@UnsupportedAppUsage
public static final boolean isAvailable(String filterName) { public static final boolean isAvailable(String filterName) {
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
Class filterClass; Class filterClass;
@@ -150,6 +153,7 @@ public abstract class Filter {
port.setFrame(frame); port.setFrame(frame);
} }
@UnsupportedAppUsage
public final void setInputValue(String inputName, Object value) { public final void setInputValue(String inputName, Object value) {
setInputFrame(inputName, wrapInputValue(inputName, value)); setInputFrame(inputName, wrapInputValue(inputName, value));
} }

View File

@@ -17,6 +17,7 @@
package android.filterfw.core; package android.filterfw.core;
import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.Filter; import android.filterfw.core.Filter;
import android.filterfw.core.Frame; import android.filterfw.core.Frame;
import android.filterfw.core.FrameManager; import android.filterfw.core.FrameManager;
@@ -36,6 +37,7 @@ public class FilterContext {
private HashMap<String, Frame> mStoredFrames = new HashMap<String, Frame>(); private HashMap<String, Frame> mStoredFrames = new HashMap<String, Frame>();
private Set<FilterGraph> mGraphs = new HashSet<FilterGraph>(); private Set<FilterGraph> mGraphs = new HashSet<FilterGraph>();
@UnsupportedAppUsage
public FrameManager getFrameManager() { public FrameManager getFrameManager() {
return mFrameManager; return mFrameManager;
} }
@@ -52,6 +54,7 @@ public class FilterContext {
} }
} }
@UnsupportedAppUsage
public GLEnvironment getGLEnvironment() { public GLEnvironment getGLEnvironment() {
return mGLEnvironment; return mGLEnvironment;
} }

View File

@@ -30,6 +30,7 @@ import android.filterfw.core.KeyValueMap;
import android.filterpacks.base.FrameBranch; import android.filterpacks.base.FrameBranch;
import android.filterpacks.base.NullFilter; import android.filterpacks.base.NullFilter;
import android.annotation.UnsupportedAppUsage;
import android.util.Log; import android.util.Log;
/** /**
@@ -75,6 +76,7 @@ public class FilterGraph {
return mFilters.contains(filter); return mFilters.contains(filter);
} }
@UnsupportedAppUsage
public Filter getFilter(String name) { public Filter getFilter(String name) {
return mNameMap.get(name); return mNameMap.get(name);
} }
@@ -160,6 +162,7 @@ public class FilterGraph {
mTypeCheckMode = typeCheckMode; mTypeCheckMode = typeCheckMode;
} }
@UnsupportedAppUsage
public void tearDown(FilterContext context) { public void tearDown(FilterContext context) {
if (!mFilters.isEmpty()) { if (!mFilters.isEmpty()) {
flushFrames(); flushFrames();

View File

@@ -17,6 +17,7 @@
package android.filterfw.core; package android.filterfw.core;
import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.FrameFormat; import android.filterfw.core.FrameFormat;
import android.filterfw.core.FrameManager; import android.filterfw.core.FrameManager;
import android.graphics.Bitmap; import android.graphics.Bitmap;
@@ -54,6 +55,7 @@ public abstract class Frame {
mBindingId = bindingId; mBindingId = bindingId;
} }
@UnsupportedAppUsage
public FrameFormat getFormat() { public FrameFormat getFormat() {
return mFormat; return mFormat;
} }
@@ -94,6 +96,7 @@ public abstract class Frame {
public abstract Object getObjectValue(); public abstract Object getObjectValue();
@UnsupportedAppUsage
public abstract void setInts(int[] ints); public abstract void setInts(int[] ints);
public abstract int[] getInts(); public abstract int[] getInts();
@@ -116,12 +119,15 @@ public abstract class Frame {
public abstract void setBitmap(Bitmap bitmap); public abstract void setBitmap(Bitmap bitmap);
@UnsupportedAppUsage
public abstract Bitmap getBitmap(); public abstract Bitmap getBitmap();
@UnsupportedAppUsage
public void setTimestamp(long timestamp) { public void setTimestamp(long timestamp) {
mTimestamp = timestamp; mTimestamp = timestamp;
} }
@UnsupportedAppUsage
public long getTimestamp() { public long getTimestamp() {
return mTimestamp; return mTimestamp;
} }
@@ -138,6 +144,7 @@ public abstract class Frame {
return mRefCount; return mRefCount;
} }
@UnsupportedAppUsage
public Frame release() { public Frame release() {
if (mFrameManager != null) { if (mFrameManager != null) {
return mFrameManager.releaseFrame(this); return mFrameManager.releaseFrame(this);

View File

@@ -17,6 +17,7 @@
package android.filterfw.core; package android.filterfw.core;
import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.KeyValueMap; import android.filterfw.core.KeyValueMap;
import android.filterfw.core.MutableFrameFormat; import android.filterfw.core.MutableFrameFormat;
@@ -90,6 +91,7 @@ public class FrameFormat {
return mBytesPerSample / bytesPerSampleOf(mBaseType); return mBytesPerSample / bytesPerSampleOf(mBaseType);
} }
@UnsupportedAppUsage
public int getTarget() { public int getTarget() {
return mTarget; return mTarget;
} }
@@ -135,10 +137,12 @@ public class FrameFormat {
return (mDimensions != null && mDimensions.length >= 1) ? mDimensions[0] : -1; return (mDimensions != null && mDimensions.length >= 1) ? mDimensions[0] : -1;
} }
@UnsupportedAppUsage
public int getWidth() { public int getWidth() {
return getLength(); return getLength();
} }
@UnsupportedAppUsage
public int getHeight() { public int getHeight() {
return (mDimensions != null && mDimensions.length >= 2) ? mDimensions[1] : -1; return (mDimensions != null && mDimensions.length >= 2) ? mDimensions[1] : -1;
} }
@@ -156,6 +160,7 @@ public class FrameFormat {
return mObjectClass; return mObjectClass;
} }
@UnsupportedAppUsage
public MutableFrameFormat mutableCopy() { public MutableFrameFormat mutableCopy() {
MutableFrameFormat result = new MutableFrameFormat(); MutableFrameFormat result = new MutableFrameFormat();
result.setBaseType(getBaseType()); result.setBaseType(getBaseType());

View File

@@ -17,6 +17,7 @@
package android.filterfw.core; package android.filterfw.core;
import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.Frame; import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat; import android.filterfw.core.FrameFormat;
import android.filterfw.core.MutableFrameFormat; import android.filterfw.core.MutableFrameFormat;
@@ -28,10 +29,13 @@ public abstract class FrameManager {
private FilterContext mContext; private FilterContext mContext;
@UnsupportedAppUsage
public abstract Frame newFrame(FrameFormat format); public abstract Frame newFrame(FrameFormat format);
@UnsupportedAppUsage
public abstract Frame newBoundFrame(FrameFormat format, int bindingType, long bindingId); public abstract Frame newBoundFrame(FrameFormat format, int bindingType, long bindingId);
@UnsupportedAppUsage
public Frame duplicateFrame(Frame frame) { public Frame duplicateFrame(Frame frame) {
Frame result = newFrame(frame.getFormat()); Frame result = newFrame(frame.getFormat());
result.setDataFromFrame(frame); result.setDataFromFrame(frame);

View File

@@ -17,6 +17,7 @@
package android.filterfw.core; package android.filterfw.core;
import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.NativeAllocatorTag; import android.filterfw.core.NativeAllocatorTag;
import android.graphics.SurfaceTexture; import android.graphics.SurfaceTexture;
import android.os.Looper; import android.os.Looper;
@@ -66,6 +67,7 @@ public class GLEnvironment {
} }
} }
@UnsupportedAppUsage
public boolean isActive() { public boolean isActive() {
return nativeIsActive(); return nativeIsActive();
} }
@@ -78,6 +80,7 @@ public class GLEnvironment {
return nativeIsAnyContextActive(); return nativeIsAnyContextActive();
} }
@UnsupportedAppUsage
public void activate() { public void activate() {
if (Looper.myLooper() != null && Looper.myLooper().equals(Looper.getMainLooper())) { if (Looper.myLooper() != null && Looper.myLooper().equals(Looper.getMainLooper())) {
Log.e("FilterFramework", "Activating GL context in UI thread!"); Log.e("FilterFramework", "Activating GL context in UI thread!");
@@ -87,12 +90,14 @@ public class GLEnvironment {
} }
} }
@UnsupportedAppUsage
public void deactivate() { public void deactivate() {
if (mManageContext && !nativeDeactivate()) { if (mManageContext && !nativeDeactivate()) {
throw new RuntimeException("Could not deactivate GLEnvironment!"); throw new RuntimeException("Could not deactivate GLEnvironment!");
} }
} }
@UnsupportedAppUsage
public void swapBuffers() { public void swapBuffers() {
if (!nativeSwapBuffers()) { if (!nativeSwapBuffers()) {
throw new RuntimeException("Error swapping EGL buffers!"); throw new RuntimeException("Error swapping EGL buffers!");
@@ -117,6 +122,7 @@ public class GLEnvironment {
return result; return result;
} }
@UnsupportedAppUsage
public int registerSurfaceFromMediaRecorder(MediaRecorder mediaRecorder) { public int registerSurfaceFromMediaRecorder(MediaRecorder mediaRecorder) {
int result = nativeAddSurfaceFromMediaRecorder(mediaRecorder); int result = nativeAddSurfaceFromMediaRecorder(mediaRecorder);
if (result < 0) { if (result < 0) {
@@ -126,18 +132,21 @@ public class GLEnvironment {
return result; return result;
} }
@UnsupportedAppUsage
public void activateSurfaceWithId(int surfaceId) { public void activateSurfaceWithId(int surfaceId) {
if (!nativeActivateSurfaceId(surfaceId)) { if (!nativeActivateSurfaceId(surfaceId)) {
throw new RuntimeException("Could not activate surface " + surfaceId + "!"); throw new RuntimeException("Could not activate surface " + surfaceId + "!");
} }
} }
@UnsupportedAppUsage
public void unregisterSurfaceId(int surfaceId) { public void unregisterSurfaceId(int surfaceId) {
if (!nativeRemoveSurfaceId(surfaceId)) { if (!nativeRemoveSurfaceId(surfaceId)) {
throw new RuntimeException("Could not unregister surface " + surfaceId + "!"); throw new RuntimeException("Could not unregister surface " + surfaceId + "!");
} }
} }
@UnsupportedAppUsage
public void setSurfaceTimestamp(long timestamp) { public void setSurfaceTimestamp(long timestamp) {
if (!nativeSetSurfaceTimestamp(timestamp)) { if (!nativeSetSurfaceTimestamp(timestamp)) {
throw new RuntimeException("Could not set timestamp for current surface!"); throw new RuntimeException("Could not set timestamp for current surface!");

View File

@@ -17,6 +17,7 @@
package android.filterfw.core; package android.filterfw.core;
import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.Frame; import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat; import android.filterfw.core.FrameFormat;
import android.filterfw.core.FrameManager; import android.filterfw.core.FrameManager;
@@ -223,6 +224,7 @@ public class GLFrame extends Frame {
} }
@Override @Override
@UnsupportedAppUsage
public void setBitmap(Bitmap bitmap) { public void setBitmap(Bitmap bitmap) {
assertFrameMutable(); assertFrameMutable();
assertGLEnvValid(); assertGLEnvValid();
@@ -283,6 +285,7 @@ public class GLFrame extends Frame {
setNativeViewport(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top); setNativeViewport(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
} }
@UnsupportedAppUsage
public void generateMipMap() { public void generateMipMap() {
assertFrameMutable(); assertFrameMutable();
assertGLEnvValid(); assertGLEnvValid();
@@ -291,6 +294,7 @@ public class GLFrame extends Frame {
} }
} }
@UnsupportedAppUsage
public void setTextureParameter(int param, int value) { public void setTextureParameter(int param, int value) {
assertFrameMutable(); assertFrameMutable();
assertGLEnvValid(); assertGLEnvValid();
@@ -300,6 +304,7 @@ public class GLFrame extends Frame {
} }
} }
@UnsupportedAppUsage
public int getTextureId() { public int getTextureId() {
return getNativeTextureId(); return getNativeTextureId();
} }

View File

@@ -17,6 +17,8 @@
package android.filterfw.core; package android.filterfw.core;
import android.annotation.UnsupportedAppUsage;
/** /**
* @hide * @hide
*/ */
@@ -50,6 +52,7 @@ public abstract class GraphRunner {
mFilterContext = context; mFilterContext = context;
} }
@UnsupportedAppUsage
public abstract FilterGraph getGraph(); public abstract FilterGraph getGraph();
public FilterContext getContext() { public FilterContext getContext() {
@@ -81,12 +84,15 @@ public abstract class GraphRunner {
} }
/** Starts running the graph. Will open the filters in the graph if they are not already open. */ /** Starts running the graph. Will open the filters in the graph if they are not already open. */
@UnsupportedAppUsage
public abstract void run(); public abstract void run();
@UnsupportedAppUsage
public abstract void setDoneCallback(OnRunnerDoneListener listener); public abstract void setDoneCallback(OnRunnerDoneListener listener);
public abstract boolean isRunning(); public abstract boolean isRunning();
/** Stops graph execution. As part of stopping, also closes the graph nodes. */ /** Stops graph execution. As part of stopping, also closes the graph nodes. */
@UnsupportedAppUsage
public abstract void stop(); public abstract void stop();
/** Closes the filters in a graph. Can only be called if the graph is not running. */ /** Closes the filters in a graph. Can only be called if the graph is not running. */
@@ -96,5 +102,6 @@ public abstract class GraphRunner {
* Returns the last exception that happened during an asynchronous run. Returns null if * Returns the last exception that happened during an asynchronous run. Returns null if
* there is nothing to report. * there is nothing to report.
*/ */
@UnsupportedAppUsage
public abstract Exception getError(); public abstract Exception getError();
} }

View File

@@ -17,6 +17,7 @@
package android.filterfw.core; package android.filterfw.core;
import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.FrameFormat; import android.filterfw.core.FrameFormat;
import android.filterfw.core.KeyValueMap; import android.filterfw.core.KeyValueMap;
@@ -31,6 +32,7 @@ public class MutableFrameFormat extends FrameFormat {
super(); super();
} }
@UnsupportedAppUsage
public MutableFrameFormat(int baseType, int target) { public MutableFrameFormat(int baseType, int target) {
super(baseType, target); super(baseType, target);
} }
@@ -44,6 +46,7 @@ public class MutableFrameFormat extends FrameFormat {
mTarget = target; mTarget = target;
} }
@UnsupportedAppUsage
public void setBytesPerSample(int bytesPerSample) { public void setBytesPerSample(int bytesPerSample) {
mBytesPerSample = bytesPerSample; mBytesPerSample = bytesPerSample;
mSize = SIZE_UNKNOWN; mSize = SIZE_UNKNOWN;
@@ -61,6 +64,7 @@ public class MutableFrameFormat extends FrameFormat {
mSize = SIZE_UNKNOWN; mSize = SIZE_UNKNOWN;
} }
@UnsupportedAppUsage
public void setDimensions(int width, int height) { public void setDimensions(int width, int height) {
int[] dimensions = new int[2]; int[] dimensions = new int[2];
dimensions[0] = width; dimensions[0] = width;

View File

@@ -17,6 +17,7 @@
package android.filterfw.core; package android.filterfw.core;
import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.Frame; import android.filterfw.core.Frame;
/** /**
@@ -24,14 +25,17 @@ import android.filterfw.core.Frame;
*/ */
public abstract class Program { public abstract class Program {
@UnsupportedAppUsage
public abstract void process(Frame[] inputs, Frame output); public abstract void process(Frame[] inputs, Frame output);
@UnsupportedAppUsage
public void process(Frame input, Frame output) { public void process(Frame input, Frame output) {
Frame[] inputs = new Frame[1]; Frame[] inputs = new Frame[1];
inputs[0] = input; inputs[0] = input;
process(inputs, output); process(inputs, output);
} }
@UnsupportedAppUsage
public abstract void setHostValue(String variableName, Object value); public abstract void setHostValue(String variableName, Object value);
public abstract Object getHostValue(String variableName); public abstract Object getHostValue(String variableName);

View File

@@ -17,6 +17,7 @@
package android.filterfw.core; package android.filterfw.core;
import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.Frame; import android.filterfw.core.Frame;
import android.filterfw.core.NativeAllocatorTag; import android.filterfw.core.NativeAllocatorTag;
import android.filterfw.core.Program; import android.filterfw.core.Program;
@@ -51,6 +52,7 @@ public class ShaderProgram extends Program {
private ShaderProgram(NativeAllocatorTag tag) { private ShaderProgram(NativeAllocatorTag tag) {
} }
@UnsupportedAppUsage
public ShaderProgram(FilterContext context, String fragmentShader) { public ShaderProgram(FilterContext context, String fragmentShader) {
mGLEnvironment = getGLEnvironment(context); mGLEnvironment = getGLEnvironment(context);
allocate(mGLEnvironment, null, fragmentShader); allocate(mGLEnvironment, null, fragmentShader);
@@ -69,6 +71,7 @@ public class ShaderProgram extends Program {
this.setTimer(); this.setTimer();
} }
@UnsupportedAppUsage
public static ShaderProgram createIdentity(FilterContext context) { public static ShaderProgram createIdentity(FilterContext context) {
ShaderProgram program = nativeCreateIdentity(getGLEnvironment(context)); ShaderProgram program = nativeCreateIdentity(getGLEnvironment(context));
program.setTimer(); program.setTimer();
@@ -85,6 +88,7 @@ public class ShaderProgram extends Program {
} }
@Override @Override
@UnsupportedAppUsage
public void process(Frame[] inputs, Frame output) { public void process(Frame[] inputs, Frame output) {
if (mTimer.LOG_MFF_RUNNING_TIMES) { if (mTimer.LOG_MFF_RUNNING_TIMES) {
mTimer.start("glFinish"); mTimer.start("glFinish");
@@ -129,6 +133,7 @@ public class ShaderProgram extends Program {
} }
@Override @Override
@UnsupportedAppUsage
public void setHostValue(String variableName, Object value) { public void setHostValue(String variableName, Object value) {
if (!setUniformValue(variableName, value)) { if (!setUniformValue(variableName, value)) {
throw new RuntimeException("Error setting uniform value for variable '" + throw new RuntimeException("Error setting uniform value for variable '" +
@@ -167,6 +172,7 @@ public class ShaderProgram extends Program {
} }
} }
@UnsupportedAppUsage
public void setSourceRegion(Quad region) { public void setSourceRegion(Quad region) {
setSourceRegion(region.p0.x, region.p0.y, setSourceRegion(region.p0.x, region.p0.y,
region.p1.x, region.p1.y, region.p1.x, region.p1.y,
@@ -181,6 +187,7 @@ public class ShaderProgram extends Program {
region.p3.x, region.p3.y); region.p3.x, region.p3.y);
} }
@UnsupportedAppUsage
public void setSourceRect(float x, float y, float width, float height) { public void setSourceRect(float x, float y, float width, float height) {
setSourceRegion(x, y, x + width, y, x, y + height, x + width, y + height); setSourceRegion(x, y, x + width, y, x, y + height, x + width, y + height);
} }
@@ -225,6 +232,7 @@ public class ShaderProgram extends Program {
} }
} }
@UnsupportedAppUsage
public void setMaximumTileSize(int size) { public void setMaximumTileSize(int size) {
mMaxTileSize = size; mMaxTileSize = size;
} }

View File

@@ -17,6 +17,7 @@
package android.filterfw.format; package android.filterfw.format;
import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.FrameFormat; import android.filterfw.core.FrameFormat;
import android.filterfw.core.MutableFrameFormat; import android.filterfw.core.MutableFrameFormat;
import android.graphics.Bitmap; import android.graphics.Bitmap;
@@ -48,6 +49,7 @@ public class ImageFormat {
return result; return result;
} }
@UnsupportedAppUsage
public static MutableFrameFormat create(int width, public static MutableFrameFormat create(int width,
int height, int height,
int colorspace, int colorspace,
@@ -59,6 +61,7 @@ public class ImageFormat {
target); target);
} }
@UnsupportedAppUsage
public static MutableFrameFormat create(int colorspace, int target) { public static MutableFrameFormat create(int colorspace, int target) {
return create(FrameFormat.SIZE_UNSPECIFIED, return create(FrameFormat.SIZE_UNSPECIFIED,
FrameFormat.SIZE_UNSPECIFIED, FrameFormat.SIZE_UNSPECIFIED,
@@ -67,6 +70,7 @@ public class ImageFormat {
target); target);
} }
@UnsupportedAppUsage
public static MutableFrameFormat create(int colorspace) { public static MutableFrameFormat create(int colorspace) {
return create(FrameFormat.SIZE_UNSPECIFIED, return create(FrameFormat.SIZE_UNSPECIFIED,
FrameFormat.SIZE_UNSPECIFIED, FrameFormat.SIZE_UNSPECIFIED,

View File

@@ -17,6 +17,7 @@
package android.filterfw.geometry; package android.filterfw.geometry;
import android.annotation.UnsupportedAppUsage;
import java.lang.Math; import java.lang.Math;
/** /**
@@ -24,12 +25,16 @@ import java.lang.Math;
*/ */
public class Point { public class Point {
@UnsupportedAppUsage
public float x; public float x;
@UnsupportedAppUsage
public float y; public float y;
@UnsupportedAppUsage
public Point() { public Point() {
} }
@UnsupportedAppUsage
public Point(float x, float y) { public Point(float x, float y) {
this.x = x; this.x = x;
this.y = y; this.y = y;

View File

@@ -17,6 +17,7 @@
package android.filterfw.geometry; package android.filterfw.geometry;
import android.annotation.UnsupportedAppUsage;
import android.filterfw.geometry.Point; import android.filterfw.geometry.Point;
import java.lang.Float; import java.lang.Float;
@@ -29,14 +30,20 @@ import java.util.List;
*/ */
public class Quad { public class Quad {
@UnsupportedAppUsage
public Point p0; public Point p0;
@UnsupportedAppUsage
public Point p1; public Point p1;
@UnsupportedAppUsage
public Point p2; public Point p2;
@UnsupportedAppUsage
public Point p3; public Point p3;
@UnsupportedAppUsage
public Quad() { public Quad() {
} }
@UnsupportedAppUsage
public Quad(Point p0, Point p1, Point p2, Point p3) { public Quad(Point p0, Point p1, Point p2, Point p3) {
this.p0 = p0; this.p0 = p0;
this.p1 = p1; this.p1 = p1;