summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorOlivier Gaillard <gaillard@google.com>2018-09-17 09:35:32 +0100
committerOlivier Gaillard <gaillard@google.com>2018-10-29 17:19:31 +0000
commit510cdfc32caac0beb2fc10918f4113a5226fa02b (patch)
treef8fc4f95893b51387eed1e6f4a30db3737de1ab5 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent80665469f50a0cf276b6834861f64d1be3e62988 (diff)
Adds a mechanism to listen to proxy transact method calls.
There are multiple use cases for it: 1) Make it easy for another process to set the worksource. The worksource can be propagated in a thread local - this is how gmscore and soon system server works - the worksource can then be set for all binder calls using Object transactStarted() { Binder.setWorkSource(ThreadLocalWorkSourceUid.get()); return null; // No token needed. } void transactEnded() { Binder.setWorkSource(null); } This will be used by system process and gmscore. 2) SystemUI team was interested in detecting binder calls done from the main thread in dogfood/tests. This listener will make it easy to figure out which thread is used. Performance impact of transact method: - With current code: 45ns per call - With this code: 57ns per call This is not significant compared to the total binder call time which is 10-100s of microseconds. Test: unit test Change-Id: Id0a2f52cba33b390ff83f703284b79471cc80b1c
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions