OSDN Git Service

Correctly init code cache path for RS
authorYang Ni <yangni@google.com>
Fri, 11 Mar 2016 00:12:31 +0000 (16:12 -0800)
committerYang Ni <yangni@google.com>
Fri, 18 Mar 2016 23:28:27 +0000 (23:28 +0000)
commit689f63770048589e1001ce99faf1d2eaf9780a80
tree8018553fe94aea9fa10762ac450756bb8c594949
parent1b4afc275fd39181d2ee2ba37733d971396ef7c0
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
rs/java/android/renderscript/RenderScript.java
rs/java/android/renderscript/ScriptC.java
rs/java/android/renderscript/ScriptGroup.java