Język

SurfaceSyncGroup.Add Method

Definition

Overloads

Name Description
Add(IAttachedSurfaceControl, IRunnable)

Add an AttachedSurfaceControl to the SurfaceSyncGroup.

Add(SurfaceControlViewHost+SurfacePackage, IRunnable)

Adds a surface package to this synchronization group.

Add(IAttachedSurfaceControl, IRunnable)

Add an AttachedSurfaceControl to the SurfaceSyncGroup.

[Android.Runtime.Register("add", "(Landroid/view/AttachedSurfaceControl;Ljava/lang/Runnable;)Z", "", ApiSince=34)]
public bool Add(Android.Views.IAttachedSurfaceControl? attachedSurfaceControl, Java.Lang.IRunnable? runnable);
[<Android.Runtime.Register("add", "(Landroid/view/AttachedSurfaceControl;Ljava/lang/Runnable;)Z", "", ApiSince=34)>]
member this.Add : Android.Views.IAttachedSurfaceControl * Java.Lang.IRunnable -> bool

Parameters

attachedSurfaceControl
IAttachedSurfaceControl

The AttachedSurfaceControl that will be add to this SurfaceSyncGroup.

runnable
IRunnable

This is run on the same thread that the call was made on, but after the rendering is paused and before continuing to render the next frame. This method will not return until the execution of the runnable completes. This can be used to make changes to the AttachedSurfaceControl, ensuring that the changes are included in the sync.

Returns

true if the AttachedSurfaceControl was successfully added to the SurfaceSyncGroup, false otherwise.

Attributes

Remarks

Add an AttachedSurfaceControl to the SurfaceSyncGroup. The AttachedSurfaceControl will pause rendering to ensure the runnable can be invoked and that the sync picks up the frame that contains the changes.

Java documentation for android.window.SurfaceSyncGroup.add(android.view.AttachedSurfaceControl, java.lang.Runnable).

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

Add(SurfaceControlViewHost+SurfacePackage, IRunnable)

Adds a surface package to this synchronization group.

[Android.Runtime.Register("add", "(Landroid/view/SurfaceControlViewHost$SurfacePackage;Ljava/lang/Runnable;)Z", "", ApiSince=34)]
public bool Add(Android.Views.SurfaceControlViewHost.SurfacePackage surfacePackage, Java.Lang.IRunnable? runnable);
[<Android.Runtime.Register("add", "(Landroid/view/SurfaceControlViewHost$SurfacePackage;Ljava/lang/Runnable;)Z", "", ApiSince=34)>]
member this.Add : Android.Views.SurfaceControlViewHost.SurfacePackage * Java.Lang.IRunnable -> bool

Parameters

surfacePackage
SurfaceControlViewHost.SurfacePackage

The surface package to add to this synchronization group.

runnable
IRunnable

An optional operation that runs synchronously on the calling thread after rendering is paused and before the next frame is rendered. This method blocks until the operation completes, allowing its changes to the hosted surface to be included in the sync.

Returns

true if the surface package was added; otherwise, false.

Attributes

Remarks

Rendering is paused while the optional operation executes so its changes can be included in the synchronized frame.

Applies to