class DummyTexture extends BaseTexture
Modifier and Type | Class and Description |
---|---|
(package private) static class |
DummyTexture.DummyManagedResource |
Texture.Usage, Texture.WrapMode
Modifier and Type | Field and Description |
---|---|
(package private) DummyContext |
context |
contentHeight, contentWidth, resource
Constructor and Description |
---|
DummyTexture(DummyContext context,
PixelFormat format,
Texture.WrapMode wrapMode,
int contentWidth,
int contentHeight) |
DummyTexture(DummyContext context,
PixelFormat format,
Texture.WrapMode wrapMode,
int contentWidth,
int contentHeight,
boolean isRTT) |
Modifier and Type | Method and Description |
---|---|
protected Texture |
createSharedTexture(Texture.WrapMode newMode)
Create a new version of this texture which shares the same
ManagedResource reference. |
DummyContext |
getContext() |
void |
update(java.nio.Buffer buffer,
PixelFormat format,
int dstx,
int dsty,
int srcx,
int srcy,
int srcw,
int srch,
int srcscan,
boolean skipFlush)
Updates this texture using the contents of the given
Buffer . |
void |
update(MediaFrame frame,
boolean skipFlush)
Updates this texture using the contents of the provided
MediaFrame . |
assertLocked, checkUpdateParams, contentsNotUseful, contentsUseful, dispose, getContentHeight, getContentWidth, getContentX, getContentY, getLastImageSerial, getLinearFiltering, getLockCount, getMaxContentHeight, getMaxContentWidth, getPhysicalHeight, getPhysicalWidth, getPixelFormat, getSharedTexture, getUseMipmap, getWrapMode, isLocked, isSurfaceLost, lock, makePermanent, setContentHeight, setContentWidth, setLastImageSerial, setLinearFiltering, toString, unlock, update, update, update, update
DummyContext context
DummyTexture(DummyContext context, PixelFormat format, Texture.WrapMode wrapMode, int contentWidth, int contentHeight)
DummyTexture(DummyContext context, PixelFormat format, Texture.WrapMode wrapMode, int contentWidth, int contentHeight, boolean isRTT)
public DummyContext getContext()
public void update(java.nio.Buffer buffer, PixelFormat format, int dstx, int dsty, int srcx, int srcy, int srcw, int srch, int srcscan, boolean skipFlush)
Texture
Buffer
.
The upper-left corner of the image data will be positioned
at (contentX+dstx, contentY+dsty) of the texture, and the source
region to be uploaded will be srcw
by srch
pixels.
This method will cause the vertex buffer to be flushed unless
skipFlush
is true.format
- the format of the data contained in the pixel bufferdstx
- the x-offset of the image data, in pixels, relative to the
contentX of this texturedsty
- the y-offset of the image data, in pixels, relative to the
contentY of this texturesrcx
- the x-offset into the source buffer, in pixelssrcy
- the y-offset into the source buffer, in pixelssrcw
- the width of the pixel region from the source buffersrch
- the height of the pixel region from the source buffersrcscan
- the scanline stride of the source buffer, in bytesskipFlush
- if true, the vertex buffer will not be flushedpublic void update(MediaFrame frame, boolean skipFlush)
Texture
MediaFrame
. The source and destination coordinates are implicit,
you can only update the entire video texture.frame
- the source video buffer to update the texture data fromskipFlush
- if true, the vertex buffer will not be flushedprotected Texture createSharedTexture(Texture.WrapMode newMode)
BaseTexture
ManagedResource
reference.
The lock counts for the shared resource reference are not
changed in the processing of this method.createSharedTexture
in class BaseTexture
newMode
- the WrapMode
to use for the new texture.Texture
object sharing the underlying resource.