summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/Allocation.java
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/java/android/renderscript/Allocation.java')
-rw-r--r--graphics/java/android/renderscript/Allocation.java36
1 files changed, 4 insertions, 32 deletions
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java
index 1c83c51e377d..2f3e48c7ba9f 100644
--- a/graphics/java/android/renderscript/Allocation.java
+++ b/graphics/java/android/renderscript/Allocation.java
@@ -1246,24 +1246,6 @@ public class Allocation extends BaseObj {
}
/**
- *
- *
- * @hide
- *
- */
- public SurfaceTexture getSurfaceTexture() {
- if ((mUsage & USAGE_IO_INPUT) == 0) {
- throw new RSInvalidStateException("Allocation is not a surface texture.");
- }
-
- int id = mRS.nAllocationGetSurfaceTextureID(getID(mRS));
- SurfaceTexture st = new SurfaceTexture(id);
- mRS.nAllocationGetSurfaceTextureID2(getID(mRS), st);
-
- return st;
- }
-
- /**
* For allocations used with io operations, returns the handle
* onto a raw buffer that is being managed by the screen
* compositor.
@@ -1272,7 +1254,10 @@ public class Allocation extends BaseObj {
*
*/
public Surface getSurface() {
- return new Surface(getSurfaceTexture());
+ if ((mUsage & USAGE_IO_INPUT) == 0) {
+ throw new RSInvalidStateException("Allocation is not a surface texture.");
+ }
+ return mRS.nAllocationGetSurface(getID(mRS));
}
/**
@@ -1290,19 +1275,6 @@ public class Allocation extends BaseObj {
}
/**
- * @hide
- */
- public void setSurfaceTexture(SurfaceTexture st) {
- mRS.validate();
- if ((mUsage & USAGE_IO_OUTPUT) == 0) {
- throw new RSInvalidStateException("Allocation is not USAGE_IO_OUTPUT.");
- }
-
- Surface s = new Surface(st);
- mRS.nAllocationSetSurface(getID(mRS), s);
- }
-
- /**
* Creates a RenderScript allocation from a bitmap.
*
* With target API version 18 or greater, this allocation will be