SurfaceControl
class SurfaceControl : Parcelable
Handle to an on-screen Surface managed by the system compositor. The SurfaceControl is a combination of a buffer source, and metadata about how to display the buffers. By constructing a Surface from this SurfaceControl you can submit buffers to be composited. Using SurfaceControl.Transaction you can manipulate various properties of how the buffer will be displayed on-screen. SurfaceControl's are arranged into a scene-graph like hierarchy, and as such any SurfaceControl may have a parent. Geometric properties like transform, crop, and Z-ordering will be inherited from the parent, as if the child were content in the parents buffer stream.
Summary
Nested classes
|
|
Builder class for SurfaceControl objects.
|
|
An atomic set of changes to a set of SurfaceControl.
|
Inherited constants
|
From class Parcelable
Int |
CONTENTS_FILE_DESCRIPTOR
Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor.
|
Int |
PARCELABLE_WRITE_RETURN_VALUE
Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point.
|
|
Public methods
|
| Int |
|
| Boolean |
Check whether this instance points to a valid layer with the system-compositor.
|
| Unit |
|
| Unit |
Release the local reference to the server-side surface.
|
| String |
|
| Unit |
|
Public methods
describeContents
fun describeContents(): Int
isValid
fun isValid(): Boolean
Check whether this instance points to a valid layer with the system-compositor. For example this may be false if construction failed, or the layer was released (release).
| Return |
Boolean |
Whether this SurfaceControl is valid. |
readFromParcel
fun readFromParcel(in: Parcel!): Unit
release
fun release(): Unit
Release the local reference to the server-side surface. The surface may continue to exist on-screen as long as its parent continues to exist. To explicitly remove a surface from the screen use Transaction#reparent with a null-parent. After release, isValid will return false and other methods will throw an exception. Always call release() when you're done with a SurfaceControl.
toString
fun toString(): String
| Return |
String |
a string representation of the object. |
writeToParcel
fun writeToParcel(
dest: Parcel!,
flags: Int
): Unit
Properties