diff options
| author | 2018-09-17 09:35:32 +0100 | |
|---|---|---|
| committer | 2018-10-29 17:19:31 +0000 | |
| commit | 510cdfc32caac0beb2fc10918f4113a5226fa02b (patch) | |
| tree | f8fc4f95893b51387eed1e6f4a30db3737de1ab5 /libs/hwui/FrameInfoVisualizer.cpp | |
| parent | 80665469f50a0cf276b6834861f64d1be3e62988 (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 'libs/hwui/FrameInfoVisualizer.cpp')
0 files changed, 0 insertions, 0 deletions