public class SWMaskTexture extends SWTexture
Texture.Usage, Texture.WrapMode
Modifier and Type | Field and Description |
---|---|
private byte[] |
data |
allocated, contentHeight, contentWidth, employcount, permanent, physicalHeight, physicalWidth
Constructor and Description |
---|
SWMaskTexture(SWMaskTexture sharedTex,
Texture.WrapMode altMode) |
SWMaskTexture(SWResourceFactory factory,
Texture.WrapMode wrapMode,
int w,
int h) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
allocateBuffer() |
(package private) void |
checkAllocation(int srcw,
int srch) |
(package private) Texture |
createSharedLockedTexture(Texture.WrapMode altMode)
Returns a new
Texture object sharing all of the information
from this texture, but using the new WrapMode . |
(package private) byte[] |
getDataNoClone() |
PixelFormat |
getPixelFormat()
Returns the
PixelFormat of this texture. |
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 . |
allocate, assertLocked, contentsNotUseful, contentsUseful, create, dispose, getContentHeight, getContentWidth, getContentX, getContentY, getLastImageSerial, getLinearFiltering, getLockCount, getMaxContentHeight, getMaxContentWidth, getOffset, getPhysicalHeight, getPhysicalWidth, getResourceFactory, getSharedTexture, getUseMipmap, getWrapMode, isLocked, isSurfaceLost, lock, makePermanent, setContentHeight, setContentWidth, setLastImageSerial, setLinearFiltering, unlock, update, update, update, update
SWMaskTexture(SWResourceFactory factory, Texture.WrapMode wrapMode, int w, int h)
SWMaskTexture(SWMaskTexture sharedTex, Texture.WrapMode altMode)
byte[] getDataNoClone()
public PixelFormat getPixelFormat()
Texture
PixelFormat
of this texture.PixelFormat
of this texturepublic 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 flushedvoid checkAllocation(int srcw, int srch)
void allocateBuffer()
allocateBuffer
in class SWTexture
Texture createSharedLockedTexture(Texture.WrapMode altMode)
SWTexture
Texture
object sharing all of the information
from this texture, but using the new WrapMode
.
The new texture will be locked (in contrast to the similarly-named
method in BaseTexture).createSharedLockedTexture
in class SWTexture
altMode
- the new WrapMode
for the new textureWrapMode