GFX api cleanup 1.5 of 2
Change-Id: Ib31332ae0b7a6059d4971ea616089cd382ef6895
diff --git a/api/current.txt b/api/current.txt
index 5bb8599..318241e 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -19094,14 +19094,14 @@
method public int getVertexAllocationCount();
}
- public static class Mesh.AllocationBuilder {
- ctor public Mesh.AllocationBuilder(android.renderscript.RenderScript);
- method public android.renderscript.Mesh.AllocationBuilder addIndexSetAllocation(android.renderscript.Allocation, android.renderscript.Mesh.Primitive);
- method public android.renderscript.Mesh.AllocationBuilder addIndexSetType(android.renderscript.Mesh.Primitive);
- method public android.renderscript.Mesh.AllocationBuilder addVertexAllocation(android.renderscript.Allocation) throws java.lang.IllegalStateException;
- method public android.renderscript.Mesh create();
- method public int getCurrentIndexSetIndex();
- method public int getCurrentVertexTypeIndex();
+ public static deprecated class Mesh.AllocationBuilder {
+ ctor public deprecated Mesh.AllocationBuilder(android.renderscript.RenderScript);
+ method public deprecated android.renderscript.Mesh.AllocationBuilder addIndexSetAllocation(android.renderscript.Allocation, android.renderscript.Mesh.Primitive);
+ method public deprecated android.renderscript.Mesh.AllocationBuilder addIndexSetType(android.renderscript.Mesh.Primitive);
+ method public deprecated android.renderscript.Mesh.AllocationBuilder addVertexAllocation(android.renderscript.Allocation) throws java.lang.IllegalStateException;
+ method public deprecated android.renderscript.Mesh create();
+ method public deprecated int getCurrentIndexSetIndex();
+ method public deprecated int getCurrentVertexTypeIndex();
}
public static class Mesh.Builder {
@@ -19127,18 +19127,18 @@
enum_constant public static final android.renderscript.Mesh.Primitive TRIANGLE_STRIP;
}
- public static class Mesh.TriangleMeshBuilder {
- ctor public Mesh.TriangleMeshBuilder(android.renderscript.RenderScript, int, int);
- method public android.renderscript.Mesh.TriangleMeshBuilder addTriangle(int, int, int);
- method public android.renderscript.Mesh.TriangleMeshBuilder addVertex(float, float);
- method public android.renderscript.Mesh.TriangleMeshBuilder addVertex(float, float, float);
- method public android.renderscript.Mesh create(boolean);
- method public android.renderscript.Mesh.TriangleMeshBuilder setColor(float, float, float, float);
- method public android.renderscript.Mesh.TriangleMeshBuilder setNormal(float, float, float);
- method public android.renderscript.Mesh.TriangleMeshBuilder setTexture(float, float);
- field public static final int COLOR = 1; // 0x1
- field public static final int NORMAL = 2; // 0x2
- field public static final int TEXTURE_0 = 256; // 0x100
+ public static deprecated class Mesh.TriangleMeshBuilder {
+ ctor public deprecated Mesh.TriangleMeshBuilder(android.renderscript.RenderScript, int, int);
+ method public deprecated android.renderscript.Mesh.TriangleMeshBuilder addTriangle(int, int, int);
+ method public deprecated android.renderscript.Mesh.TriangleMeshBuilder addVertex(float, float);
+ method public deprecated android.renderscript.Mesh.TriangleMeshBuilder addVertex(float, float, float);
+ method public deprecated android.renderscript.Mesh create(boolean);
+ method public deprecated android.renderscript.Mesh.TriangleMeshBuilder setColor(float, float, float, float);
+ method public deprecated android.renderscript.Mesh.TriangleMeshBuilder setNormal(float, float, float);
+ method public deprecated android.renderscript.Mesh.TriangleMeshBuilder setTexture(float, float);
+ field public static final deprecated int COLOR = 1; // 0x1
+ field public static final deprecated int NORMAL = 2; // 0x2
+ field public static final deprecated int TEXTURE_0 = 256; // 0x100
}
public class Program extends android.renderscript.BaseObj {
@@ -19341,18 +19341,18 @@
ctor public RSRuntimeException(java.lang.String);
}
- public class RSSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback {
- ctor public RSSurfaceView(android.content.Context);
- ctor public RSSurfaceView(android.content.Context, android.util.AttributeSet);
- method public android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
- method public void destroyRenderScriptGL();
- method public android.renderscript.RenderScriptGL getRenderScriptGL();
- method public void pause();
- method public void resume();
- method public void setRenderScriptGL(android.renderscript.RenderScriptGL);
- method public void surfaceChanged(android.view.SurfaceHolder, int, int, int);
- method public void surfaceCreated(android.view.SurfaceHolder);
- method public void surfaceDestroyed(android.view.SurfaceHolder);
+ public deprecated class RSSurfaceView extends android.view.SurfaceView implements android.view.SurfaceHolder.Callback {
+ ctor public deprecated RSSurfaceView(android.content.Context);
+ ctor public deprecated RSSurfaceView(android.content.Context, android.util.AttributeSet);
+ method public deprecated android.renderscript.RenderScriptGL createRenderScriptGL(android.renderscript.RenderScriptGL.SurfaceConfig);
+ method public deprecated void destroyRenderScriptGL();
+ method public deprecated android.renderscript.RenderScriptGL getRenderScriptGL();
+ method public deprecated void pause();
+ method public deprecated void resume();
+ method public deprecated void setRenderScriptGL(android.renderscript.RenderScriptGL);
+ method public deprecated void surfaceChanged(android.view.SurfaceHolder, int, int, int);
+ method public deprecated void surfaceCreated(android.view.SurfaceHolder);
+ method public deprecated void surfaceDestroyed(android.view.SurfaceHolder);
}
public class RSTextureView extends android.view.TextureView implements android.view.TextureView.SurfaceTextureListener {
@@ -19417,7 +19417,7 @@
method public void pause();
method public void resume();
method public void setSurface(android.view.SurfaceHolder, int, int);
- method public void setSurfaceTexture(android.graphics.SurfaceTexture, int, int);
+ method public deprecated void setSurfaceTexture(android.graphics.SurfaceTexture, int, int);
}
public static class RenderScriptGL.SurfaceConfig {
diff --git a/graphics/java/android/renderscript/Mesh.java b/graphics/java/android/renderscript/Mesh.java
index ffbb41d..f49a24e 100644
--- a/graphics/java/android/renderscript/Mesh.java
+++ b/graphics/java/android/renderscript/Mesh.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2008-2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -373,6 +373,7 @@
}
/**
+ * @deprecated in API 16
* Mesh builder object. It starts empty and requires the user to
* add all the vertex and index allocations that comprise the
* mesh
@@ -391,6 +392,9 @@
Vector mIndexTypes;
+ /**
+ * @deprecated in API 16
+ **/
public AllocationBuilder(RenderScript rs) {
mRS = rs;
mVertexTypeCount = 0;
@@ -399,6 +403,7 @@
}
/**
+ * @deprecated in API 16
* @return internal index of the last vertex buffer type added to
* builder
**/
@@ -407,6 +412,7 @@
}
/**
+ * @deprecated in API 16
* @return internal index of the last index set added to the
* builder
**/
@@ -415,6 +421,7 @@
}
/**
+ * @deprecated in API 16
* Adds an allocation containing vertex buffer data to the
* builder
*
@@ -434,6 +441,7 @@
}
/**
+ * @deprecated in API 16
* Adds an allocation containing index buffer data and index type
* to the builder
*
@@ -451,6 +459,7 @@
}
/**
+ * @deprecated in API 16
* Adds an index set type to the builder
*
* @param p index set primitive type
@@ -466,6 +475,7 @@
}
/**
+ * @deprecated in API 16
* Create a Mesh object from the current state of the builder
*
**/
@@ -507,6 +517,7 @@
}
/**
+ * @deprecated in API 16
* Builder that allows creation of a mesh object point by point
* and triangle by triangle
*
@@ -533,11 +544,21 @@
int mVtxSize;
int mFlags;
+ /**
+ * @deprecated in API 16
+ **/
public static final int COLOR = 0x0001;
+ /**
+ * @deprecated in API 16
+ **/
public static final int NORMAL = 0x0002;
+ /**
+ * @deprecated in API 16
+ **/
public static final int TEXTURE_0 = 0x0100;
/**
+ * @deprecated in API 16
* @param rs Context to which the mesh will belong.
* @param vtxSize specifies whether the vertex is a float2 or
* float3
@@ -593,6 +614,7 @@
}
/**
+ * @deprecated in API 16
* Adds a float2 vertex to the mesh
*
* @param x position x
@@ -613,6 +635,7 @@
}
/**
+ * @deprecated in API 16
* Adds a float3 vertex to the mesh
*
* @param x position x
@@ -636,6 +659,7 @@
}
/**
+ * @deprecated in API 16
* Sets the texture coordinate for the vertices that are added after this method call.
*
* @param s texture coordinate s
@@ -653,6 +677,7 @@
}
/**
+ * @deprecated in API 16
* Sets the normal vector for the vertices that are added after this method call.
*
* @param x normal vector x
@@ -672,6 +697,7 @@
}
/**
+ * @deprecated in API 16
* Sets the color for the vertices that are added after this method call.
*
* @param r red component
@@ -693,6 +719,7 @@
}
/**
+ * @deprecated in API 16
* Adds a new triangle to the mesh builder
*
* @param idx1 index of the first vertex in the triangle
@@ -719,6 +746,7 @@
}
/**
+ * @deprecated in API 16
* Creates the mesh object from the current state of the builder
*
* @param uploadToBufferObject specifies whether the vertex data
diff --git a/graphics/java/android/renderscript/RSSurfaceView.java b/graphics/java/android/renderscript/RSSurfaceView.java
index 6756fd0..506f1af 100644
--- a/graphics/java/android/renderscript/RSSurfaceView.java
+++ b/graphics/java/android/renderscript/RSSurfaceView.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2008-2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@
import android.view.SurfaceView;
/**
+ * @deprecated in API 16
* The Surface View for a graphics renderscript (RenderScriptGL) to draw on.
*
* <div class="special reference">
@@ -43,6 +44,7 @@
private RenderScriptGL mRS;
/**
+ * @deprecated in API 16
* Standard View constructor. In order to render something, you
* must call {@link android.opengl.GLSurfaceView#setRenderer} to
* register a renderer.
@@ -54,6 +56,7 @@
}
/**
+ * @deprecated in API 16
* Standard View constructor. In order to render something, you
* must call {@link android.opengl.GLSurfaceView#setRenderer} to
* register a renderer.
@@ -72,6 +75,7 @@
}
/**
+ * @deprecated in API 16
* This method is part of the SurfaceHolder.Callback interface, and is
* not normally called or subclassed by clients of RSSurfaceView.
*/
@@ -80,6 +84,7 @@
}
/**
+ * @deprecated in API 16
* This method is part of the SurfaceHolder.Callback interface, and is
* not normally called or subclassed by clients of RSSurfaceView.
*/
@@ -93,6 +98,7 @@
}
/**
+ * @deprecated in API 16
* This method is part of the SurfaceHolder.Callback interface, and is
* not normally called or subclassed by clients of RSSurfaceView.
*/
@@ -105,6 +111,7 @@
}
/**
+ * @deprecated in API 16
* Inform the view that the activity is paused. The owner of this view must
* call this method when the activity is paused. Calling this method will
* pause the rendering thread.
@@ -117,6 +124,7 @@
}
/**
+ * @deprecated in API 16
* Inform the view that the activity is resumed. The owner of this view must
* call this method when the activity is resumed. Calling this method will
* recreate the OpenGL display and resume the rendering
@@ -129,12 +137,18 @@
}
}
+ /**
+ * @deprecated in API 16
+ **/
public RenderScriptGL createRenderScriptGL(RenderScriptGL.SurfaceConfig sc) {
RenderScriptGL rs = new RenderScriptGL(this.getContext(), sc);
setRenderScriptGL(rs);
return rs;
}
+ /**
+ * @deprecated in API 16
+ **/
public void destroyRenderScriptGL() {
synchronized (this) {
mRS.destroy();
@@ -142,10 +156,16 @@
}
}
+ /**
+ * @deprecated in API 16
+ **/
public void setRenderScriptGL(RenderScriptGL rs) {
mRS = rs;
}
+ /**
+ * @deprecated in API 16
+ **/
public RenderScriptGL getRenderScriptGL() {
return mRS;
}
diff --git a/graphics/java/android/renderscript/RenderScriptGL.java b/graphics/java/android/renderscript/RenderScriptGL.java
index 1b2ac90..dbdbe3d 100644
--- a/graphics/java/android/renderscript/RenderScriptGL.java
+++ b/graphics/java/android/renderscript/RenderScriptGL.java
@@ -206,6 +206,7 @@
}
/**
+ * @deprecated in API 16
* Bind an os surface
*
* @param w