Merge "Update javadoc for setFrameRate" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
deb3ccf048
@@ -936,18 +936,21 @@ public class Surface implements Parcelable {
|
|||||||
* @param frameRate The intended frame rate of this surface, in frames per second. 0
|
* @param frameRate The intended frame rate of this surface, in frames per second. 0
|
||||||
* is a special value that indicates the app will accept the system's choice for the
|
* 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 function isn't
|
* display frame rate, which is the default behavior if this function isn't
|
||||||
* called. The frameRate param does <em>not</em> need to be a valid refresh rate for
|
* called. The <code>frameRate</code> parameter does <em>not</em> need to be a valid refresh
|
||||||
* this device's display - e.g., it's fine to pass 30fps to a device that can only run
|
* 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.
|
* the display at 60fps.
|
||||||
*
|
*
|
||||||
* @param compatibility The frame rate compatibility of this surface. The
|
* @param compatibility The frame rate compatibility of this surface. The
|
||||||
* compatibility value may influence the system's choice of display frame rate.
|
* compatibility value may influence the system's choice of display frame rate.
|
||||||
|
* This parameter is ignored when <code>frameRate</code> is 0.
|
||||||
*
|
*
|
||||||
* @param changeFrameRateStrategy Whether display refresh rate transitions should be seamless. A
|
* @param changeFrameRateStrategy Whether display refresh rate transitions caused by this
|
||||||
* 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.
|
* interruptions, such as a black screen for a second or two. This parameter is ignored when
|
||||||
|
* <code>frameRate</code> is 0.
|
||||||
*
|
*
|
||||||
* @throws IllegalArgumentException If frameRate or compatibility are invalid.
|
* @throws IllegalArgumentException If <code>frameRate</code>, <code>compatibility</code> or
|
||||||
|
* <code>changeFrameRateStrategy</code> are invalid.
|
||||||
*/
|
*/
|
||||||
public void setFrameRate(@FloatRange(from = 0.0) float frameRate,
|
public void setFrameRate(@FloatRange(from = 0.0) float frameRate,
|
||||||
@FrameRateCompatibility int compatibility,
|
@FrameRateCompatibility int compatibility,
|
||||||
|
|||||||
@@ -3298,20 +3298,26 @@ public final class SurfaceControl implements Parcelable {
|
|||||||
* because the system may change the display refresh rate, calls to this function may result
|
* because the system may change the display refresh rate, calls to this function may result
|
||||||
* in changes to Choreographer callback timings, and changes to the time interval at which
|
* in changes to Choreographer callback timings, and changes to the time interval at which
|
||||||
* the system releases buffers back to the application.
|
* the system releases buffers back to the application.
|
||||||
|
* <p>
|
||||||
|
* Note that this only has an effect for surfaces presented on the display. If this
|
||||||
|
* surface is consumed by something other than the system compositor, e.g. a media
|
||||||
|
* codec, this call has no effect.
|
||||||
*
|
*
|
||||||
* @param sc The SurfaceControl to specify the frame rate of.
|
* @param sc The SurfaceControl to specify the frame rate of.
|
||||||
* @param frameRate The intended frame rate for this surface, in frames per second. 0 is a
|
* @param frameRate The intended frame rate for this surface, in frames per second. 0 is a
|
||||||
* special value that indicates the app will accept the system's choice for
|
* special value that indicates the app will accept the system's choice for
|
||||||
* the display frame rate, which is the default behavior if this function
|
* the display frame rate, which is the default behavior if this function
|
||||||
* isn't called. The frameRate param does <em>not</em> need to be a valid
|
* isn't called. The <code>frameRate</code> param does <em>not</em> need
|
||||||
* refresh rate for this device's display - e.g., it's fine to pass 30fps
|
* to be a valid refresh rate for this device's display - e.g., it's fine
|
||||||
* to a device that can only run the display at 60fps.
|
* to pass 30fps to a device that can only run the display at 60fps.
|
||||||
* @param compatibility The frame rate compatibility of this surface. The compatibility
|
* @param compatibility The frame rate compatibility of this surface. The compatibility
|
||||||
* value may influence the system's choice of display frame rate.
|
* value may influence the system's choice of display frame rate.
|
||||||
* @param changeFrameRateStrategy Whether display refresh rate transitions should be
|
* This parameter is ignored when <code>frameRate</code> is 0.
|
||||||
* seamless. A seamless transition is one that doesn't have
|
* @param changeFrameRateStrategy Whether display refresh rate transitions caused by this
|
||||||
* any visual interruptions, such as a black screen for a
|
* surface should be seamless. A seamless transition is one
|
||||||
* second or two.
|
* that doesn't have any visual interruptions, such as a
|
||||||
|
* black screen for a second or two. This parameter is
|
||||||
|
* ignored when <code>frameRate</code> is 0.
|
||||||
* @return This transaction object.
|
* @return This transaction object.
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
|
|||||||
Reference in New Issue
Block a user