HardwareBufferRenderer.RenderRequest.Draw(IExecutor, IConsumer) Method

Definition

Syncs the RenderNode tree to the render thread and requests content to be drawn.

[Android.Runtime.Register("draw", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=34)]
public void Draw (Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer renderCallback);
[<Android.Runtime.Register("draw", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=34)>]
member this.Draw : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit

Parameters

executor
IExecutor

Executor used to deliver callbacks

renderCallback
IConsumer

Callback invoked when rendering is complete. This includes a RenderResult that provides a SyncFence that should be waited upon for completion before consuming the rendered output in the provided HardwareBuffer instance.

Attributes

Remarks

Syncs the RenderNode tree to the render thread and requests content to be drawn. This RenderRequest instance should no longer be used after calling this method. The system internally may reuse instances of RenderRequest to reduce allocation churn.

Java documentation for android.graphics.HardwareBufferRenderer.RenderRequest.draw(java.util.concurrent.Executor, java.util.function.Consumer<android.graphics.HardwareBufferRenderer.RenderResult>).

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