History log of /frameworks/base/core/java/android/os/GraphicsEnvironment.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0e72f130abb5ac52b8cdafe32ab85c43ac3a3f71 08-May-2017 Jesse Hall <jessehall@google.com> Require targetSdkVersion>=O for updated graphics driver packages

In O, graphics drivers are loaded into a new restricted linker
namespace. Drivers built for previous versions of the OS may not work
under those restrictions, so require an updated driver package to
declare compatibility by setting targetSdkVersion >= O.

Bug: 34228255
Test: manually construct packages with and without
targetSdkVersion >= O, confirm driver is used/not-used as
expected.
Change-Id: I4518360433a6de5c6e1e792a6eedddf8c6bf4394
/frameworks/base/core/java/android/os/GraphicsEnvironment.java
37e63c705e827fe52b743f125875e61ce5cb74ce 24-Jan-2017 Jesse Hall <jessehall@google.com> Don't lower priority of EGL Init thread

The EGL Init thread spends a lot of time loading shared libraries,
which involves reading pages and adjusting VM pages. Previously it was
a low priority thread, which meant that when it blocked while holding
a VM lock, it might take a while to be scheduled again once ready, so
it would hold the VM lock longer than necessary, blocking other
threads waiting on soft faults, etc. Classic priority inversion.
Leaving the thread at normal priority causes it to interfere *less*
with critical-path Activity launch work.

Bug: 34611670
Test: go/platform-startup, specifically:
./tradefed.sh run google/template/local --template:map test
google/test/performance/app-launch-perf
--post-boot-command "service call persistent_data_block 6 i32 1"
--post-boot-command "service call persistent_data_block 7 i32 1"
--apps Clock alarmclock --trial-launch --launch-iteration 10
--launch-order cyclic --drop-cache --trace-directory sdcard
--trace-iteration 2 --simple-perf-cmd "simpleperf stat -a"
--report-metrics all --force-skip-system-props --alt-dir `pwd`

Change-Id: I17647c657da64d15f40f8f2b97ee3400e1f0be7f
/frameworks/base/core/java/android/os/GraphicsEnvironment.java
fd104e7fde7f53700da58cbab57d73b938b837a7 20-Jan-2017 Jesse Hall <jessehall@google.com> Load EGL early in Activity launch, instead of in Zygote

Preloading EGL in Zygote was originally a memory footprint
optimization, but it turns out to be an important app startup time
optimization as well. Preloading EGL in Zygote is incompatible with
updatable graphics drivers, but we don't want to do it on-demand as
part of drawing the first frame either, since that increases
first-frame latency unacceptably.

This change removes Zygote preload, and instead loads EGL on a
low-priority background thread immediately after choosing which
graphics driver to use. This means it is usually done well before
drawing the first frame, without significantly disrupting other
activity launch work.

Test: observe systrace of Calculator launch on bullhead
Bug: 34404021
Change-Id: I6a0f6b90ade21848a10d51ddae62c936f70151b5
Merged-In: I887aa09bd35b088b16f53a89838a0c7c98f15761
/frameworks/base/core/java/android/os/GraphicsEnvironment.java
79bf392dc6d50436ff16693267c808fc115ab07c 12-Dec-2016 Jesse Hall <jessehall@google.com> Create GraphicsEnvironment for communicating with driver loaders

The GraphicsEnvironment class is given information during application
start, and makes it available to EGL/GLES/Vulkan loaders that don't
have easy access to the VM or to the application Context. Currently
only the driver path is handled, but the existing support for setting
library paths (for Vulkan extensions) and cache directory information
should move here.

Bug: 33531483
Change-Id: I4e4e7fb21f1bcc67122e9173514af5f18c063991
Merged-In: I5820d3d1301d5461e10706f551b268c54d4f8926
/frameworks/base/core/java/android/os/GraphicsEnvironment.java