[null,null,["最后更新时间 (UTC):2024-03-19。"],[],[],null,["# MediaTek enhances dynamic performance of Android SoCs\n\nImproving performance and thermal management is essential for developing\nsuccessful games on Android. Traditionally, developers had to manage these\nissues by decreasing game fidelity or by further optimizing the renderer.\nThese changes tend to be game specific and can often be inflexible.\n\nSeveral participants in the Android ecosystem offer adaptive performance APIs to\ndevelopers. To simplify the integration of adaptive performance features and\nreduce fragmentation in the ecosystem, Google and MediaTek are\ncollaborating to integrate our offerings: Android Dynamic Performance Framework\n(ADPF) and MediaTek Adaptive Gaming Technology (MAGT).\n\n[ADPF](/games/optimize/adpf) offers developers the ability to adjust game\nworkload based on real-time thermal situations and provide hints to the OS to\noptimize performance for the current workload. You can use these signals\nto adjust fidelity and performance settings such as the resolution, frame rate,\nand even resource loading strategy. This lets you\nbetter balance performance, thermals, and fidelity, giving Android gamers the\nbest possible experience. The Android ecosystem has been putting this technology\nto great use. Kakao Games's Ares was able to\n[increase FPS stability to 96%](/stories/games/kakaogames-adaptability) by\nadjusting the workload at runtime in response to the thermal API.\n\nMediaTek is a leading provider of SoCs on Android. The company produces a number\nof chips, such as the new Dimensity 9300. MediaTek also offers the MAGT SDK,\nwhich has been available since 2021. The SDK provides advanced features for\nperformance tuning on MediaTek SoCs, such as fine-grained information about\nreal-time performance, and hints for increasing workloads. In addition to\noffering MAGT to developers, MediaTek has begun offering enhanced ADPF\ncapabilities.\n**Figure 1.** MediaTek and Google collaboration.\n\nPrevent thermal throttling with ADPF and optimize performance\n-------------------------------------------------------------\n\nMediaTek allows the ADPF framework to access the current and target device\ntemperatures to prevent severe throttling. By utilizing the ADPF\n[`getThermalHeadroom()`](/reference/kotlin/android/os/PowerManager#getthermalheadroom)\nfunction, applications can obtain an estimate of the available thermal headroom\nbefore the device reaches severe throttling. Using this estimate, applications\ncan dynamically adjust workloads to prevent the device from triggering\nthrottling, thereby enhancing the overall user experience.\n\nThe application (using Unity's\n[Boat Attack demo](https://github.com/Unity-Technologies/BoatAttack) as an\nexample) also uses the Performance Hint Session API to optimize its performance.\nIt provides the target frame time and current frame time for each frame through\nthe [`updateTargetWorkDuration()`](/reference/kotlin/android/os/PerformanceHintManager.Session#updatetargetworkduration)\nand [`reportActualWorkDuration()`](/reference/kotlin/android/os/PerformanceHintManager.Session#reportactualworkduration)\nfunctions respectively. The MediaTek platform calculates the workload between\ntwo [`reportActualWorkDuration()`](/reference/kotlin/android/os/PerformanceHintManager.Session#reportactualworkduration)\ncalls and allocates adequate CPU capacity to ensure the workload can be\ncompleted within the target duration.\n\nAs a result, the MediaTek platform consistently delivers optimal frames per\nsecond (FPS) with balanced power consumption, guaranteeing a smooth user\nexperience.\n\nEnable better frame rates, reduced power consumption, and longer gaming sessions\n--------------------------------------------------------------------------------\n\nOverall, the Unity Boat Attack demo improved frame rates by 8.5fps,\nreduced power consumption by 12%, and enabled longer game sessions by 25 minutes\nor more. The FPS standard deviation dropped by 25%.\nSuch a dramatic improvement lets you increase the fidelity of\nyour games and run play sessions for a longer period of time in a thermally\nsustainable way.\n**Figure 2.** Performance results. **Figure 3.** FPS chart.\n\nEven without adjusting the fidelity settings, just by enabling performance hint\nsession, the workload was able to to decrease its average Render thread time by\nalmost 10%.\n\nWhat's next for adaptive performance on MediaTek SoCs\n-----------------------------------------------------\n\nADPF will be upgraded over the coming years with new features and to add new\ndevice-agnostic features from MAGT. For developers looking to get even more out\nof their MediaTek devices, the MAGT SDK contains advanced capabilities that\nuniquely target MediaTek chipset architectures and will soon also offer core\nADPF features.\n**Figure 4.** MediaTek aligned with Android.\n\nGet started with Android adaptability\n-------------------------------------\n\nAndroid Dynamic Performance Framework is now available to all Android game\ndevelopers for [Unity, Unreal, Cocos Creator game engines](https://developer.android.com/games/optimize/adpf/game-engine-support)\nand through our native C++ libraries.\n\n- For Unity developers, you can get started with the [Adaptive Performance provider v5.0.0](https://docs.unity3d.com/Packages/com.unity.adaptiveperformance.google.android@1.2/manual/index.html) . Note that Thermal API is supported by most Android devices from Android 11 (API level 30), and Performance Hint API from Android 12 (API level 31).\n- For Unreal developers, you can get started with the [Android Dynamic Performance Unreal Engine plugin](https://github.com/android/adpf-unreal-plugin) for most Android devices targeting Android 12 (API level 31) or higher.\n- For Cocos Creator, you can get started with Thermal API from v3.8.2 and Performance Hint API from [v3.8.3](https://github.com/cocos/cocos-engine/tree/v3.8.3).\n\nFor these game engines, the thermal APIs are integrated with Adaptive\nPerformance to help you retrieve device thermal information, and the performance\nhint API is called automatically every `Update()` or `Monitor()` without any\nadditional work.\nAnd lastly, for custom engines, you can reference our\n[native ADPF C++ sample](https://github.com/android/games-samples/tree/main/agdk/adpf)\n.\n\nAdditional resources\n--------------------\n\nLearn how [Android Dynamic Performance Framework](/games/optimize/adpf) can help\nyou stabilize your game's FPS and reduce thermal throttling.\n\nLearn about [MediaTek Adaptive Gaming Technology](https://www.mediatek.com/technology/gaming-technologies)\nfor advanced performance tuning on MediaTek SoCs."]]