HardwareRenderer.FrameRenderRequest.SetWaitForPresent(Boolean) Method

Definition

Sets whether or not syncAndDraw() should block until the frame has been presented.

[Android.Runtime.Register("setWaitForPresent", "(Z)Landroid/graphics/HardwareRenderer$FrameRenderRequest;", "", ApiSince=29)]
public Android.Graphics.HardwareRenderer.FrameRenderRequest SetWaitForPresent(bool shouldWait);
[<Android.Runtime.Register("setWaitForPresent", "(Z)Landroid/graphics/HardwareRenderer$FrameRenderRequest;", "", ApiSince=29)>]
member this.SetWaitForPresent : bool -> Android.Graphics.HardwareRenderer.FrameRenderRequest

Parameters

shouldWait
Boolean

If true the next call to syncAndDraw() will block until completion.

Returns

this instance. This value cannot be null.

Attributes

Remarks

Sets whether or not syncAndDraw() should block until the frame has been presented. If this is true and syncAndDraw() does not return HardwareRenderer.SYNC_FRAME_DROPPED or an error then when syncAndDraw() has returned the frame has been submitted to the Surface. The default and typically recommended value is false, as blocking for present will prevent pipelining from happening, reducing overall throughput. This is useful for situations such as SurfaceHolder.Callback2.surfaceRedrawNeeded(SurfaceHolder) where it is desired to block until a frame has been presented to ensure first-frame consistency with other Surfaces.

Android reference for android.graphics.HardwareRenderer.FrameRenderRequest.setWaitForPresent.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to