Surface Constructors
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
Surface(SurfaceTexture) |
Create Surface from a |
Surface(SurfaceControl) |
Create a Surface associated with a given |
Surface(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Surface(SurfaceTexture)
Create Surface from a SurfaceTexture
.
[Android.Runtime.Register(".ctor", "(Landroid/graphics/SurfaceTexture;)V", "")]
public Surface (Android.Graphics.SurfaceTexture? surfaceTexture);
[<Android.Runtime.Register(".ctor", "(Landroid/graphics/SurfaceTexture;)V", "")>]
new Android.Views.Surface : Android.Graphics.SurfaceTexture -> Android.Views.Surface
Parameters
- surfaceTexture
- SurfaceTexture
The SurfaceTexture
that is updated by this
Surface.
- Attributes
Remarks
Create Surface from a SurfaceTexture
.
Images drawn to the Surface will be made available to the SurfaceTexture
, which can attach them to an OpenGL ES texture via SurfaceTexture#updateTexImage
.
Please note that holding onto the Surface created here is not enough to keep the provided SurfaceTexture from being reclaimed. In that sense, the Surface will act like a java.lang.ref.WeakReference weak reference
to the SurfaceTexture.
Java documentation for android.view.Surface.Surface(android.graphics.SurfaceTexture)
.
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
Surface(SurfaceControl)
Create a Surface associated with a given SurfaceControl
.
[Android.Runtime.Register(".ctor", "(Landroid/view/SurfaceControl;)V", "", ApiSince=29)]
public Surface (Android.Views.SurfaceControl from);
[<Android.Runtime.Register(".ctor", "(Landroid/view/SurfaceControl;)V", "", ApiSince=29)>]
new Android.Views.Surface : Android.Views.SurfaceControl -> Android.Views.Surface
Parameters
- from
- SurfaceControl
The SurfaceControl to associate this Surface with
- Attributes
Remarks
Create a Surface associated with a given SurfaceControl
. Buffers submitted to this surface will be displayed by the system compositor according to the parameters specified by the control. Multiple surfaces may be constructed from one SurfaceControl, but only one can be connected (e.g. have an active EGL context) at a time.
Java documentation for android.view.Surface.Surface(android.view.SurfaceControl)
.
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
Surface(IntPtr, JniHandleOwnership)
A constructor used when creating managed representations of JNI objects; called by the runtime.
protected Surface (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Views.Surface : nativeint * Android.Runtime.JniHandleOwnership -> Android.Views.Surface
Parameters
- transfer
- JniHandleOwnership
A JniHandleOwnershipindicating how to handle javaReference
Remarks
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.