Sequenceablepublic class Surface extends Object implements Sequenceable
| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
Surface.PixelFormat |
Enumerates the pixel format of raw image data.
|
Sequenceable.Producer<T>| 构造器 | 说明 |
|---|---|
Surface() |
Default constructor used to create a
Surface instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
Canvas |
acquireCanvas() |
Obtains a
Canvas instance for drawing. |
boolean |
bindToTextureHolder(TextureHolder textureHolder) |
Bind a
Surface instance to a TextureHolder. |
boolean |
marshalling(Parcel out) |
Marshals this
Sequenceable object into a Parcel. |
boolean |
showRawImage(byte[] rawImageData,
Surface.PixelFormat format,
int width,
int height) |
Displays an image based on its raw data in a specified format and size.
|
void |
syncCanvasDrawCalls() |
Synchronizes the draw calls on the
Canvas object for rendering. |
boolean |
unmarshalling(Parcel in) |
Unmarshals this
Sequenceable object from a Parcel. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasFileDescriptorpublic Canvas acquireCanvas()
Canvas instance for drawing.Canvas instance.public void syncCanvasDrawCalls()
Canvas object for rendering.public boolean bindToTextureHolder(TextureHolder textureHolder)
Surface instance to a TextureHolder.textureHolder - Indicates the TextureHolder of this surface to bind.true if the surface is successfully bound to textureholder;
returns false otherwise.public boolean marshalling(Parcel out)
SequenceableSequenceable object into a Parcel.marshalling 在接口中 Sequenceableout - Indicates the Parcel object to which the Sequenceable
object will be marshaled..true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel in)
SequenceableSequenceable object from a Parcel.unmarshalling 在接口中 Sequenceablein - Indicates the Parcel object into which the Sequenceable
object has been marshaled.true if the unmarshalling is successful; returns false otherwise.public boolean showRawImage(byte[] rawImageData,
Surface.PixelFormat format,
int width,
int height)
rawImageData - Indicates the array of the raw image data. The length is determined by
the image PixelFormat, width, and height.format - Indicates the raw data PixelFormat of the image to display.width - Indicates the width of the image to display.height - Indicates the height of the image to display.true if the image is successfully displayed; returns false otherwise.