Deprecate RS Java APIs.
This CL marks RenderScript Java APIs as deprecated.
Bug: 168711199
Test: m
Test: CtsRenderscriptTestCases
Test: CtsRsCppTestCases
Test: CtsRsBlasTestCases
Change-Id: Id271a794679d445c480d62c87ae6c8150f6901f8
Merged-In: Id271a794679d445c480d62c87ae6c8150f6901f8
(cherry picked from commit 8b4548c43a06290b5d9446c0235e65f21e9bfe5d)
diff --git a/rs/java/android/renderscript/Allocation.java b/rs/java/android/renderscript/Allocation.java
index 238bf0f..d420bd4 100644
--- a/rs/java/android/renderscript/Allocation.java
+++ b/rs/java/android/renderscript/Allocation.java
@@ -52,8 +52,12 @@
* <p>For more information about creating an application that uses RenderScript, read the
* <a href="{@docRoot}guide/topics/renderscript/index.html">RenderScript</a> developer guide.</p>
* </div>
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
-
+@Deprecated
public class Allocation extends BaseObj {
private static final int MAX_NUMBER_IO_INPUT_ALLOC = 16;
diff --git a/rs/java/android/renderscript/AllocationAdapter.java b/rs/java/android/renderscript/AllocationAdapter.java
index 6d7e97e..17bc234 100644
--- a/rs/java/android/renderscript/AllocationAdapter.java
+++ b/rs/java/android/renderscript/AllocationAdapter.java
@@ -19,7 +19,11 @@
/**
* Only intended for use by generated reflected code.
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class AllocationAdapter extends Allocation {
Type mWindow;
diff --git a/rs/java/android/renderscript/BaseObj.java b/rs/java/android/renderscript/BaseObj.java
index 7b5514b..ea8535d 100644
--- a/rs/java/android/renderscript/BaseObj.java
+++ b/rs/java/android/renderscript/BaseObj.java
@@ -27,7 +27,11 @@
* It is responsible for lifetime management and resource tracking. This class
* should not be used by a user application.
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class BaseObj {
BaseObj(long id, RenderScript rs) {
rs.validate();
diff --git a/rs/java/android/renderscript/Byte2.java b/rs/java/android/renderscript/Byte2.java
index 3ad79e4..cb5cc47 100644
--- a/rs/java/android/renderscript/Byte2.java
+++ b/rs/java/android/renderscript/Byte2.java
@@ -20,7 +20,11 @@
/**
* Class for exposing the native RenderScript byte2 type back to the Android system.
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class Byte2 {
public byte x;
public byte y;
diff --git a/rs/java/android/renderscript/Byte3.java b/rs/java/android/renderscript/Byte3.java
index a138313..aca4e64 100644
--- a/rs/java/android/renderscript/Byte3.java
+++ b/rs/java/android/renderscript/Byte3.java
@@ -20,7 +20,11 @@
/**
* Class for exposing the native RenderScript byte3 type back to the Android system.
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class Byte3 {
public byte x;
public byte y;
diff --git a/rs/java/android/renderscript/Byte4.java b/rs/java/android/renderscript/Byte4.java
index fa4c13d..b30b6ed 100644
--- a/rs/java/android/renderscript/Byte4.java
+++ b/rs/java/android/renderscript/Byte4.java
@@ -20,7 +20,11 @@
/**
* Class for exposing the native RenderScript byte4 type back to the Android system.
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class Byte4 {
public byte x;
public byte y;
diff --git a/rs/java/android/renderscript/Double2.java b/rs/java/android/renderscript/Double2.java
index 4c7319d..e14228a 100644
--- a/rs/java/android/renderscript/Double2.java
+++ b/rs/java/android/renderscript/Double2.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic double type.
* Provides two double fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Double2 {
public double x;
public double y;
diff --git a/rs/java/android/renderscript/Double3.java b/rs/java/android/renderscript/Double3.java
index b819716..e52c902 100644
--- a/rs/java/android/renderscript/Double3.java
+++ b/rs/java/android/renderscript/Double3.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic double type.
* Provides three double fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Double3 {
public double x;
public double y;
diff --git a/rs/java/android/renderscript/Double4.java b/rs/java/android/renderscript/Double4.java
index e4829f7..a3e4a94 100644
--- a/rs/java/android/renderscript/Double4.java
+++ b/rs/java/android/renderscript/Double4.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic double type.
* Provides four double fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Double4 {
public double x;
public double y;
diff --git a/rs/java/android/renderscript/Element.java b/rs/java/android/renderscript/Element.java
index 0941907..f671953 100644
--- a/rs/java/android/renderscript/Element.java
+++ b/rs/java/android/renderscript/Element.java
@@ -51,7 +51,12 @@
* <p>For more information about creating an application that uses RenderScript, read the
* <a href="{@docRoot}guide/topics/renderscript/index.html">RenderScript</a> developer guide.</p>
* </div>
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class Element extends BaseObj {
int mSize;
Element[] mElements;
diff --git a/rs/java/android/renderscript/FieldPacker.java b/rs/java/android/renderscript/FieldPacker.java
index de1c497..aaa0fe8 100644
--- a/rs/java/android/renderscript/FieldPacker.java
+++ b/rs/java/android/renderscript/FieldPacker.java
@@ -26,7 +26,11 @@
* reflected code generated by the RS tool chain. It should not
* be called directly.
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class FieldPacker {
public FieldPacker(int len) {
mPos = 0;
diff --git a/rs/java/android/renderscript/FileA3D.java b/rs/java/android/renderscript/FileA3D.java
index 7cc2825..f0a9fa7 100644
--- a/rs/java/android/renderscript/FileA3D.java
+++ b/rs/java/android/renderscript/FileA3D.java
@@ -36,6 +36,7 @@
* index entries for all the objects stored inside it.
*
**/
+@Deprecated
public class FileA3D extends BaseObj {
/**
diff --git a/rs/java/android/renderscript/Float2.java b/rs/java/android/renderscript/Float2.java
index e9f8ca7..1f6038c 100644
--- a/rs/java/android/renderscript/Float2.java
+++ b/rs/java/android/renderscript/Float2.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic float type.
* Provides two float fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Float2 {
public float x;
public float y;
diff --git a/rs/java/android/renderscript/Float3.java b/rs/java/android/renderscript/Float3.java
index 555bdf6..5f45716 100644
--- a/rs/java/android/renderscript/Float3.java
+++ b/rs/java/android/renderscript/Float3.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic float type.
* Provides three float fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Float3 {
public float x;
public float y;
diff --git a/rs/java/android/renderscript/Float4.java b/rs/java/android/renderscript/Float4.java
index 6541b2ec..7f3ba2c 100644
--- a/rs/java/android/renderscript/Float4.java
+++ b/rs/java/android/renderscript/Float4.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic float type.
* Provides four float fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Float4 {
public float x;
public float y;
diff --git a/rs/java/android/renderscript/Font.java b/rs/java/android/renderscript/Font.java
index e47ec4b..6f6f341 100644
--- a/rs/java/android/renderscript/Font.java
+++ b/rs/java/android/renderscript/Font.java
@@ -45,6 +45,7 @@
* them in the script to suit the user's rendering needs. Font colors work as a state machine.
* Every new call to draw text uses the last color set in the script.</p>
**/
+@Deprecated
public class Font extends BaseObj {
//These help us create a font by family name
diff --git a/rs/java/android/renderscript/Int2.java b/rs/java/android/renderscript/Int2.java
index 120957b..be0639f 100644
--- a/rs/java/android/renderscript/Int2.java
+++ b/rs/java/android/renderscript/Int2.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic int type.
* Provides two int fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Int2 {
public int x;
public int y;
diff --git a/rs/java/android/renderscript/Int3.java b/rs/java/android/renderscript/Int3.java
index 5431b9a7..38a602d 100644
--- a/rs/java/android/renderscript/Int3.java
+++ b/rs/java/android/renderscript/Int3.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic int type.
* Provides three int fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Int3 {
public int x;
public int y;
diff --git a/rs/java/android/renderscript/Int4.java b/rs/java/android/renderscript/Int4.java
index 1c0e2e2..52f7bb2 100644
--- a/rs/java/android/renderscript/Int4.java
+++ b/rs/java/android/renderscript/Int4.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic int type.
* Provides four int fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Int4 {
public int x;
public int y;
diff --git a/rs/java/android/renderscript/Long2.java b/rs/java/android/renderscript/Long2.java
index fabf204..1b3955b 100644
--- a/rs/java/android/renderscript/Long2.java
+++ b/rs/java/android/renderscript/Long2.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic long type.
* Provides two long fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Long2 {
public long x;
public long y;
diff --git a/rs/java/android/renderscript/Long3.java b/rs/java/android/renderscript/Long3.java
index 8e243cc..8be9c1c 100644
--- a/rs/java/android/renderscript/Long3.java
+++ b/rs/java/android/renderscript/Long3.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic long type.
* Provides three long fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Long3 {
public long x;
public long y;
diff --git a/rs/java/android/renderscript/Long4.java b/rs/java/android/renderscript/Long4.java
index 1a1ad74..75db51b 100644
--- a/rs/java/android/renderscript/Long4.java
+++ b/rs/java/android/renderscript/Long4.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic long type.
* Provides four long fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Long4 {
public long x;
public long y;
diff --git a/rs/java/android/renderscript/Matrix2f.java b/rs/java/android/renderscript/Matrix2f.java
index 048262d..5f5e709 100644
--- a/rs/java/android/renderscript/Matrix2f.java
+++ b/rs/java/android/renderscript/Matrix2f.java
@@ -20,7 +20,11 @@
/**
* Class for exposing the native RenderScript rs_matrix2x2 type back to the Android system.
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class Matrix2f {
/**
diff --git a/rs/java/android/renderscript/Matrix3f.java b/rs/java/android/renderscript/Matrix3f.java
index 9a4af77..b620eaf 100644
--- a/rs/java/android/renderscript/Matrix3f.java
+++ b/rs/java/android/renderscript/Matrix3f.java
@@ -20,7 +20,11 @@
/**
* Class for exposing the native RenderScript rs_matrix3x3 type back to the Android system.
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class Matrix3f {
/**
diff --git a/rs/java/android/renderscript/Matrix4f.java b/rs/java/android/renderscript/Matrix4f.java
index a9469c9..cdf06a6 100644
--- a/rs/java/android/renderscript/Matrix4f.java
+++ b/rs/java/android/renderscript/Matrix4f.java
@@ -22,7 +22,11 @@
/**
* Class for exposing the native RenderScript rs_matrix4x4 type back to the Android system.
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class Matrix4f {
/**
diff --git a/rs/java/android/renderscript/Mesh.java b/rs/java/android/renderscript/Mesh.java
index 1a4d1fd..f2fd5a9 100644
--- a/rs/java/android/renderscript/Mesh.java
+++ b/rs/java/android/renderscript/Mesh.java
@@ -40,6 +40,7 @@
* index sets or primitive types.
* </p>
**/
+@Deprecated
public class Mesh extends BaseObj {
/**
diff --git a/rs/java/android/renderscript/Program.java b/rs/java/android/renderscript/Program.java
index ff07218..3cadc93 100644
--- a/rs/java/android/renderscript/Program.java
+++ b/rs/java/android/renderscript/Program.java
@@ -32,7 +32,11 @@
* Program is a base class for all the objects that modify
* various stages of the graphics pipeline
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class Program extends BaseObj {
static final int MAX_INPUT = 8;
static final int MAX_OUTPUT = 8;
diff --git a/rs/java/android/renderscript/ProgramFragment.java b/rs/java/android/renderscript/ProgramFragment.java
index 8805312..e2879d8 100644
--- a/rs/java/android/renderscript/ProgramFragment.java
+++ b/rs/java/android/renderscript/ProgramFragment.java
@@ -37,6 +37,7 @@
* </p>
*
**/
+@Deprecated
public class ProgramFragment extends Program {
ProgramFragment(long id, RenderScript rs) {
super(id, rs);
diff --git a/rs/java/android/renderscript/ProgramFragmentFixedFunction.java b/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
index c741ce6..8dbf6f4 100644
--- a/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
+++ b/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
@@ -29,6 +29,7 @@
* blended with results of up to two texture lookups.</p
*
**/
+@Deprecated
public class ProgramFragmentFixedFunction extends ProgramFragment {
ProgramFragmentFixedFunction(long id, RenderScript rs) {
super(id, rs);
diff --git a/rs/java/android/renderscript/ProgramRaster.java b/rs/java/android/renderscript/ProgramRaster.java
index a21696c..8b538289 100644
--- a/rs/java/android/renderscript/ProgramRaster.java
+++ b/rs/java/android/renderscript/ProgramRaster.java
@@ -25,6 +25,7 @@
* Program raster is primarily used to specify whether point sprites are enabled and to control
* the culling mode. By default, back faces are culled.
**/
+@Deprecated
public class ProgramRaster extends BaseObj {
/**
diff --git a/rs/java/android/renderscript/ProgramStore.java b/rs/java/android/renderscript/ProgramStore.java
index 1952b88..c94d253 100644
--- a/rs/java/android/renderscript/ProgramStore.java
+++ b/rs/java/android/renderscript/ProgramStore.java
@@ -34,7 +34,11 @@
* framebuffer</li>
* </ul>
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class ProgramStore extends BaseObj {
/**
* Specifies the function used to determine whether a fragment
diff --git a/rs/java/android/renderscript/ProgramVertex.java b/rs/java/android/renderscript/ProgramVertex.java
index 9257234..ecd8a31 100644
--- a/rs/java/android/renderscript/ProgramVertex.java
+++ b/rs/java/android/renderscript/ProgramVertex.java
@@ -34,7 +34,6 @@
* The signatures don't have to be exact or in any strict order. As long as the input name in the shader
* matches a channel name and size available on the mesh, the runtime takes care of connecting the
* two. Unlike OpenGL, there is no need to link the vertex and fragment programs.</p>
- *
**/
package android.renderscript;
@@ -49,6 +48,7 @@
* geometric data in a user-defined way.
*
**/
+@Deprecated
public class ProgramVertex extends Program {
ProgramVertex(long id, RenderScript rs) {
diff --git a/rs/java/android/renderscript/ProgramVertexFixedFunction.java b/rs/java/android/renderscript/ProgramVertexFixedFunction.java
index 03c2eaf..4cf2f4c 100644
--- a/rs/java/android/renderscript/ProgramVertexFixedFunction.java
+++ b/rs/java/android/renderscript/ProgramVertexFixedFunction.java
@@ -27,6 +27,7 @@
* without writing any GLSL code.
*
**/
+@Deprecated
public class ProgramVertexFixedFunction extends ProgramVertex {
ProgramVertexFixedFunction(long id, RenderScript rs) {
diff --git a/rs/java/android/renderscript/RSDriverException.java b/rs/java/android/renderscript/RSDriverException.java
index 9e6507f..3d0f0bf 100644
--- a/rs/java/android/renderscript/RSDriverException.java
+++ b/rs/java/android/renderscript/RSDriverException.java
@@ -20,7 +20,12 @@
/**
* Base class for all exceptions thrown by the Android
* RenderScript
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class RSDriverException extends RSRuntimeException {
public RSDriverException(String string) {
super(string);
diff --git a/rs/java/android/renderscript/RSIllegalArgumentException.java b/rs/java/android/renderscript/RSIllegalArgumentException.java
index 5c68594..d0ac5b6 100644
--- a/rs/java/android/renderscript/RSIllegalArgumentException.java
+++ b/rs/java/android/renderscript/RSIllegalArgumentException.java
@@ -20,7 +20,12 @@
/**
* Base class for all exceptions thrown by the Android
* RenderScript
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class RSIllegalArgumentException extends RSRuntimeException {
public RSIllegalArgumentException(String string) {
super(string);
diff --git a/rs/java/android/renderscript/RSInvalidStateException.java b/rs/java/android/renderscript/RSInvalidStateException.java
index c881898..5eea419 100644
--- a/rs/java/android/renderscript/RSInvalidStateException.java
+++ b/rs/java/android/renderscript/RSInvalidStateException.java
@@ -20,7 +20,12 @@
/**
* Base class for all exceptions thrown by the Android
* RenderScript
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class RSInvalidStateException extends RSRuntimeException {
public RSInvalidStateException(String string) {
super(string);
diff --git a/rs/java/android/renderscript/RSRuntimeException.java b/rs/java/android/renderscript/RSRuntimeException.java
index b4b629e..d52a1c1 100644
--- a/rs/java/android/renderscript/RSRuntimeException.java
+++ b/rs/java/android/renderscript/RSRuntimeException.java
@@ -20,7 +20,12 @@
/**
* Base class for all exceptions thrown by the Android
* RenderScript
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class RSRuntimeException
extends java.lang.RuntimeException {
public RSRuntimeException(String string) {
diff --git a/rs/java/android/renderscript/RSSurfaceView.java b/rs/java/android/renderscript/RSSurfaceView.java
index 6bdde38..05c0112f 100644
--- a/rs/java/android/renderscript/RSSurfaceView.java
+++ b/rs/java/android/renderscript/RSSurfaceView.java
@@ -33,6 +33,7 @@
* <a href="{@docRoot}guide/topics/renderscript/index.html">RenderScript</a> developer guide.</p>
* </div>
*/
+@Deprecated
public class RSSurfaceView extends SurfaceView implements SurfaceHolder.Callback {
private SurfaceHolder mSurfaceHolder;
private RenderScriptGL mRS;
diff --git a/rs/java/android/renderscript/RSTextureView.java b/rs/java/android/renderscript/RSTextureView.java
index af3258a..ed68fc3 100644
--- a/rs/java/android/renderscript/RSTextureView.java
+++ b/rs/java/android/renderscript/RSTextureView.java
@@ -28,6 +28,7 @@
* to draw on.
*
*/
+@Deprecated
public class RSTextureView extends TextureView implements TextureView.SurfaceTextureListener {
private RenderScriptGL mRS;
private SurfaceTexture mSurfaceTexture;
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java
index 806a25a7..855cfdc 100644
--- a/rs/java/android/renderscript/RenderScript.java
+++ b/rs/java/android/renderscript/RenderScript.java
@@ -44,7 +44,12 @@
* <p>For more information about creating an application that uses RenderScript, read the
* <a href="{@docRoot}guide/topics/renderscript/index.html">RenderScript</a> developer guide.</p>
* </div>
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class RenderScript {
static final long TRACE_TAG = Trace.TRACE_TAG_RS;
diff --git a/rs/java/android/renderscript/RenderScriptCacheDir.java b/rs/java/android/renderscript/RenderScriptCacheDir.java
index 862d032..cd6e8b1 100644
--- a/rs/java/android/renderscript/RenderScriptCacheDir.java
+++ b/rs/java/android/renderscript/RenderScriptCacheDir.java
@@ -23,7 +23,11 @@
/**
* Used only for tracking the RenderScript cache directory.
* @hide
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class RenderScriptCacheDir {
/**
* Sets the directory to use as a persistent storage for the
diff --git a/rs/java/android/renderscript/RenderScriptGL.java b/rs/java/android/renderscript/RenderScriptGL.java
index dafaf36..d46dbf6 100644
--- a/rs/java/android/renderscript/RenderScriptGL.java
+++ b/rs/java/android/renderscript/RenderScriptGL.java
@@ -37,6 +37,7 @@
* <a href="{@docRoot}guide/topics/renderscript/index.html">RenderScript</a> developer guide.</p>
* </div>
**/
+@Deprecated
public class RenderScriptGL extends RenderScript {
int mWidth;
int mHeight;
diff --git a/rs/java/android/renderscript/Sampler.java b/rs/java/android/renderscript/Sampler.java
index 70e88bc..06f036d 100644
--- a/rs/java/android/renderscript/Sampler.java
+++ b/rs/java/android/renderscript/Sampler.java
@@ -25,7 +25,12 @@
* android.renderscript.Allocation#USAGE_GRAPHICS_TEXTURE}; using a Sampler on
* an {@link android.renderscript.Allocation} that was not created with {@link
* android.renderscript.Allocation#USAGE_GRAPHICS_TEXTURE} is undefined.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class Sampler extends BaseObj {
public enum Value {
NEAREST (0),
diff --git a/rs/java/android/renderscript/Script.java b/rs/java/android/renderscript/Script.java
index d1d3a76..f32a2f7 100644
--- a/rs/java/android/renderscript/Script.java
+++ b/rs/java/android/renderscript/Script.java
@@ -22,7 +22,12 @@
/**
* The parent class for all executable scripts. This should not be used by
* applications.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class Script extends BaseObj {
/**
diff --git a/rs/java/android/renderscript/ScriptC.java b/rs/java/android/renderscript/ScriptC.java
index 00ebe57..1866a99 100644
--- a/rs/java/android/renderscript/ScriptC.java
+++ b/rs/java/android/renderscript/ScriptC.java
@@ -25,7 +25,12 @@
/**
* The superclass for all user-defined scripts. This is only
* intended to be used by the generated derived classes.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class ScriptC extends Script {
private static final String TAG = "ScriptC";
diff --git a/rs/java/android/renderscript/ScriptGroup.java b/rs/java/android/renderscript/ScriptGroup.java
index e0bdbfc..5cdb9cf 100644
--- a/rs/java/android/renderscript/ScriptGroup.java
+++ b/rs/java/android/renderscript/ScriptGroup.java
@@ -37,7 +37,12 @@
* Grouping kernels together allows for more efficient execution. For example,
* runtime and compiler optimization can be applied to reduce computation and
* communication overhead, and to make better use of the CPU and the GPU.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public final class ScriptGroup extends BaseObj {
private static final String TAG = "ScriptGroup";
IO mOutputs[];
diff --git a/rs/java/android/renderscript/ScriptIntrinsic.java b/rs/java/android/renderscript/ScriptIntrinsic.java
index 61211a2..8d65422 100644
--- a/rs/java/android/renderscript/ScriptIntrinsic.java
+++ b/rs/java/android/renderscript/ScriptIntrinsic.java
@@ -23,7 +23,12 @@
* operations.
*
* Not intended for direct use.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public abstract class ScriptIntrinsic extends Script {
ScriptIntrinsic(long id, RenderScript rs) {
super(id, rs);
diff --git a/rs/java/android/renderscript/ScriptIntrinsic3DLUT.java b/rs/java/android/renderscript/ScriptIntrinsic3DLUT.java
index ce149d9..7a2847e 100644
--- a/rs/java/android/renderscript/ScriptIntrinsic3DLUT.java
+++ b/rs/java/android/renderscript/ScriptIntrinsic3DLUT.java
@@ -23,7 +23,11 @@
* allocation. The 8 nearest values are sampled and linearly interpolated. The
* result is placed in the output.
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public final class ScriptIntrinsic3DLUT extends ScriptIntrinsic {
private Allocation mLUT;
private Element mElement;
diff --git a/rs/java/android/renderscript/ScriptIntrinsicBLAS.java b/rs/java/android/renderscript/ScriptIntrinsicBLAS.java
index 49a71b4..16cc799 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicBLAS.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicBLAS.java
@@ -29,7 +29,11 @@
*
* For detailed description of BLAS, please refer to http://www.netlib.org/blas/
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public final class ScriptIntrinsicBLAS extends ScriptIntrinsic {
private Allocation mLUT;
diff --git a/rs/java/android/renderscript/ScriptIntrinsicBlend.java b/rs/java/android/renderscript/ScriptIntrinsicBlend.java
index fdcd61b..a1c79ef 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicBlend.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicBlend.java
@@ -19,7 +19,12 @@
/**
* Intrinsic kernels for blending two {@link android.renderscript.Allocation} objects.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class ScriptIntrinsicBlend extends ScriptIntrinsic {
ScriptIntrinsicBlend(long id, RenderScript rs) {
super(id, rs);
diff --git a/rs/java/android/renderscript/ScriptIntrinsicBlur.java b/rs/java/android/renderscript/ScriptIntrinsicBlur.java
index 0891d51..68cbc3f 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicBlur.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicBlur.java
@@ -20,8 +20,11 @@
* Intrinsic Gausian blur filter. Applies a gaussian blur of the
* specified radius to all elements of an allocation.
*
- *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public final class ScriptIntrinsicBlur extends ScriptIntrinsic {
private final float[] mValues = new float[9];
private Allocation mInput;
diff --git a/rs/java/android/renderscript/ScriptIntrinsicColorMatrix.java b/rs/java/android/renderscript/ScriptIntrinsicColorMatrix.java
index e8a299c..4a05cf5 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicColorMatrix.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicColorMatrix.java
@@ -36,7 +36,12 @@
* Element#U8_2}, {@link Element#U8_3}, {@link Element#U8_4},
* {@link Element#F32}, {@link Element#F32_2}, {@link
* Element#F32_3}, and {@link Element#F32_4}.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public final class ScriptIntrinsicColorMatrix extends ScriptIntrinsic {
private final Matrix4f mMatrix = new Matrix4f();
private final Float4 mAdd = new Float4();
diff --git a/rs/java/android/renderscript/ScriptIntrinsicConvolve3x3.java b/rs/java/android/renderscript/ScriptIntrinsicConvolve3x3.java
index 9fe7b2d..4b9dff1 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicConvolve3x3.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicConvolve3x3.java
@@ -19,7 +19,11 @@
/**
* Intrinsic for applying a 3x3 convolve to an allocation.
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public final class ScriptIntrinsicConvolve3x3 extends ScriptIntrinsic {
private final float[] mValues = new float[9];
private Allocation mInput;
diff --git a/rs/java/android/renderscript/ScriptIntrinsicConvolve5x5.java b/rs/java/android/renderscript/ScriptIntrinsicConvolve5x5.java
index 8518bb2..ed93c7e 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicConvolve5x5.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicConvolve5x5.java
@@ -19,7 +19,11 @@
/**
* Intrinsic for applying a 5x5 convolve to an allocation.
*
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public final class ScriptIntrinsicConvolve5x5 extends ScriptIntrinsic {
private final float[] mValues = new float[25];
private Allocation mInput;
diff --git a/rs/java/android/renderscript/ScriptIntrinsicHistogram.java b/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
index 0e8b36c..4a71bc8 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
@@ -19,8 +19,11 @@
/**
* Intrinsic Histogram filter.
*
- *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public final class ScriptIntrinsicHistogram extends ScriptIntrinsic {
private Allocation mOut;
diff --git a/rs/java/android/renderscript/ScriptIntrinsicLUT.java b/rs/java/android/renderscript/ScriptIntrinsicLUT.java
index e90462d..7d5b09f 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicLUT.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicLUT.java
@@ -21,7 +21,12 @@
* channel of the input has an independant lookup table. The
* tables are 256 entries in size and can cover the full value
* range of {@link Element#U8_4}.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public final class ScriptIntrinsicLUT extends ScriptIntrinsic {
private final Matrix4f mMatrix = new Matrix4f();
private Allocation mTables;
diff --git a/rs/java/android/renderscript/ScriptIntrinsicResize.java b/rs/java/android/renderscript/ScriptIntrinsicResize.java
index 45b0a64..a87fe95 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicResize.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicResize.java
@@ -18,7 +18,12 @@
/**
* Intrinsic for performing a resize of a 2D allocation.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public final class ScriptIntrinsicResize extends ScriptIntrinsic {
private Allocation mInput;
diff --git a/rs/java/android/renderscript/ScriptIntrinsicYuvToRGB.java b/rs/java/android/renderscript/ScriptIntrinsicYuvToRGB.java
index e64c911..a94f916 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicYuvToRGB.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicYuvToRGB.java
@@ -23,7 +23,12 @@
* The input allocation should be supplied in a supported YUV format
* as a YUV element Allocation. The output is RGBA; the alpha channel
* will be set to 255.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public final class ScriptIntrinsicYuvToRGB extends ScriptIntrinsic {
private Allocation mInput;
diff --git a/rs/java/android/renderscript/Short2.java b/rs/java/android/renderscript/Short2.java
index 24809f7..4565eb4 100644
--- a/rs/java/android/renderscript/Short2.java
+++ b/rs/java/android/renderscript/Short2.java
@@ -22,7 +22,12 @@
*
* Vector version of the basic short type.
* Provides two short fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Short2 {
public short x;
public short y;
diff --git a/rs/java/android/renderscript/Short3.java b/rs/java/android/renderscript/Short3.java
index 661db0a..3d70f07 100644
--- a/rs/java/android/renderscript/Short3.java
+++ b/rs/java/android/renderscript/Short3.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic short type.
* Provides three short fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Short3 {
public short x;
public short y;
diff --git a/rs/java/android/renderscript/Short4.java b/rs/java/android/renderscript/Short4.java
index a2d74f2..c90d648 100644
--- a/rs/java/android/renderscript/Short4.java
+++ b/rs/java/android/renderscript/Short4.java
@@ -19,7 +19,12 @@
/**
* Vector version of the basic short type.
* Provides four short fields packed.
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
*/
+@Deprecated
public class Short4 {
public short x;
public short y;
diff --git a/rs/java/android/renderscript/Type.java b/rs/java/android/renderscript/Type.java
index dc23785..021fd06 100644
--- a/rs/java/android/renderscript/Type.java
+++ b/rs/java/android/renderscript/Type.java
@@ -42,7 +42,12 @@
* <p>For more information about creating an application that uses RenderScript, read the
* <a href="{@docRoot}guide/topics/renderscript/index.html">RenderScript</a> developer guide.</p>
* </div>
+ *
+ * @deprecated Renderscript has been deprecated in API level 31. Please refer to the <a
+ * href="https://developer.android.com/guide/topics/renderscript/migration-guide">migration
+ * guide</a> for the proposed alternatives.
**/
+@Deprecated
public class Type extends BaseObj {
int mDimX;
int mDimY;