summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorRiddle Hsu <riddlehsu@google.com>2020-11-03 16:04:55 +0800
committerRiddle Hsu <riddlehsu@google.com>2020-11-10 12:39:43 +0800
commitfb3c099558270c50cf4cbfa52456fcb1e5b295d7 (patch)
tree492e9220efe00b73248dedc070149336cfa2fd17 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent11cbe5ff61e95a226a2d094ead5d4c9317c4f57d (diff)
Track process with visible activities
- A quick lookup without locking WM to provide whether a process or uid has visible or resumed activity. - Move cpu usage collection from the path of resume/pause in WM lock to background thread. - Do not get cpu time if the next activity is still in the same process, to reduce unnecessary accesses of proc file. E.g. if there are 3 foreground activity switches in the same process, it can save 6 accesses. - Change hasForegroundActivities to use source state. It was set by OomAdjuster when ComputeOomAdjCallback#onVisibleActivity or onPausedActivity or onStoppingActivity is called, which may not be the latest state. Bug: 171989664 Test: WindowProcessControllerTests#testComputeProcessActivityState Change-Id: I3fb42e455232c8718549af5b7bb1ca638558d827
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions