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

pack-priv final Class SWResourceFactory

extends BaseResourceFactory
Class Inheritance
Imports
com.sun.glass.ui.Screen, com.sun.prism.Image, .MediaFrame, .Mesh, .MeshView, .PhongMaterial, .PixelFormat, .Presentable, .PresentableState, .RTTexture, .Texture, .Texture.Usage, .Texture.WrapMode, com.sun.prism.impl.BaseResourceFactory, .PrismSettings, .TextureResourcePool, com.sun.prism.impl.shape.BasicRoundRectRep, .BasicShapeRep, com.sun.prism.shape.ShapeRep, java.util.Map, .WeakHashMap

Field Summary

Modifier and TypeField and Description
private static final Map<Image, Texture>
private final SWContext
private static final Map<Image, Texture>
private static final ShapeRep
private static final Map<Image, Texture>
private Screen
private static final ShapeRep

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected boolean
public ShapeRep
public ShapeRep
public Mesh
public MeshView
public ShapeRep
public PhongMaterial
public Presentable
public ShapeRep
public RTTexture
createRTTexture(int width, int height, Texture.WrapMode wrapMode, boolean msaa)

Implements com.sun.prism.ResourceFactory.createRTTexture.

public RTTexture
public Texture
createTexture(MediaFrame vdb)

Implements com.sun.prism.ResourceFactory.createTexture.

Returns a new Texture that can contain the video image as specified in the provided MediaFrame.

public Texture
createTexture(PixelFormat formatHint, Texture.Usage usageHint, Texture.WrapMode wrapMode, int w, int h)

Implements com.sun.prism.ResourceFactory.createTexture.

Returns a new Texture with the given format and edge wrapping support.

public Texture
createTexture(PixelFormat formatHint, Texture.Usage usageHint, Texture.WrapMode wrapMode, int w, int h, boolean useMipmap)

Implements com.sun.prism.ResourceFactory.createTexture.

Returns a new Texture with the given format and edge wrapping support.

public void
pack-priv SWContext
public int
getMaximumTextureSize()

Implements com.sun.prism.ResourceFactory.getMaximumTextureSize.

Returns the maximum supported texture dimension for this device.

public int
public int
public Screen
public TextureResourcePool<T>
public boolean
isCompatibleTexture(Texture tex)

Implements com.sun.prism.ResourceFactory.isCompatibleTexture.

A Texture may have been obtained from a different resource factory.

public boolean
isFormatSupported(PixelFormat format)

Implements com.sun.prism.ResourceFactory.isFormatSupported.

Returns true if the given PixelFormat is supported; otherwise returns false.

Inherited from com.sun.prism.impl.BaseResourceFactory:
addFactoryListenercanClampToEdgecanRepeatcheckDisposedclearTextureCacheclearTextureCachecreateFloatTexturecreateMaskTexturecreateTexturecreateTexturegetCachedTexturegetCachedTexturegetFactoryListenersgetGlyphTexturegetRegionTextureisDeviceReadyisDisposedisSuperShaderAllowedisWrapModeSupportednotifyResetremoveFactoryListenersetGlyphTexturesetRegionTexture

Field Detail

clampTexCacheback to summary
private static final Map<Image, Texture> clampTexCache

Hides com.sun.prism.impl.BaseResourceFactory.clampTexCache.

contextback to summary
private final SWContext context
mipmapTexCacheback to summary
private static final Map<Image, Texture> mipmapTexCache

Hides com.sun.prism.impl.BaseResourceFactory.mipmapTexCache.

rectRepback to summary
private static final ShapeRep rectRep
repeatTexCacheback to summary
private static final Map<Image, Texture> repeatTexCache

Hides com.sun.prism.impl.BaseResourceFactory.repeatTexCache.

screenback to summary
private Screen screen
theRepback to summary
private static final ShapeRep theRep

Constructor Detail

SWResourceFactoryback to summary
public SWResourceFactory(Screen screen)

Method Detail

canClampToZeroback to summary
protected boolean canClampToZero()

Overrides com.sun.prism.impl.BaseResourceFactory.canClampToZero.

Annotations
@Override
createArcRepback to summary
public ShapeRep createArcRep()

Implements com.sun.prism.ResourceFactory.createArcRep.

Annotations
@Override
createEllipseRepback to summary
public ShapeRep createEllipseRep()

Implements com.sun.prism.ResourceFactory.createEllipseRep.

Annotations
@Override
createMeshback to summary
public Mesh createMesh()

Implements com.sun.prism.ResourceFactory.createMesh.

Annotations
@Override
createMeshViewback to summary
public MeshView createMeshView(Mesh mesh)

Implements com.sun.prism.ResourceFactory.createMeshView.

