SurfaceSyncGroup.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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. If it runs, it executes synchronously on the calling thread, and the method does not return until it completes. Android normally pauses rendering before the operation so its changes can be included in the synchronized frame. Rendering can resume on a synchronization timeout. The operation is not run if the surface's sync group cannot be obtained or this group is already marked ready. Other failures can occur after the operation runs.
Returns
true if the surface package was added; otherwise, false.
- Attributes
Remarks
Android normally pauses rendering so the optional operation's changes can be included in the synchronized frame. Rendering can resume if synchronization times out.