diff options
| author | Bill Yi <byi@google.com> | 2016-08-24 11:23:13 -0700 |
|---|---|---|
| committer | Bill Yi <byi@google.com> | 2016-08-24 11:23:13 -0700 |
| commit | e71ecb2c4df15f727f51a0e1b65459f071853e35 (patch) | |
| tree | 0b87e8d0c0e2fe4dcd1d186fe1546b3b4489b002 /rs/java/android | |
| parent | 5d4732555dd0f1611de037dee59e0006da23be46 (diff) | |
| parent | 29835cc56eb26089cd8d2c21c7507c9d0588ceb0 (diff) | |
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Change-Id: I1c7301e4e6d7e5fed1fd57d2fb9cb65baf819de0
Diffstat (limited to 'rs/java/android')
| -rw-r--r-- | rs/java/android/renderscript/Allocation.java | 7 | ||||
| -rw-r--r-- | rs/java/android/renderscript/Script.java | 1 | ||||
| -rw-r--r-- | rs/java/android/renderscript/ScriptGroup.java | 17 |
3 files changed, 5 insertions, 20 deletions
diff --git a/rs/java/android/renderscript/Allocation.java b/rs/java/android/renderscript/Allocation.java index 4cd23542b685..05ad1615dc81 100644 --- a/rs/java/android/renderscript/Allocation.java +++ b/rs/java/android/renderscript/Allocation.java @@ -429,8 +429,6 @@ public class Allocation extends BaseObj { protected void finalize() throws Throwable { RenderScript.registerNativeFree.invoke(RenderScript.sRuntime, mSize); - // Set mType null to avoid double-destroying it in case its finalizer races ahead - mType = null; super.finalize(); } @@ -2839,7 +2837,6 @@ public class Allocation extends BaseObj { } /** - * @hide * Gets or creates a ByteBuffer that contains the raw data of the current Allocation. * <p> If the Allocation is created with USAGE_IO_INPUT, the returned ByteBuffer * would contain the up-to-date data as READ ONLY. @@ -2874,7 +2871,6 @@ public class Allocation extends BaseObj { } /** - * @hide * Creates a new Allocation Array with the given {@link * android.renderscript.Type}, and usage flags. * Note: If the input allocation is of usage: USAGE_IO_INPUT, @@ -2976,7 +2972,6 @@ public class Allocation extends BaseObj { } /** - * @hide * Gets the stride of the Allocation. * For a 2D or 3D Allocation, the raw data maybe padded so that each row of * the Allocation has certain alignment. The size of each row including such @@ -2994,7 +2989,6 @@ public class Allocation extends BaseObj { } /** - * @hide * Get the timestamp for the most recent buffer held by this Allocation. * The timestamp is guaranteed to be unique and monotonically increasing. * Default value: -1. The timestamp will be updated after each {@link @@ -3366,7 +3360,6 @@ public class Allocation extends BaseObj { if (mType != null && mOwningType) { mType.destroy(); - mType = null; } super.destroy(); diff --git a/rs/java/android/renderscript/Script.java b/rs/java/android/renderscript/Script.java index 35c9a13dc62f..13d5fcd57446 100644 --- a/rs/java/android/renderscript/Script.java +++ b/rs/java/android/renderscript/Script.java @@ -288,7 +288,6 @@ public class Script extends BaseObj { /** * Only intended for use by generated reflected code. (General reduction) * - * @hide */ protected void reduce(int slot, Allocation[] ains, Allocation aout, LaunchOptions sc) { mRS.validate(); diff --git a/rs/java/android/renderscript/ScriptGroup.java b/rs/java/android/renderscript/ScriptGroup.java index 0d10c6d9dc50..e0bdbfcdfed5 100644 --- a/rs/java/android/renderscript/ScriptGroup.java +++ b/rs/java/android/renderscript/ScriptGroup.java @@ -1066,19 +1066,12 @@ public final class ScriptGroup extends BaseObj { */ public void destroy() { super.destroy(); - for(Closure c : mClosures) { - c.destroy(); - } - } - - protected void finalize() throws Throwable { - // Clear out the list mClosures to avoid double-destroying the closures, - // in case their finalizers race ahead. + // ScriptGroup created using the old Builder class does not + // initialize the field mClosures if (mClosures != null) { - // ScriptGroup created using the old Builder class does not - // initialize the field mClosures - mClosures.clear(); + for (Closure c : mClosures) { + c.destroy(); + } } - super.finalize(); } } |
