Skip to content
Snippets Groups Projects
Commit 1532447a authored by Mathew Inwood's avatar Mathew Inwood
Browse files

Add @UnsupportedAppUsage annotations

For packages:
  android.renderscript

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I016f6e720e79c48afe44f4690b5dd99fc81ae780
Merged-In: I1aa8ebca448547031b426a7b305c5c3d6fcf2652
parent 5caebe34
No related branches found
No related tags found
No related merge requests found
Showing
with 115 additions and 90 deletions
......@@ -4254,96 +4254,6 @@ Landroid/R$styleable;->View_visibility:I
Landroid/R$styleable;->Window:[I
Landroid/R$styleable;->Window_windowBackground:I
Landroid/R$styleable;->Window_windowFrame:I
Landroid/renderscript/BaseObj;->mRS:Landroid/renderscript/RenderScript;
Landroid/renderscript/Element;->createUser(Landroid/renderscript/RenderScript;Landroid/renderscript/Element$DataType;)Landroid/renderscript/Element;
Landroid/renderscript/FileA3D$EntryType;->MESH:Landroid/renderscript/FileA3D$EntryType;
Landroid/renderscript/FileA3D$IndexEntry;->getEntryType()Landroid/renderscript/FileA3D$EntryType;
Landroid/renderscript/FileA3D$IndexEntry;->getObject()Landroid/renderscript/BaseObj;
Landroid/renderscript/FileA3D;->createFromResource(Landroid/renderscript/RenderScript;Landroid/content/res/Resources;I)Landroid/renderscript/FileA3D;
Landroid/renderscript/FileA3D;->getIndexEntry(I)Landroid/renderscript/FileA3D$IndexEntry;
Landroid/renderscript/Font$Style;->ITALIC:Landroid/renderscript/Font$Style;
Landroid/renderscript/Font;->create(Landroid/renderscript/RenderScript;Landroid/content/res/Resources;Ljava/lang/String;Landroid/renderscript/Font$Style;F)Landroid/renderscript/Font;
Landroid/renderscript/Matrix4f;->mMat:[F
Landroid/renderscript/Mesh$AllocationBuilder;-><init>(Landroid/renderscript/RenderScript;)V
Landroid/renderscript/Mesh$AllocationBuilder;->addIndexSetAllocation(Landroid/renderscript/Allocation;Landroid/renderscript/Mesh$Primitive;)Landroid/renderscript/Mesh$AllocationBuilder;
Landroid/renderscript/Mesh$AllocationBuilder;->addIndexSetType(Landroid/renderscript/Mesh$Primitive;)Landroid/renderscript/Mesh$AllocationBuilder;
Landroid/renderscript/Mesh$AllocationBuilder;->addVertexAllocation(Landroid/renderscript/Allocation;)Landroid/renderscript/Mesh$AllocationBuilder;
Landroid/renderscript/Mesh$AllocationBuilder;->create()Landroid/renderscript/Mesh;
Landroid/renderscript/Mesh$Primitive;->POINT:Landroid/renderscript/Mesh$Primitive;
Landroid/renderscript/Mesh$Primitive;->TRIANGLE:Landroid/renderscript/Mesh$Primitive;
Landroid/renderscript/Mesh$TriangleMeshBuilder;-><init>(Landroid/renderscript/RenderScript;II)V
Landroid/renderscript/Mesh$TriangleMeshBuilder;->addTriangle(III)Landroid/renderscript/Mesh$TriangleMeshBuilder;
Landroid/renderscript/Mesh$TriangleMeshBuilder;->addVertex(FF)Landroid/renderscript/Mesh$TriangleMeshBuilder;
Landroid/renderscript/Mesh$TriangleMeshBuilder;->create(Z)Landroid/renderscript/Mesh;
Landroid/renderscript/Mesh;->getVertexAllocation(I)Landroid/renderscript/Allocation;
Landroid/renderscript/Program$BaseProgramBuilder;-><init>(Landroid/renderscript/RenderScript;)V
Landroid/renderscript/Program$BaseProgramBuilder;->mConstantCount:I
Landroid/renderscript/Program$BaseProgramBuilder;->mConstants:[Landroid/renderscript/Type;
Landroid/renderscript/Program$BaseProgramBuilder;->mInputCount:I
Landroid/renderscript/Program$BaseProgramBuilder;->mInputs:[Landroid/renderscript/Element;
Landroid/renderscript/Program$BaseProgramBuilder;->mOutputCount:I
Landroid/renderscript/Program$BaseProgramBuilder;->mOutputs:[Landroid/renderscript/Element;
Landroid/renderscript/Program$BaseProgramBuilder;->mRS:Landroid/renderscript/RenderScript;
Landroid/renderscript/Program$BaseProgramBuilder;->mShader:Ljava/lang/String;
Landroid/renderscript/Program$BaseProgramBuilder;->mTextureCount:I
Landroid/renderscript/Program$TextureType;->TEXTURE_2D:Landroid/renderscript/Program$TextureType;
Landroid/renderscript/ProgramFragment$Builder;-><init>(Landroid/renderscript/RenderScript;)V
Landroid/renderscript/ProgramFragment$Builder;->create()Landroid/renderscript/ProgramFragment;
Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;->MODULATE:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;
Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;->REPLACE:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;
Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;->ALPHA:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;
Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;->RGB:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;
Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;->RGBA:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;
Landroid/renderscript/ProgramFragmentFixedFunction$Builder;-><init>(Landroid/renderscript/RenderScript;)V
Landroid/renderscript/ProgramFragmentFixedFunction$Builder;->create()Landroid/renderscript/ProgramFragmentFixedFunction;
Landroid/renderscript/ProgramFragmentFixedFunction$Builder;->setTexture(Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;I)Landroid/renderscript/ProgramFragmentFixedFunction$Builder;
Landroid/renderscript/ProgramFragmentFixedFunction$Builder;->setVaryingColor(Z)Landroid/renderscript/ProgramFragmentFixedFunction$Builder;
Landroid/renderscript/ProgramRaster$Builder;-><init>(Landroid/renderscript/RenderScript;)V
Landroid/renderscript/ProgramRaster$Builder;->create()Landroid/renderscript/ProgramRaster;
Landroid/renderscript/ProgramRaster$Builder;->setPointSpriteEnabled(Z)Landroid/renderscript/ProgramRaster$Builder;
Landroid/renderscript/ProgramStore$BlendDstFunc;->ONE:Landroid/renderscript/ProgramStore$BlendDstFunc;
Landroid/renderscript/ProgramStore$BlendDstFunc;->ONE_MINUS_SRC_ALPHA:Landroid/renderscript/ProgramStore$BlendDstFunc;
Landroid/renderscript/ProgramStore$BlendDstFunc;->ZERO:Landroid/renderscript/ProgramStore$BlendDstFunc;
Landroid/renderscript/ProgramStore$BlendSrcFunc;->ONE:Landroid/renderscript/ProgramStore$BlendSrcFunc;
Landroid/renderscript/ProgramStore$BlendSrcFunc;->SRC_ALPHA:Landroid/renderscript/ProgramStore$BlendSrcFunc;
Landroid/renderscript/ProgramStore$Builder;-><init>(Landroid/renderscript/RenderScript;)V
Landroid/renderscript/ProgramStore$Builder;->create()Landroid/renderscript/ProgramStore;
Landroid/renderscript/ProgramStore$Builder;->setBlendFunc(Landroid/renderscript/ProgramStore$BlendSrcFunc;Landroid/renderscript/ProgramStore$BlendDstFunc;)Landroid/renderscript/ProgramStore$Builder;
Landroid/renderscript/ProgramStore$Builder;->setDepthFunc(Landroid/renderscript/ProgramStore$DepthFunc;)Landroid/renderscript/ProgramStore$Builder;
Landroid/renderscript/ProgramStore$Builder;->setDepthMaskEnabled(Z)Landroid/renderscript/ProgramStore$Builder;
Landroid/renderscript/ProgramStore$Builder;->setDitherEnabled(Z)Landroid/renderscript/ProgramStore$Builder;
Landroid/renderscript/ProgramStore$DepthFunc;->ALWAYS:Landroid/renderscript/ProgramStore$DepthFunc;
Landroid/renderscript/ProgramStore$DepthFunc;->LESS:Landroid/renderscript/ProgramStore$DepthFunc;
Landroid/renderscript/ProgramStore;->BLEND_ALPHA_DEPTH_NONE(Landroid/renderscript/RenderScript;)Landroid/renderscript/ProgramStore;
Landroid/renderscript/ProgramVertex$Builder;-><init>(Landroid/renderscript/RenderScript;)V
Landroid/renderscript/ProgramVertex$Builder;->addInput(Landroid/renderscript/Element;)Landroid/renderscript/ProgramVertex$Builder;
Landroid/renderscript/ProgramVertex$Builder;->create()Landroid/renderscript/ProgramVertex;
Landroid/renderscript/ProgramVertexFixedFunction$Builder;-><init>(Landroid/renderscript/RenderScript;)V
Landroid/renderscript/ProgramVertexFixedFunction$Builder;->create()Landroid/renderscript/ProgramVertexFixedFunction;
Landroid/renderscript/ProgramVertexFixedFunction$Constants;-><init>(Landroid/renderscript/RenderScript;)V
Landroid/renderscript/ProgramVertexFixedFunction$Constants;->setProjection(Landroid/renderscript/Matrix4f;)V
Landroid/renderscript/ProgramVertexFixedFunction;->bindConstants(Landroid/renderscript/ProgramVertexFixedFunction$Constants;)V
Landroid/renderscript/RenderScript;->create(Landroid/content/Context;I)Landroid/renderscript/RenderScript;
Landroid/renderscript/RenderScript;->create(Landroid/content/Context;ILandroid/renderscript/RenderScript$ContextType;I)Landroid/renderscript/RenderScript;
Landroid/renderscript/RenderScript;->getMinorID()J
Landroid/renderscript/RenderScript;->mMessageCallback:Landroid/renderscript/RenderScript$RSMessageHandler;
Landroid/renderscript/RenderScript;->nScriptCCreate(Ljava/lang/String;Ljava/lang/String;[BI)J
Landroid/renderscript/RenderScript;->sPointerSize:I
Landroid/renderscript/RenderScript;->validate()V
Landroid/renderscript/RenderScriptCacheDir;->mCacheDir:Ljava/io/File;
Landroid/renderscript/RenderScriptCacheDir;->setupDiskCache(Ljava/io/File;)V
Landroid/renderscript/RenderScriptGL$SurfaceConfig;-><init>()V
Landroid/renderscript/RenderScriptGL$SurfaceConfig;->setDepth(II)V
Landroid/renderscript/RenderScriptGL;-><init>(Landroid/content/Context;Landroid/renderscript/RenderScriptGL$SurfaceConfig;)V
Landroid/renderscript/RenderScriptGL;->bindProgramRaster(Landroid/renderscript/ProgramRaster;)V
Landroid/renderscript/RenderScriptGL;->bindProgramStore(Landroid/renderscript/ProgramStore;)V
Landroid/renderscript/RenderScriptGL;->bindProgramVertex(Landroid/renderscript/ProgramVertex;)V
Landroid/renderscript/RenderScriptGL;->bindRootScript(Landroid/renderscript/Script;)V
Landroid/renderscript/RenderScriptGL;->setSurface(Landroid/view/SurfaceHolder;II)V
Landroid/renderscript/RSSurfaceView;-><init>(Landroid/content/Context;)V
Landroid/renderscript/RSSurfaceView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
Landroid/renderscript/Script$Builder;-><init>(Landroid/renderscript/RenderScript;)V
Landroid/renderscript/Script$Builder;->mRS:Landroid/renderscript/RenderScript;
Landroid/security/Credentials;->convertToPem([Ljava/security/cert/Certificate;)[B
Landroid/security/Credentials;->getInstance()Landroid/security/Credentials;
Landroid/security/Credentials;->install(Landroid/content/Context;Ljava/lang/String;[B)V
......
......@@ -16,6 +16,7 @@
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
import dalvik.system.CloseGuard;
import java.util.concurrent.locks.ReentrantReadWriteLock;
......@@ -73,6 +74,7 @@ public class BaseObj {
final CloseGuard guard = CloseGuard.get();
private boolean mDestroyed;
private String mName;
@UnsupportedAppUsage
RenderScript mRS;
/**
......
......@@ -16,6 +16,8 @@
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
/**
* <p>An Element represents one item within an {@link
* android.renderscript.Allocation}. An Element is roughly equivalent to a C
......@@ -1146,6 +1148,7 @@ public class Element extends BaseObj {
* @param dt The DataType for the new element.
* @return Element
*/
@UnsupportedAppUsage
static Element createUser(RenderScript rs, DataType dt) {
DataKind dk = DataKind.USER;
boolean norm = false;
......
......@@ -19,6 +19,7 @@ package android.renderscript;
import java.io.File;
import java.io.InputStream;
import android.annotation.UnsupportedAppUsage;
import android.content.res.AssetManager;
import android.content.res.Resources;
......@@ -53,6 +54,7 @@ public class FileA3D extends BaseObj {
* @deprecated in API 16
* RenderScript Mesh object
**/
@UnsupportedAppUsage
MESH (1);
int mID;
......@@ -100,6 +102,7 @@ public class FileA3D extends BaseObj {
* @return type of a renderscript object the index entry
* describes
*/
@UnsupportedAppUsage
public EntryType getEntryType() {
return mEntryType;
}
......@@ -109,6 +112,7 @@ public class FileA3D extends BaseObj {
* Used to load the object described by the index entry
* @return base renderscript object described by the entry
*/
@UnsupportedAppUsage
public BaseObj getObject() {
mRS.validate();
BaseObj obj = internalCreate(mRS, this);
......@@ -212,6 +216,7 @@ public class FileA3D extends BaseObj {
*
* @return entry in the a3d file described by the index
*/
@UnsupportedAppUsage
public IndexEntry getIndexEntry(int index) {
if(getIndexEntryCount() == 0 || index < 0 || index >= mFileEntries.length) {
return null;
......@@ -284,6 +289,7 @@ public class FileA3D extends BaseObj {
*
* @return a3d file containing renderscript objects
*/
@UnsupportedAppUsage
static public FileA3D createFromResource(RenderScript rs, Resources res, int id) {
rs.validate();
......
......@@ -23,6 +23,7 @@ import java.util.Map;
import android.os.Environment;
import android.annotation.UnsupportedAppUsage;
import android.content.res.AssetManager;
import android.content.res.Resources;
......@@ -85,6 +86,7 @@ public class Font extends BaseObj {
/**
* @deprecated in API 16
*/
@UnsupportedAppUsage
ITALIC,
/**
* @deprecated in API 16
......@@ -236,6 +238,7 @@ public class Font extends BaseObj {
*
* Returns default font if no match could be found.
*/
@UnsupportedAppUsage
static public Font create(RenderScript rs, Resources res, String familyName, Style fontStyle, float pointSize) {
String fileName = getFontFileName(familyName, fontStyle);
String fontPath = Environment.getRootDirectory().getAbsolutePath();
......
......@@ -16,6 +16,7 @@
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
import java.lang.Math;
......@@ -489,5 +490,6 @@ public class Matrix4f {
}
}
@UnsupportedAppUsage
final float[] mMat;
}
......@@ -16,6 +16,7 @@
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
import java.util.Vector;
/**
......@@ -49,6 +50,7 @@ public class Mesh extends BaseObj {
* @deprecated in API 16
* Vertex data will be rendered as a series of points
*/
@UnsupportedAppUsage
POINT (0),
/**
* @deprecated in API 16
......@@ -64,6 +66,7 @@ public class Mesh extends BaseObj {
* @deprecated in API 16
* Vertices will be rendered as individual triangles
*/
@UnsupportedAppUsage
TRIANGLE (3),
/**
* @deprecated in API 16
......@@ -111,6 +114,7 @@ public class Mesh extends BaseObj {
* @return vertex data allocation at the given index
*
**/
@UnsupportedAppUsage
public Allocation getVertexAllocation(int slot) {
return mVertexBuffers[slot];
}
......@@ -424,6 +428,7 @@ public class Mesh extends BaseObj {
/**
* @deprecated in API 16
**/
@UnsupportedAppUsage
public AllocationBuilder(RenderScript rs) {
mRS = rs;
mVertexTypeCount = 0;
......@@ -458,6 +463,7 @@ public class Mesh extends BaseObj {
*
* @return this
**/
@UnsupportedAppUsage
public AllocationBuilder addVertexAllocation(Allocation a) throws IllegalStateException {
if (mVertexTypeCount >= mVertexTypes.length) {
throw new IllegalStateException("Max vertex types exceeded.");
......@@ -479,6 +485,7 @@ public class Mesh extends BaseObj {
*
* @return this
**/
@UnsupportedAppUsage
public AllocationBuilder addIndexSetAllocation(Allocation a, Primitive p) {
Entry indexType = new Entry();
indexType.a = a;
......@@ -495,6 +502,7 @@ public class Mesh extends BaseObj {
*
* @return this
**/
@UnsupportedAppUsage
public AllocationBuilder addIndexSetType(Primitive p) {
Entry indexType = new Entry();
indexType.a = null;
......@@ -508,6 +516,7 @@ public class Mesh extends BaseObj {
* Create a Mesh object from the current state of the builder
*
**/
@UnsupportedAppUsage
public Mesh create() {
mRS.validate();
......@@ -596,6 +605,7 @@ public class Mesh extends BaseObj {
* channels are present in the mesh
*
**/
@UnsupportedAppUsage
public TriangleMeshBuilder(RenderScript rs, int vtxSize, int flags) {
mRS = rs;
mVtxCount = 0;
......@@ -652,6 +662,7 @@ public class Mesh extends BaseObj {
* @return this
*
**/
@UnsupportedAppUsage
public TriangleMeshBuilder addVertex(float x, float y) {
if (mVtxSize != 2) {
throw new IllegalStateException("add mistmatch with declared components.");
......@@ -757,6 +768,7 @@ public class Mesh extends BaseObj {
*
* @return this
**/
@UnsupportedAppUsage
public TriangleMeshBuilder addTriangle(int idx1, int idx2, int idx3) {
if((idx1 >= mMaxIndex) || (idx1 < 0) ||
(idx2 >= mMaxIndex) || (idx2 < 0) ||
......@@ -789,6 +801,7 @@ public class Mesh extends BaseObj {
* accessible memory
*
**/
@UnsupportedAppUsage
public Mesh create(boolean uploadToBufferObject) {
Element.Builder b = new Element.Builder(mRS);
b.add(Element.createVector(mRS,
......
......@@ -21,6 +21,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import android.annotation.UnsupportedAppUsage;
import android.content.res.Resources;
import android.util.Log;
......@@ -45,6 +46,7 @@ public class Program extends BaseObj {
*
**/
public enum TextureType {
@UnsupportedAppUsage
TEXTURE_2D (0),
TEXTURE_CUBE (1);
......@@ -199,20 +201,30 @@ public class Program extends BaseObj {
public static class BaseProgramBuilder {
@UnsupportedAppUsage
RenderScript mRS;
@UnsupportedAppUsage
Element mInputs[];
@UnsupportedAppUsage
Element mOutputs[];
@UnsupportedAppUsage
Type mConstants[];
Type mTextures[];
TextureType mTextureTypes[];
String mTextureNames[];
@UnsupportedAppUsage
int mInputCount;
@UnsupportedAppUsage
int mOutputCount;
@UnsupportedAppUsage
int mConstantCount;
@UnsupportedAppUsage
int mTextureCount;
@UnsupportedAppUsage
String mShader;
@UnsupportedAppUsage
protected BaseProgramBuilder(RenderScript rs) {
mRS = rs;
mInputs = new Element[MAX_INPUT];
......
......@@ -16,6 +16,8 @@
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
/**
* @hide
......@@ -50,6 +52,7 @@ public class ProgramFragment extends Program {
*
* @param rs Context to which the program will belong.
*/
@UnsupportedAppUsage
public Builder(RenderScript rs) {
super(rs);
}
......@@ -60,6 +63,7 @@ public class ProgramFragment extends Program {
*
* @return ProgramFragment
*/
@UnsupportedAppUsage
public ProgramFragment create() {
mRS.validate();
long[] tmp = new long[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
......
......@@ -16,6 +16,8 @@
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
/**
* @hide
......@@ -102,10 +104,12 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
/**
* @deprecated in API 16
**/
@UnsupportedAppUsage
REPLACE (1),
/**
* @deprecated in API 16
**/
@UnsupportedAppUsage
MODULATE (2),
/**
* @deprecated in API 16
......@@ -128,6 +132,7 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
/**
* @deprecated in API 16
**/
@UnsupportedAppUsage
ALPHA (1),
/**
* @deprecated in API 16
......@@ -136,10 +141,12 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
/**
* @deprecated in API 16
**/
@UnsupportedAppUsage
RGB (3),
/**
* @deprecated in API 16
**/
@UnsupportedAppUsage
RGBA (4);
int mID;
......@@ -228,6 +235,7 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
*
* @param rs Context to which the program will belong.
*/
@UnsupportedAppUsage
public Builder(RenderScript rs) {
mRS = rs;
mSlots = new Slot[MAX_TEXTURE];
......@@ -248,6 +256,7 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
*
* @return this
*/
@UnsupportedAppUsage
public Builder setTexture(EnvMode env, Format fmt, int slot)
throws IllegalArgumentException {
if((slot < 0) || (slot >= MAX_TEXTURE)) {
......@@ -277,6 +286,7 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
* fragment shader
*
**/
@UnsupportedAppUsage
public Builder setVaryingColor(boolean enable) {
mVaryingColorEnable = enable;
return this;
......@@ -288,6 +298,7 @@ public class ProgramFragmentFixedFunction extends ProgramFragment {
* state of the builder.
*
*/
@UnsupportedAppUsage
public ProgramFragmentFixedFunction create() {
InternalBuilder sb = new InternalBuilder(mRS);
mNumTextures = 0;
......
......@@ -16,6 +16,8 @@
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
/**
* @hide
......@@ -124,6 +126,7 @@ public class ProgramRaster extends BaseObj {
/**
* @deprecated in API 16
*/
@UnsupportedAppUsage
public Builder(RenderScript rs) {
mRS = rs;
mPointSprite = false;
......@@ -133,6 +136,7 @@ public class ProgramRaster extends BaseObj {
/**
* @deprecated in API 16
*/
@UnsupportedAppUsage
public Builder setPointSpriteEnabled(boolean enable) {
mPointSprite = enable;
return this;
......@@ -149,6 +153,7 @@ public class ProgramRaster extends BaseObj {
/**
* @deprecated in API 16
*/
@UnsupportedAppUsage
public ProgramRaster create() {
mRS.validate();
long id = mRS.nProgramRasterCreate(mPointSprite, mCullMode.mID);
......
......@@ -16,6 +16,8 @@
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
/**
* @hide
......@@ -45,11 +47,13 @@ public class ProgramStore extends BaseObj {
/**
* Always drawn
*/
@UnsupportedAppUsage
ALWAYS (0),
/**
* Drawn if the incoming depth value is less than that in the
* depth buffer
*/
@UnsupportedAppUsage
LESS (1),
/**
* Drawn if the incoming depth value is less or equal to that in
......@@ -93,9 +97,11 @@ public class ProgramStore extends BaseObj {
*/
public enum BlendSrcFunc {
ZERO (0),
@UnsupportedAppUsage
ONE (1),
DST_COLOR (2),
ONE_MINUS_DST_COLOR (3),
@UnsupportedAppUsage
SRC_ALPHA (4),
ONE_MINUS_SRC_ALPHA (5),
DST_ALPHA (6),
......@@ -118,11 +124,14 @@ public class ProgramStore extends BaseObj {
*
*/
public enum BlendDstFunc {
@UnsupportedAppUsage
ZERO (0),
@UnsupportedAppUsage
ONE (1),
SRC_COLOR (2),
ONE_MINUS_SRC_COLOR (3),
SRC_ALPHA (4),
@UnsupportedAppUsage
ONE_MINUS_SRC_ALPHA (5),
DST_ALPHA (6),
ONE_MINUS_DST_ALPHA (7);
......@@ -299,6 +308,7 @@ public class ProgramStore extends BaseObj {
*
* @param rs Context to which the program will belong.
**/
@UnsupportedAppUsage
public static ProgramStore BLEND_ALPHA_DEPTH_NONE(RenderScript rs) {
if(rs.mProgramStore_BLEND_ALPHA_DEPTH_NO_DEPTH == null) {
ProgramStore.Builder builder = new ProgramStore.Builder(rs);
......@@ -328,6 +338,7 @@ public class ProgramStore extends BaseObj {
BlendDstFunc mBlendDst;
boolean mDither;
@UnsupportedAppUsage
public Builder(RenderScript rs) {
mRS = rs;
mDepthFunc = DepthFunc.ALWAYS;
......@@ -347,6 +358,7 @@ public class ProgramStore extends BaseObj {
*
* @return this
*/
@UnsupportedAppUsage
public Builder setDepthFunc(DepthFunc func) {
mDepthFunc = func;
return this;
......@@ -360,6 +372,7 @@ public class ProgramStore extends BaseObj {
*
* @return this
*/
@UnsupportedAppUsage
public Builder setDepthMaskEnabled(boolean enable) {
mDepthMask = enable;
return this;
......@@ -394,6 +407,7 @@ public class ProgramStore extends BaseObj {
*
* @return this
*/
@UnsupportedAppUsage
public Builder setBlendFunc(BlendSrcFunc src, BlendDstFunc dst) {
mBlendSrc = src;
mBlendDst = dst;
......@@ -408,6 +422,7 @@ public class ProgramStore extends BaseObj {
*
* @return this
*/
@UnsupportedAppUsage
public Builder setDitherEnabled(boolean enable) {
mDither = enable;
return this;
......@@ -416,6 +431,7 @@ public class ProgramStore extends BaseObj {
/**
* Creates a program store from the current state of the builder
*/
@UnsupportedAppUsage
public ProgramStore create() {
mRS.validate();
long id = mRS.nProgramStoreCreate(mColorMaskR, mColorMaskG, mColorMaskB, mColorMaskA,
......
......@@ -38,6 +38,8 @@
**/
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
/**
* @hide
......@@ -90,6 +92,7 @@ public class ProgramVertex extends Program {
*
* @param rs Context to which the program will belong.
*/
@UnsupportedAppUsage
public Builder(RenderScript rs) {
super(rs);
}
......@@ -102,6 +105,7 @@ public class ProgramVertex extends Program {
* structure
* @return self
*/
@UnsupportedAppUsage
public Builder addInput(Element e) throws IllegalStateException {
// Should check for consistant and non-conflicting names...
if(mInputCount >= MAX_INPUT) {
......@@ -120,6 +124,7 @@ public class ProgramVertex extends Program {
*
* @return ProgramVertex
*/
@UnsupportedAppUsage
public ProgramVertex create() {
mRS.validate();
long[] tmp = new long[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
......
......@@ -16,6 +16,8 @@
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
/**
* @hide
......@@ -38,6 +40,7 @@ public class ProgramVertexFixedFunction extends ProgramVertex {
*
* @param va allocation containing fixed function matrices
*/
@UnsupportedAppUsage
public void bindConstants(Constants va) {
mRS.validate();
bindConstants(va.getAllocation(), 0);
......@@ -118,6 +121,7 @@ public class ProgramVertexFixedFunction extends ProgramVertex {
*
* @param rs Context to which the program will belong.
*/
@UnsupportedAppUsage
public Builder(RenderScript rs) {
mRS = rs;
}
......@@ -170,6 +174,7 @@ public class ProgramVertexFixedFunction extends ProgramVertex {
*
* @return Fixed function emulation ProgramVertex
*/
@UnsupportedAppUsage
public ProgramVertexFixedFunction create() {
buildShaderString();
......@@ -215,6 +220,7 @@ public class ProgramVertexFixedFunction extends ProgramVertex {
*
* @param rs Context to which the allocation will belong.
**/
@UnsupportedAppUsage
public Constants(RenderScript rs) {
Type constInputType = ProgramVertexFixedFunction.Builder.getConstantInputType(rs);
mAlloc = Allocation.createTyped(rs, constInputType);
......@@ -268,6 +274,7 @@ public class ProgramVertexFixedFunction extends ProgramVertex {
*
* @param m projection matrix
*/
@UnsupportedAppUsage
public void setProjection(Matrix4f m) {
mProjection.load(m);
addToBuffer(PROJECTION_OFFSET*4, m);
......
......@@ -16,6 +16,7 @@
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.util.AttributeSet;
import android.view.SurfaceHolder;
......@@ -42,6 +43,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback
* must call {@link android.opengl.GLSurfaceView#setRenderer} to
* register a renderer.
*/
@UnsupportedAppUsage
public RSSurfaceView(Context context) {
super(context);
init();
......@@ -54,6 +56,7 @@ public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback
* must call {@link android.opengl.GLSurfaceView#setRenderer} to
* register a renderer.
*/
@UnsupportedAppUsage
public RSSurfaceView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
......
......@@ -22,6 +22,7 @@ import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
......@@ -103,6 +104,7 @@ public class RenderScript {
* Detect the bitness of the VM to allow FieldPacker to do the right thing.
*/
static native int rsnSystemGetPointerSize();
@UnsupportedAppUsage
static int sPointerSize;
static {
......@@ -153,6 +155,7 @@ public class RenderScript {
* @return Always return 1
*
*/
@UnsupportedAppUsage
public static long getMinorID() {
return 1;
}
......@@ -833,6 +836,7 @@ public class RenderScript {
native long rsnScriptCCreate(long con, String resName, String cacheDir,
byte[] script, int length);
@UnsupportedAppUsage
synchronized long nScriptCCreate(String resName, String cacheDir, byte[] script, int length) {
validate();
return rsnScriptCCreate(mContext, resName, cacheDir, script, length);
......@@ -1158,6 +1162,7 @@ public class RenderScript {
* sendToClient} by scripts from this context.
*
*/
@UnsupportedAppUsage
RSMessageHandler mMessageCallback = null;
public void setMessageHandler(RSMessageHandler msg) {
......@@ -1232,6 +1237,7 @@ public class RenderScript {
}
}
@UnsupportedAppUsage
void validate() {
if (mContext == 0) {
throw new RSInvalidStateException("Calling RS with no Context active.");
......@@ -1495,6 +1501,7 @@ public class RenderScript {
* @param sdkVersion The target SDK Version.
* @return RenderScript
*/
@UnsupportedAppUsage
public static RenderScript create(Context ctx, int sdkVersion) {
return create(ctx, sdkVersion, ContextType.NORMAL, CREATE_FLAG_NONE);
}
......@@ -1508,6 +1515,7 @@ public class RenderScript {
* @param flags The OR of the CREATE_FLAG_* options desired
* @return RenderScript
*/
@UnsupportedAppUsage
private static RenderScript create(Context ctx, int sdkVersion, ContextType ct, int flags) {
if (sdkVersion < 23) {
return internalCreate(ctx, sdkVersion, ct, flags);
......
......@@ -16,6 +16,7 @@
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
import java.io.File;
/**
......@@ -30,11 +31,13 @@ public class RenderScriptCacheDir {
* @hide
* @param cacheDir A directory the current process can write to
*/
@UnsupportedAppUsage
public static void setupDiskCache(File cacheDir) {
// Defer creation of cache path to nScriptCCreate().
mCacheDir = cacheDir;
}
@UnsupportedAppUsage
static File mCacheDir;
}
......@@ -16,6 +16,7 @@
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.SurfaceTexture;
import android.view.Surface;
......@@ -65,6 +66,7 @@ public class RenderScriptGL extends RenderScript {
/**
* @deprecated in API 16
*/
@UnsupportedAppUsage
public SurfaceConfig() {
}
......@@ -132,6 +134,7 @@ public class RenderScriptGL extends RenderScript {
* @param minimum
* @param preferred
*/
@UnsupportedAppUsage
public void setDepth(int minimum, int preferred) {
validateRange(minimum, preferred, 0, 24);
mDepthMin = minimum;
......@@ -169,6 +172,7 @@ public class RenderScriptGL extends RenderScript {
* @param ctx The context.
* @param sc The desired format of the primary rendering surface.
*/
@UnsupportedAppUsage
public RenderScriptGL(Context ctx, SurfaceConfig sc) {
super(ctx);
mSurfaceConfig = new SurfaceConfig(sc);
......@@ -202,6 +206,7 @@ public class RenderScriptGL extends RenderScript {
* @param h
* @param sur
*/
@UnsupportedAppUsage
public void setSurface(SurfaceHolder sur, int w, int h) {
validate();
Surface s = null;
......@@ -281,6 +286,7 @@ public class RenderScriptGL extends RenderScript {
*
* @param s Graphics script to process rendering requests.
*/
@UnsupportedAppUsage
public void bindRootScript(Script s) {
validate();
nContextBindRootScript((int)safeID(s));
......@@ -293,6 +299,7 @@ public class RenderScriptGL extends RenderScript {
*
* @param p
*/
@UnsupportedAppUsage
public void bindProgramStore(ProgramStore p) {
validate();
nContextBindProgramStore((int)safeID(p));
......@@ -317,6 +324,7 @@ public class RenderScriptGL extends RenderScript {
*
* @param p
*/
@UnsupportedAppUsage
public void bindProgramRaster(ProgramRaster p) {
validate();
nContextBindProgramRaster((int)safeID(p));
......@@ -329,6 +337,7 @@ public class RenderScriptGL extends RenderScript {
*
* @param p
*/
@UnsupportedAppUsage
public void bindProgramVertex(ProgramVertex p) {
validate();
nContextBindProgramVertex((int)safeID(p));
......
......@@ -16,6 +16,7 @@
package android.renderscript;
import android.annotation.UnsupportedAppUsage;
import android.util.SparseArray;
/**
......@@ -475,8 +476,10 @@ public class Script extends BaseObj {
*
*/
public static class Builder {
@UnsupportedAppUsage
RenderScript mRS;
@UnsupportedAppUsage
Builder(RenderScript rs) {
mRS = rs;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment