WVR_SetPerformanceLevels¶
-
WVR_EXPORT bool WVR_SetPerformanceLevels(WVR_PerfLevel cpuLevel, WVR_PerfLevel gpuLevel)
Set CPU and GPU performance level.
This API is only supported on certain platform. The API can be used to increase/decrease the CPU or GPU performance based on practical demands.
- Return
- true if set performance level success, otherwise return false.
- Version
- API Level 2
- Note
- Effective with Runtime version 2 or higher.
Struct and enumeration¶
The srtuct WVR_PerfLevel is defined as below.
-
enum
WVR_PerfLevel
¶ Enum used for indicating the CPU/GPU performance levels.
Values:
-
WVR_PerfLevel_System
= 0¶ System defined performance level (default)
-
WVR_PerfLevel_Minimum
= 1¶ Minimum performance level.
-
WVR_PerfLevel_Medium
= 2¶ Medium performance level.
-
WVR_PerfLevel_Maximum
= 3¶ Maximum performance level.
-
WVR_PerfLevel_NumPerfLevels
¶
-
How to use¶
Here is an example for the function:
#include <wvr/wvr_system.h>
// Set CPU performance as maximal level and GPU performance as minimal level.
bool result = WVR_SetPerformanceLevels(WVR_PerfLevel_Maximum, WVR_PerfLevel_Minimum);
if (result)
LOGI("Setting performance levels of CPU and GPU is done.");
else
LOGE("Setting performance levels of CPU and GPU is failed");
This API is only supported on the SVR platform which the HMD leverages Qualcomm Snapdragon SoC. The API can be applied to boost or hinder the performance of CPU and GPU depending on practical demands.