summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ScriptGroup.java
AgeCommit message (Collapse)Author
2016-04-22Fixed BaseObj finalizer and destroy()Yang Ni
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
2016-04-18Fixed ScriptGroup finalizer for old APIYang Ni
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
2016-04-12Destroy Closures in ScriptGroupYang Ni
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)
2016-03-31Added CloseGuard for BaseObjYang Ni
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)
2016-03-21Correctly init code cache path for RSYang Ni
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)
2015-11-13Various fixes in setting globals in a script groupYang Ni
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
2015-06-28Add Java doc comments on script group name reuseYang Ni
b/21999787 Change-Id: Id9a7bad4ce91f3afdd82a1288cf94430f3aef9bb
2015-06-17Unpublish methods in class ScriptGroup.BindingYang Ni
b/21187932 Made it an opaque class, since there is no need for a user to inspect its fields after creation. Change-Id: I9101afdecc5e25bb484d060be2a08c470faa92e5
2015-05-18Fixed ScriptGroup for outputs to globalsYang Ni
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
2015-05-12Elaborate on description of ScriptGroup.executeYang Ni
b/21039492 ScriptGroup.execute(Object...): Describe input and output order. Change-Id: I88668338ab2ac50e602b97891b86509c81dedf4d
2015-04-21Move new script group API into ScriptGroup classYang Ni
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
2014-02-28am 62d675c2: am 0d3548be: am d138029d: am 14420e29: Merge "AArch64: Use ↵Narayan Kamath
long[] for RS id array" * commit '62d675c240fd87cb987c86ae4f6ac17dc13374c8': AArch64: Use long[] for RS id array
2014-02-12AArch64: Use long[] for RS id arrayAshok Bhat
Change-Id: Ia5145a547c0d13c7d6f1bb4d8f5472be62481bd9 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-01-31Move RenderScript from graphics/ to new fw/base subdirectory rs.Tim Murray
Change-Id: I30b6633578f063840e1bdbcc9ba513b727912a6d
2013-12-17Move RenderScript from graphics/ to new fw/base subdirectory rs.Tim Murray
Change-Id: I30b6633578f063840e1bdbcc9ba513b727912a6d