History log of /frameworks/base/rs/java/android/renderscript/ScriptGroup.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1b4df1697f0d9b5dadfa1aca6c50d845d701ed2c 21-Apr-2016 Yang Ni <yangni@google.com> Fixed BaseObj finalizer and destroy()

Bug: 28242626
Bug: 27972184
Bug: 27973681

This is resolving issues in ScriptGroup (V1) again.
In ScriptGroup.destroy(), we also need to consider the old API where
mClosures is not initialized.

Also cleaned up the finalizer for ScriptGroup and Allocation:
Since BaseObj.finalize() calls BaseObj.helpDestroy(), instead of
BaseObj.destroy(), there is no possibility that the finalizers of
child objects may race their parents finalizers. Note that
helpDestroy() does not try to recurse on child objects.

Change-Id: I9dbb2b60f8478f656f8a418c2b5fc8d6848aeef0
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java
07837d6dab331b1693aa3689223b4012012a7fad 18-Apr-2016 Yang Ni <yangni@google.com> Fixed ScriptGroup finalizer for old API

Bug: 28242626

ScriptGroup finalizer clears out the list of closures, which is
uninitialized for the old API.

Need to check null first, before accessing the list.

Change-Id: Ibf914e17a0878c8c561f823c5f6f6f6619594de1
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java
44d1b3bfba63ec3610d34621780824368f915672 05-Apr-2016 Yang Ni <yangni@google.com> Destroy Closures in ScriptGroup

Bug: 27973681

Implemented correct destruction in ScriptGroup.destroy() and
Clsoure.destroy(), which properly destroys child BaseObj's.

Change-Id: I946f62c2979d6a338b8883514cacad472a213c5c
(cherry picked from commit 44e2f45f0cab4a429e59f07c1e5bf0eef08c7819)
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java
6484b6be5ca5233614d0a8991a5d909543824fc7 24-Mar-2016 Yang Ni <yangni@google.com> Added CloseGuard for BaseObj

Bug: 27719830

To turn on warnings, apps have to add to their Activity.onCreate() method
the following code.

StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectLeakedClosableObjects()
.penaltyLog()
.build());

For Slang generated ScriptC derived classes, we assume their
constructors won't throw exceptions after calling the ScriptC
constructor. In addition, ScriptIntrinsic derived classes do not seem
to throw exceptions in their constructors either. Therefore, we can
leave the guard.open() call in the Script constructor. This may be
only an approximation, but allows us to add CloseGuard for script
objects without making changes to slang.

Change-Id: I77ed45239a60b85af5c811dee6c124fb53da9060
(cherry picked from commit eb4dd08ec132f83745b8b28fa7da58eb4478b5b9)
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java
15fcf61dc0f1206b8eb562df8984035a599d290a 11-Mar-2016 Yang Ni <yangni@google.com> Correctly init code cache path for RS

Bug: 27439261

Script Group needs to know the code cache path before it can call bcc to
merge kernels. However, before this change, the code cache path has been
initialized by the ScriptC class.

In the case where a script group (or even the entire app) does not contain any
regular script but only intrinsics, the code cache would remain uninitialized.

Fixed this by initializing the code cache path in the RenderScript class
the first time when the accessor method is called.

Change-Id: I87f9e62e0f3b479f94e43daa3e9695a5b38710db
(cherry picked from commit 689f63770048589e1001ce99faf1d2eaf9780a80)
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java
263cc90345784c3f60bf57c0de91afc4d6c3d5db 10-Nov-2015 Yang Ni <yangni@google.com> Various fixes in setting globals in a script group

Bug: 25602504

1) Passing floating point values into a script group was broken,
since they were casted to long values. Fixed that in the frameworks
implementation by taking the raw bits instead.

2) Passing 64-bit values into a script group was broken on 32-bit
platforms, since they were casted to pointer-sized integers
(uintptr_t) in the JNI code. Fixed that by casting to int64_t
instead.

3) Setting global variables of Allocation type in a script group was
broken. The special size value -1 was used to indicate the value is an
Allocation. However, size was casted to size_t in the JNI code.
Fixed that by using signed integers.

Change-Id: Ifff099a76be7707df7b67c388395f5a00f9cae66
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java
dbb6fd58a4b113f8761ce825ad5b91e50c170971 25-Jun-2015 Yang Ni <yangni@google.com> Add Java doc comments on script group name reuse

b/21999787

Change-Id: Id9a7bad4ce91f3afdd82a1288cf94430f3aef9bb
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java
77eba488894494e739c47723cd46b7652d5cc6de 15-May-2015 Yang Ni <yangni@google.com> Unpublish methods in class ScriptGroup.Binding

b/21187932

Made it an opaque class, since there is no need for a user to
inspect its fields after creation.

Change-Id: I9101afdecc5e25bb484d060be2a08c470faa92e5
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java
870767eb95a05d50c67db4a1a46ce73ada94bd59 18-May-2015 Yang Ni <yangni@google.com> Fixed ScriptGroup for outputs to globals

b/21187932

Dependency from one kernel to another kernel -- where one reads the
other's output to a global allocation -- was not handled correctly.
This CL fixed that. Needed to make a new CTS test pass.

Change-Id: I500f9cac9d89bcaec7c186e942ba4a7d413daadb
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java
43563896061bd70f83b10325c2642d1b97b26df5 12-May-2015 Yang Ni <yangni@google.com> Elaborate on description of ScriptGroup.execute

b/21039492

ScriptGroup.execute(Object...): Describe input and output order.

Change-Id: I88668338ab2ac50e602b97891b86509c81dedf4d
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java
18314caccd4e4b7cf59f2a18a38181f8e3d88634 18-Apr-2015 Yang Ni <yangni@google.com> Move new script group API into ScriptGroup class

And mark existing methods and builder deprecated.
Removed ScriptGroup2 class.
Renamed nested class UnboundValue to Input.
Marked classes Closure, Future, and Input as final.

Change-Id: I362910c115e9d0173dc515674e08bf4878232879
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java
11e4317555fdabeecf28fe8a70bfecb216224ad1 28-Feb-2014 Narayan Kamath <narayan@google.com> am 62d675c2: am 0d3548be: am d138029d: am 14420e29: Merge "AArch64: Use long[] for RS id array"

* commit '62d675c240fd87cb987c86ae4f6ac17dc13374c8':
AArch64: Use long[] for RS id array
9807155b11a25fb6068edc9b1cd82928ac2f05de 12-Feb-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Use long[] for RS id array

Change-Id: Ia5145a547c0d13c7d6f1bb4d8f5472be62481bd9
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java
355707e4f665904e31d9f5fcff1e3921f7db8cdd 17-Dec-2013 Tim Murray <timmurray@google.com> Move RenderScript from graphics/ to new fw/base subdirectory rs.

Change-Id: I30b6633578f063840e1bdbcc9ba513b727912a6d
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java
d1576fb039f018ea4d55abbb2c03d542011be399 17-Dec-2013 Tim Murray <timmurray@google.com> Move RenderScript from graphics/ to new fw/base subdirectory rs.

Change-Id: I30b6633578f063840e1bdbcc9ba513b727912a6d
/frameworks/base/rs/java/android/renderscript/ScriptGroup.java