Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 293ac2c6 authored by Marin Shalamanov's avatar Marin Shalamanov
Browse files

Update docs for setFrameRate

Explicitly state that when fps=0 the other two parameters
of setFrameRate are ignored.

Bug: 161776961
Test: n/a
Change-Id: Ife8c462c3832e583599126708211f4cc79d431ae
parent e4d7d43d
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -484,11 +484,12 @@ void ASurfaceTransaction_setFrameRate(ASurfaceTransaction* transaction,
 *
 *
 * \param compatibility The frame rate compatibility of this surface. The compatibility value may
 * \param compatibility The frame rate compatibility of this surface. The compatibility value may
 * influence the system's choice of display frame rate. To specify a compatibility use the
 * influence the system's choice of display frame rate. To specify a compatibility use the
 * ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_* enum.
 * ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_* enum. This parameter is ignored when frameRate is 0.
 *
 *
 * \param changeFrameRateStrategy Whether display refresh rate transitions should be seamless.
 * \param changeFrameRateStrategy Whether display refresh rate transitions caused by this
 * A seamless transition is one that doesn't have any visual interruptions, such as a black
 * surface should be seamless. A seamless transition is one that doesn't have any visual
 * screen for a second or two. See the ANATIVEWINDOW_CHANGE_FRAME_RATE_* values.
 * interruptions, such as a black screen for a second or two. See the
 * ANATIVEWINDOW_CHANGE_FRAME_RATE_* values. This parameter is ignored when frameRate is 0.
 *
 *
 * Available since API level 31.
 * Available since API level 31.
 */
 */
+6 −3
Original line number Original line Diff line number Diff line
@@ -302,6 +302,8 @@ enum ANativeWindow_ChangeFrameRateStrategy {
 *
 *
 * Available since API level 31.
 * Available since API level 31.
 *
 *
 * \param window pointer to an ANativeWindow object.
 *
 * \param frameRate The intended frame rate of this window, in frames per
 * \param frameRate The intended frame rate of this window, in frames per
 * second. 0 is a special value that indicates the app will accept the system's
 * second. 0 is a special value that indicates the app will accept the system's
 * choice for the display frame rate, which is the default behavior if this
 * choice for the display frame rate, which is the default behavior if this
@@ -309,15 +311,16 @@ enum ANativeWindow_ChangeFrameRateStrategy {
 * valid refresh rate for this device's display - e.g., it's fine to pass 30fps
 * valid refresh rate for this device's display - e.g., it's fine to pass 30fps
 * to a device that can only run the display at 60fps.
 * to a device that can only run the display at 60fps.
 *
 *
 * \param window pointer to an ANativeWindow object.
 *
 * \param compatibility The frame rate compatibility of this window. The
 * \param compatibility The frame rate compatibility of this window. The
 * compatibility value may influence the system's choice of display refresh
 * compatibility value may influence the system's choice of display refresh
 * rate. See the ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_* values for more info.
 * rate. See the ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_* values for more info.
 * This parameter is ignored when frameRate is 0.
 *
 *
 * \param changeFrameRateStrategy Whether display refresh rate transitions should be seamless.
 * \param changeFrameRateStrategy Whether display refresh rate transitions caused by this
 * window should be seamless.
 * A seamless transition is one that doesn't have any visual interruptions, such as a black
 * A seamless transition is one that doesn't have any visual interruptions, such as a black
 * screen for a second or two. See the ANATIVEWINDOW_CHANGE_FRAME_RATE_* values.
 * screen for a second or two. See the ANATIVEWINDOW_CHANGE_FRAME_RATE_* values.
 * This parameter is ignored when frameRate is 0.
 *
 *
 * \return 0 for success, -EINVAL if the window, frame rate, or compatibility
 * \return 0 for success, -EINVAL if the window, frame rate, or compatibility
 * value are invalid.
 * value are invalid.