# Google ADPF and QAPE

Source: [https://docs.qualcomm.com/doc/80-PK177-134/topic/google_adpf_and_qape.html](https://docs.qualcomm.com/doc/80-PK177-134/topic/google_adpf_and_qape.html)

Google introduced Adaptive Dynamic Performance Framework (ADPF). PerformanceHintManager
        is introduced as by Google.

ADPF provides the [PerformanceHintManager](https://developer.android.com/reference/android/os/PerformanceHintManager) class so games can make
            performance hints to Android for CPU clock speed and core type. The OS can then decide
            how to best use the hints based on the SoC and thermal solution of the device. If your
            app uses this API along with thermal state monitoring, it can provide more informed
            hints to the OS instead of using busy loops and other coding techniques that can cause
            throttling.

There are three key APIs as part of PerformanceHintManager.

- CreateHintSession(int[] tids, long initialTargetWorkDurationNanos) – This API takes
                two parameters (a list of threads and a target duration) and results in two internal
                QAPE calls.
    - [set_desired_content_rate()](https://docs.qualcomm.com/doc/80-PK177-134/topic/qape_set_desired_content_rate.html), based on the target work duration, this API will
                        call for content rate.
    - [hint_low_latency](https://docs.qualcomm.com/doc/80-PK177-134/topic/qape_hint_low_latency.html) for the list of the threads in the array.
- setThreads(int[] tids)
    - [release_thread_hints()](https://docs.qualcomm.com/doc/80-PK177-134/topic/qape_release_thread_hints.html) this is to ensure that all the threads are removed
                        from the sched list.
    - [hint_low_latency](https://docs.qualcomm.com/doc/80-PK177-134/topic/qape_hint_low_latency.html) for the list of the threads in the array.
- updateTargetWorkDuration(long Duration)
    - [set_desired_content_rate()](https://docs.qualcomm.com/doc/80-PK177-134/topic/qape_set_desired_content_rate.html), based on the target work duration, this API will
                        call for content rate.

**Parent Topic:** [Performance API overview](https://docs.qualcomm.com/doc/80-PK177-134/topic/performance_api_overview.html)

Last Published: Nov 14, 2024

[Previous Topic
Performance API overview](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/performance_api_overview.md) [Next Topic
QAPE subsystem APIs](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/qape_apis.md)