Annotations
@Override
createPathRepback to summary
public ShapeRep createPathRep()

Implements com.sun.prism.ResourceFactory.createPathRep.

Annotations
@Override
createPhongMaterialback to summary
public PhongMaterial createPhongMaterial()

Implements com.sun.prism.ResourceFactory.createPhongMaterial.

Annotations
@Override
createPresentableback to summary
public Presentable createPresentable(PresentableState pState)

Implements com.sun.prism.ResourceFactory.createPresentable.

Annotations
@Override
createRoundRectRepback to summary
public ShapeRep createRoundRectRep()

Implements com.sun.prism.ResourceFactory.createRoundRectRep.

Annotations
@Override
createRTTextureback to summary
public RTTexture createRTTexture(int width, int height, Texture.WrapMode wrapMode, boolean msaa)

Implements com.sun.prism.ResourceFactory.createRTTexture.

Annotations
@Override
createRTTextureback to summary
public RTTexture createRTTexture(int width, int height, Texture.WrapMode wrapMode)

Implements com.sun.prism.ResourceFactory.createRTTexture.

Annotations
@Override
createTextureback to summary
public Texture createTexture(MediaFrame vdb)

Implements com.sun.prism.ResourceFactory.createTexture.

Doc from com.sun.prism.ResourceFactory.createTexture.

Returns a new Texture that can contain the video image as specified in the provided MediaFrame. Note that padding is almost implicit since this method has to accommodate the line strides of each plane. Also due to renderer limitations, some format conversion may be necessary so the texture format may end up being different from the video image format.

Annotations
@Override
createTextureback to summary
public Texture createTexture(PixelFormat formatHint, Texture.Usage usageHint, Texture.WrapMode wrapMode, int w, int h)

Implements com.sun.prism.ResourceFactory.createTexture.

Doc from com.sun.prism.ResourceFactory.createTexture.

Returns a new Texture with the given format and edge wrapping support. Note that the dimensions of the returned texture may be larger than those requested and the wrap mode may be a simulated version of the type requested.

Annotations
@Override
createTextureback to summary
public Texture createTexture(PixelFormat formatHint, Texture.Usage usageHint, Texture.WrapMode wrapMode, int w, int h, boolean useMipmap)

Implements com.sun.prism.ResourceFactory.createTexture.

Doc from com.sun.prism.ResourceFactory.createTexture.

Returns a new Texture with the given format and edge wrapping support. Note that the dimensions of the returned texture may be larger than those requested and the wrap mode may be a simulated version of the type requested.

Annotations
@Override
disposeback to summary
public void dispose()

Overrides com.sun.prism.impl.BaseResourceFactory.dispose.

Implements com.sun.prism.GraphicsResource.dispose.

Annotations
@Override
getContextback to summary
pack-priv SWContext getContext()
getMaximumTextureSizeback to summary
public int getMaximumTextureSize()

Implements com.sun.prism.ResourceFactory.getMaximumTextureSize.

Doc from com.sun.prism.ResourceFactory.getMaximumTextureSize.

Returns the maximum supported texture dimension for this device. For example, if this method returns 2048, it means that textures larger than 2048x2048 cannot be created.

Annotations
@Override
getRTTHeightback to summary
public int getRTTHeight(int h, Texture.WrapMode wrapMode)

Implements com.sun.prism.ResourceFactory.getRTTHeight.

Annotations
@Override
getRTTWidthback to summary
public int getRTTWidth(int w, Texture.WrapMode wrapMode)

Implements com.sun.prism.ResourceFactory.getRTTWidth.

Annotations
@Override
getScreenback to summary
public Screen getScreen()
getTextureResourcePoolback to summary
public TextureResourcePool<T> getTextureResourcePool()

Implements com.sun.prism.ResourceFactory.getTextureResourcePool.

Annotations
@Override
isCompatibleTextureback to summary
public boolean isCompatibleTexture(Texture tex)

Implements com.sun.prism.ResourceFactory.isCompatibleTexture.

Doc from com.sun.prism.ResourceFactory.isCompatibleTexture.

A Texture may have been obtained from a different resource factory.

Annotations
@Override
isFormatSupportedback to summary
public boolean isFormatSupported(PixelFormat format)

Implements com.sun.prism.ResourceFactory.isFormatSupported.

Doc from com.sun.prism.ResourceFactory.isFormatSupported.

Returns true if the given PixelFormat is supported; otherwise returns false.

Note that the following formats are guaranteed to be supported across all devices:


    BYTE_RGB
    BYTE_RGBA_PRE
    BYTE_GRAY
    BYTE_ALPHA

Support for the other formats depends on the capabilities of the device. Be sure to call this method before attempting to create a Texture with a non-standard format and plan to have an alternate codepath if the given format is not supported.

Annotations
@Override