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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user