Game Mode interventions are game specific optimizations set by original equipment manufacturers (OEMs) to improve the performance of games that are no longer being updated by developers. For example:
- WindowManager backbuffer resize.
- Using ANGLE instead of native GLES drivers.
Alternatively, if it's possible to update the game, you can optimize the performance and battery by using the Game Mode API.
The Game Mode API and interventions are available on select Android 12 devices.
WindowManager backbuffer resizing
The WindowManager backbuffer resize intervention can reduce a device's GPU load. It can also reduce battery consumption when a game is paced at a target frame rate.
When resize is enabled, it can result in up to a 30% GPU power reduction and 10% system power reduction. The results can vary based on the device used, environmental conditions, and other factors, such as simultaneous processing.
An unpaced game that is GPU bound is likely to experience higher frame rates during reduced GPU loads. However, we strongly recommend that all games are well-paced because uneven frame rates significantly impact how users perceive performance.
To evaluate the WindowManager backbuffer resize intervention on its own, use the following adb command. A 90% resize is almost negligible, whereas 50% is significant.
adb shell cmd game downscale [0.5|0.6|0.7|0.8|0.9|disable] <PACKAGE_NAME>
Set up the modes
You should verify the intervention in the performance and battery modes as described below.
|Supported game mode||Description|
|PERFORMANCE||Provides the lowest latency frame rates in exchange for reduced battery life and fidelity.|
|BATTERY||Provides the longest possible battery life in exchange for reduced fidelity or frame rates.|
Enable Performance mode:
<!-- default is false --> <meta-data android:name="com.android.app.gamemode.performance.enabled" android:value="true"/>
Enable Battery mode:
<!-- default is false --> <meta-data android:name="com.android.app.gamemode.battery.enabled" android:value="true"/>
Test your game
Assign different resize values to see how your game is affected by the WindowManager backbuffer resize intervention:
adb shell device_config put game_overlay <PACKAGE_NAME> mode=2,downscaleFactor=0.7:mode=3,downscaleFactor=0.8
Submit interventions to OEMs
For Android 12, each intervention must be set by the device OEM. For Pixel devices, submit your request with the following information:
Game package name.
Device and model details.
Intervention values for the requested modes.
Opt-out from interventions
Alternatively, you can control whether an intervention is applied to your game by opting-out. Each intervention has its own opt-out setting.
To disable the WindowManager backbuffer resize intervention, add the following to the
<application>element in your AndroidManifest.xml file.
<meta-data android:name="com.android.graphics.intervention.wm.allowDownscale" android:value="false"/>
Rebuild and resubmit your game to opt-out.
For more information about measuring and optimizing game performance:
System Profilers - analyze CPU usage and graphics calls.
Android GPU Inspector - profile graphics on Android.
Android Frame Pacing Library - help OpenGL and Vulkan games achieve smooth rendering and correct frame pacing.
Android Performance Tuner - measure and optimize frame rate and graphics across Android devices at scale.
Energy Profiler - find where your app uses more energy than necessary.