History log of /frameworks/rs/java/tests/RSTest_CompatLib/src/com/android/rs/test/RSTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c2c11cc9037d5ddd55282c6dab82db542b398d9e 19-Jul-2013 Stephen Hines <srhines@google.com> Fix Script instancing issue for support library.

Our support library relies on opening shared library versions of Scripts
on older devices. This has the unfortunate side effect of sharing global
variables across Script instances. In traditional RenderScript, the actual
Scripts are always instanced, and thus have distinct storage/values for
every global (and static global).

This change fixes the instancing issue by keeping track of loaded libraries
(via a global set, since dlopen is tracked/shared per-process). If we detect
a collision, we create a new randomly named symlink of the library to actually
load from. The dlopen() function only looks at the library name passed to it,
so this allows us to cheaply create a duplicate instance. Once the symlinked
library is actually loaded, we destroy it.

A new unit test has also been added to RSTest_CompatLib to verify instance
behavior. This is a modified version of the same test we have present in CTS
for traditional RenderScript instance verification.

Change-Id: I6a0bca2b65d125b54793d98f0f73ae92e0280af7
/frameworks/rs/java/tests/RSTest_CompatLib/src/com/android/rs/test/RSTest.java
572a5031a5d8602db0bec0b253428a034bd4dd59 19-Mar-2013 Jason Sams <jsams@google.com> Move compute tests from frameworks/base to frameworks/rs

Change-Id: I844c9f5e58f500164fec419569c68c7f854c5571
/frameworks/rs/java/tests/RSTest_CompatLib/src/com/android/rs/test/RSTest.java