Android Dynamic Performance Framework (ADPF) is a powerful tool from Google for developers who want to optimize the performance of their applications. Through its thermal APIs, ADPF provides real-time information about the thermal state of the device, which is then used to adjust graphics settings in the application.
For research purposes, Arm developed a demo using Unreal Engine and ADPF to investigate how ADPF is used to optimize game performance.
ADPF monitors the thermal status, with the graphics qualities being adjusted in the game engine accordingly.
Keeping developers in mind, the objective is to allow users to play the game for longer without affecting the gameplay experience and the device consuming too much power.
Before looking at the demo in more detail, it is important to highlight that the official Google documentation on ADPF. This documentation is an invaluable resource which provides in-depth insights and guidance on how to use ADPF.
However, for those who prefer hands-on learning, the ADPF sample repository contains practical examples of implementing ADPF in Android applications.
In the context of Unreal Engine, we can adjust graphics settings dynamically to maintain performance.
We used the Thermal State monitor and Thermal Headroom API in ADPF to monitor thermal throttling. You can then adjust quality settings, such as shadow quality, reflection quality and texture quality, as the device starts to throttle.
The following Graphics Quality settings in Unreal Engine are used to modify various settings:
Arm creates our own demo games, which are used to research mobile graphics and game technologies. This year, we have tested ADPF on one of them, the SteelArms demo.
SteelArms has different levels of graphics intensities and a substantial CPU workload. It is built to be like modern mobile games, so we can model the game behavior on today’s mobile phones. It also allows us to test how different technologies might work in a game on Arm-based mobile devices.
Figure 1: SteelArms full screen comparison with and without ADPF.
The previous images show a difference between the best (Cinematic) quality and lowest (Low) quality when ADPF is activated to adjust graphics settings. This change is gradual and not noticeable by users during gameplay.
Figure 2: Game with ADPF integration: split screen.
A split screen view of the highest graphics settings on the left (Blue Robot) side, and lowest graphics settings on the right (Red Robot) side.
Figure 3: Game with ADPF Integration: side-by-side details comparison.Figure 4: Game with ADPF Integration: side by side.
In the previous figures 3 and 4, the same view of the robot can be seen side by side. If a closer look is taken, the graphics settings adjusted by using ADPF is seen. Notice the floor of the ring, the shoulder of the robot, the ropes of the ring and the crowd? All of them seem to be at a slightly lower quality, which was done by using ADPF.
When throttling was imminent, these effects were scaled down in the SteelArms demo. It is hard to spot these small reductions in post processing and visual effects. Also, users will generally not notice them when playing. This means you can maintain most of the visual experience for the game without a hit to the gameplay experience. You can do all this while maintaining the power performance of your game and the battery life of your device.
As mentioned earlier, for demonstration purposes, we are comparing the highest with the lowest quality settings images. This is why the difference can still be seen when looked at carefully. However, when downscaled during gameplay, it is hardly noticeable to the user, while maintaining a stable gameplay experience.
Figure 5: Comparisons of FPS, Device Temperature, Thermal State & Headroom when ADPF is enabled/disabled
Figure 6: Comparison of Power Consumption with ADPF enabled/disabled
The results from ADPF being off and on can be seen in the figures above. Showing that there is a difference in the frame rate of the game, and power consumption of the cores. Up to a 57% improvement in the frame rate is seen when ADPF is on. When ADPF is off, the GPU draws a significant amount of power. The big CPU core then has power spikes that are consistent with the GPU workload. As it is catching up with the amount of processing that it is being asked to do. In comparison, when ADPF is on, the big CPU core responds to throttling and brings down the overall power consumption of all cores in the device.
ADPF can significantly improve the power consumption of games. This ultimately means longer playtime for gamers, with improved battery life and lower temperature for the device being used. From a developer perspective, ADPF maintains a l the correct frame rate of the game. While giving them the flexibility to scale down quality settings and still providing the user with a great gameplay experience.
Newer and older devices can benefit from using ADPF. It allows games to run to a high standard on previous generations of devices without additional optimization work.