| 构造器 | 说明 |
|---|---|
PixelMapHolder(PixelMap pixelMap) |
Creates a object based on a
PixelMap source. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
PixelMap |
getPixelMap() |
Obtains the
PixelMap object in a container. |
void |
release() |
Clears the
PixelMap object in PixelMapHolder when no image needs to be rendered, and releases
the backend rendering data in the container. |
void |
resetPixelMap(PixelMap pixelMap) |
Resets the
PixelMap object stored in a container. |
void |
uploadTexture() |
Upload the image texture to the GPU in advance to speed up image display.
|
public void uploadTexture()
Image.setPixelMapHolder(PixelMapHolder)public PixelMap getPixelMap()
PixelMap object in a container.PixelMap object stored in the container.public void resetPixelMap(PixelMap pixelMap)
PixelMap object stored in a container.
The PixelMapHolder updates the backend rendering data when the PixelMap object stored in
it is reset.
pixelMap - Indicates the decoded image data.public void release()
PixelMap object in PixelMapHolder when no image needs to be rendered, and releases
the backend rendering data in the container.
resetPixelMap(ohos.media.image.PixelMap) must be called to use the same PixelMapHolder again.