APIdia Launch Partner
Top Fields Constructors Methods
com.sun.prism.mtl

pack-priv Class MTLTexture<T extends MTLTextureData>

extends BaseTexture<MTLTextureResource<T extends MTLTextureData>>
Class Inheritance
Known Direct Subclasses
com.sun.prism.mtl.MTLRTTexture
Imports
com.sun.prism.MediaFrame, .PixelFormat, .Texture, com.sun.prism.impl.BaseTexture, java.nio.Buffer, .ByteBuffer, .FloatBuffer, .IntBuffer

Field Summary

Modifier and TypeField and Description
private final MTLContext
private final long
Inherited from com.sun.prism.impl.BaseTexture:
contentHeightcontentWidthresource

Constructor Summary

AccessConstructor and Description
pack-priv
MTLTexture(MTLContext context, MTLTextureResource<T> resource, PixelFormat format, Texture.WrapMode wrapMode, int physicalWidth, int physicalHeight, int contentX, int contentY, int contentWidth, int contentHeight, boolean useMipmap)

pack-priv
MTLTexture(MTLContext context, MTLTextureResource<T> resource, PixelFormat format, Texture.WrapMode wrapMode, int physicalWidth, int physicalHeight, int contentX, int contentY, int contentWidth, int contentHeight, int maxContentWidth, int maxContentHeight, boolean useMipmap)

private
MTLTexture(MTLTexture<T> sharedTex, Texture.WrapMode newMode)

Method Summary

Modifier and TypeMethod and Description
protected Texture
createSharedTexture(Texture.WrapMode newMode)

Implements abstract com.sun.prism.impl.BaseTexture.createSharedTexture.

Create a new version of this texture which shares the same ManagedResource reference.

public MTLContext
public long
private static native void
nUpdate(long pResource, ByteBuffer buf, byte[] pixels, int dstx, int dsty, int srcx, int srcy, int w, int h, int stride)

private static native void
nUpdateFloat(long pResource, FloatBuffer buf, float[] pixels, int dstx, int dsty, int srcx, int srcy, int w, int h, int stride)

private static native void
nUpdateInt(long pResource, IntBuffer buf, int[] pixels, int dstx, int dsty, int srcx, int srcy, int w, int h, int stride)

private static native void
nUpdateYUV422(long pResource, byte[] pixels, int dstx, int dsty, int srcx, int srcy, int w, int h, int stride)

public void
update(Buffer buffer, PixelFormat format, int dstx, int dsty, int srcx, int srcy, int srcw, int srch, int srcscan, boolean skipFlush)

Implements com.sun.prism.Texture.update.

Updates this texture using the contents of the given Buffer.

public void
update(MediaFrame frame, boolean skipFlush)

Implements com.sun.prism.Texture.update.

Updates this texture using the contents of the provided MediaFrame.

private void
updateTextureByte(Buffer buffer, PixelFormat format, int dstx, int dsty, int srcx, int srcy, int srcw, int srch, int srcscan)

private void
updateTextureFloat(Buffer buffer, PixelFormat format, int dstx, int dsty, int srcx, int srcy, int srcw, int srch, int srcscan)

private void
updateTextureInt(Buffer buffer, PixelFormat format, int dstx, int dsty, int srcx, int srcy, int srcw, int srch, int srcscan)

Inherited from com.sun.prism.impl.BaseTexture:
assertLockedcheckUpdateParamscontentsNotUsefulcontentsUsefuldisposegetContentHeightgetContentWidthgetContentXgetContentYgetLastImageSerialgetLinearFilteringgetLockCountgetMaxContentHeightgetMaxContentWidthgetPhysicalHeightgetPhysicalWidthgetPixelFormatgetSharedTexturegetUseMipmapgetWrapModeisLockedisSurfaceLostlockmakePermanentsetContentHeightsetContentWidthsetLastImageSerialsetLinearFilteringtoStringunlockupdateupdateupdateupdate

Field Detail

contextback to summary
private final MTLContext context
texPtrback to summary
private final long texPtr

Constructor Detail

MTLTextureback to summary
pack-priv MTLTexture(MTLContext context, MTLTextureResource<T> resource, PixelFormat format, Texture.WrapMode wrapMode, int physicalWidth, int physicalHeight, int contentX, int contentY, int contentWidth, int contentHeight, boolean useMipmap)
MTLTextureback to summary
pack-priv MTLTexture(MTLContext context, MTLTextureResource<T> resource, PixelFormat format, Texture.WrapMode wrapMode, int physicalWidth, int physicalHeight, int contentX, int contentY, int contentWidth, int contentHeight, int maxContentWidth, int maxContentHeight, boolean useMipmap)
MTLTextureback to summary
private MTLTexture(MTLTexture<T> sharedTex, Texture.WrapMode newMode)

Method Detail

createSharedTextureback to summary
protected Texture createSharedTexture(Texture.WrapMode newMode)

Implements abstract com.sun.prism.impl.BaseTexture.createSharedTexture.

Doc from com.sun.prism.impl.BaseTexture.createSharedTexture.

Create a new version of this texture which shares the same ManagedResource reference. The lock counts for the shared resource reference are not changed in the processing of this method.

Annotations
@Override
getContextback to summary
public MTLContext getContext()
getNativeHandleback to summary
public long getNativeHandle()
nUpdateback to summary
private static native void nUpdate(long pResource, ByteBuffer buf, byte[] pixels, int dstx, int dsty, int srcx, int srcy, int w, int h, int stride)
nUpdateFloatback to summary
private static native void nUpdateFloat(long pResource, FloatBuffer buf, float[] pixels, int dstx, int dsty, int srcx, int srcy, int w, int h, int stride)
nUpdateIntback to summary
private static native void nUpdateInt(long pResource, IntBuffer buf, int[] pixels, int dstx, int dsty, int srcx, int srcy, int w, int h, int stride)
nUpdateYUV422back to summary
private static native void nUpdateYUV422(long pResource, byte[] pixels, int dstx, int dsty, int srcx, int srcy, int w, int h, int stride)
updateback to summary
public void update(Buffer buffer, PixelFormat format, int dstx, int dsty, int srcx, int srcy, int srcw, int srch, int srcscan, boolean skipFlush)

Implements com.sun.prism.Texture.update.

Doc from com.sun.prism.Texture.update.

Updates this texture using the contents of the given 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.

Annotations
@Override
updateback to summary
public void update(MediaFrame frame, boolean skipFlush)

Implements com.sun.prism.Texture.update.

Doc from com.sun.prism.Texture.update.

Updates this texture using the contents of the provided MediaFrame. The source and destination coordinates are implicit, you can only update the entire video texture.

Annotations
@Override
updateTextureByteback to summary
private void updateTextureByte(Buffer buffer, PixelFormat format, int dstx, int dsty, int srcx, int srcy, int srcw, int srch, int srcscan)
updateTextureFloatback to summary
private void updateTextureFloat(Buffer buffer, PixelFormat format, int dstx, int dsty, int srcx, int srcy, int srcw, int srch, int srcscan)
updateTextureIntback to summary
private void updateTextureInt(Buffer buffer, PixelFormat format, int dstx, int dsty, int srcx, int srcy, int srcw, int srch, int srcscan)