語言

SurfaceSyncGroup.Add 方法

定義

多載

名稱 Description
Add(IAttachedSurfaceControl, IRunnable)

在 SurfaceSyncGroup 中新增一個 attacedSurfaceControl。

Add(SurfaceControlViewHost+SurfacePackage, IRunnable)

在此同步群組中新增一個 Surface 套件。

Add(IAttachedSurfaceControl, IRunnable)

在 SurfaceSyncGroup 中新增一個 attacedSurfaceControl。

[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

參數

attachedSurfaceControl
IAttachedSurfaceControl

將加入此 SurfaceSyncGroup 的 AttachedSurfaceControl。

runnable
IRunnable

這會在呼叫時執行的同一個執行緒上執行,但在渲染暫停後,且在繼續渲染下一幀之前執行。 此方法在可執行執行完成前不會回傳。 這可以用來修改 AttachedSurfaceControl,確保這些變更包含在同步中。

傳回

若 AttachedSurfaceControl 成功加入 SurfaceSyncGroup,則為 true;否則為 false。

屬性

備註

在 SurfaceSyncGroup 中新增一個 attacedSurfaceControl。 AttachedSurfaceControl 會暫停渲染,以確保可執行檔案能被呼叫,且同步會偵測包含變更的幀。

的 android.window.SurfaceSyncGroup.add(android.view.AttachedSurfaceControl, java.lang.Runnable)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於

Add(SurfaceControlViewHost+SurfacePackage, IRunnable)

在此同步群組中新增一個 Surface 套件。

[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

參數

surfacePackage
SurfaceControlViewHost.SurfacePackage

Surface 套件加入這個同步群組。

runnable
IRunnable

一個可選操作會在渲染後同步執行於呼叫執行緒上,暫停且在下一幀渲染前執行。 此方法會阻塞直到操作完成,並允許其對託管表面的變更納入同步。

傳回

true如果加上了地面套件;否則,。 false

屬性

備註

渲染會暫停,以執行可選操作,使其變更能納入同步幀中。

適用於