WVR_GetFrameRate¶
-
WVR_EXPORT WVR_Result WVR_GetFrameRate(uint32_t * frameRate)
Function to get rendering frame rate.
Use this function to get rendering frame rate. This function must be called after calling WVR_RenderInit().
- Version
- API Level 12
- Note
- Supported since Runtime version 12 or higher.
- Parameters
frameRate
: A pointer to an unsigned integer of current rendering frame rate.
- Return Value
WVR_SUCCESS
: Get frame rate success, otherwise returns false.WVR_Error_RuntimeVersionNotSupport
: This feature is supported from Runtime version 12 or higher.WVR_Error_FeatureNotSupport
: This feature is not supported on this device.WVR_Error_SystemInvalid
: The runtime initialization was not finished.Others
: Failed, please see WVR_Result for more information.
How to use¶
Here is an example for the function:
uint32_t frameRate;
WVR_GetFrameRate(&frameRate);
LOGI("Current render target frame rate: %d", frameRate);
Note
- This function will return the render target frame rate, not the current rendering FPS.
- If you call WVR_GetFrameRate to get current render target frame rate right after the WVR_SetFrameRate, it will get the previous render target frame rate, since the system need to take some processing time to make the frame rate change effective after WVR_SetFrameRate calling.