Top Fields Constructors Methods
com.sun.prism.es2

public Class ES2ResourceFactory

extends BaseShaderFactory
Class Inheritance
Imports
java.io.InputStream, java.util.Map, .HashMap, .WeakHashMap, com.sun.glass.ui.Screen, com.sun.javafx.PlatformUtil, com.sun.prism.Image, .MediaFrame, .Mesh, .MeshView, .PhongMaterial, .PixelFormat, .Presentable, .PresentableState, .RTTexture, .Texture, .Texture.Usage, .Texture.WrapMode, com.sun.prism.impl.PrismSettings, .TextureResourcePool, com.sun.prism.impl.ps.BaseShaderFactory, com.sun.prism.ps.Shader, .ShaderFactory, java.lang.reflect.Method

Field Summary

Modifier and TypeField and Description
private static final Map<Image, Texture>
private ES2Context
private final int
private static final Map<Image, Texture>
private static final Map<Image, Texture>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

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

Implements com.sun.prism.ResourceFactory.createRTTexture.

public Shader
createShader(String pixelShaderName, InputStream pixelShaderCode, Map<String, Integer> samplers, Map<String, Integer> params, int maxTexCoordIndex, boolean isPixcoordUsed, boolean isPerVertexColorUsed)

Implements com.sun.prism.ps.ShaderFactory.createShader.

public Shader
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 Texture
createTexture(MediaFrame frame)

Implements com.sun.prism.ResourceFactory.createTexture.

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

private static String
createVertexShaderCode(boolean includePerVertexColor, int maxTexCoordIndex)

public void
public int
getMaximumTextureSize()

Implements com.sun.prism.ResourceFactory.getMaximumTextureSize.

Returns the maximum supported texture dimension for this device.

public int
public int
public TextureResourcePool<T>
private Map<String, Integer>
getVertexAttributes(boolean includePerVertexColor, int maxTexCoordIndex)

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.ps.BaseShaderFactory:
createArcRepcreateEllipseRepcreatePathRepcreateRoundRectRep

Field Detail

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

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

contextback to summary
private ES2Context context
maxTextureSizeback to summary
private final int maxTextureSize
mipmapTexCacheback to summary
private static final Map<Image, Texture> mipmapTexCache

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

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

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

Constructor Detail

ES2ResourceFactoryback to summary
pack-priv ES2ResourceFactory(Screen screen)

Method Detail

canClampToEdgeback to summary
protected boolean canClampToEdge()

Overrides com.sun.prism.impl.BaseResourceFactory.canClampToEdge.

Annotations
@Override
canClampToZeroback to summary
protected boolean canClampToZero()

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

Annotations
@Override
canRepeatback to summary
protected boolean canRepeat()

Overrides com.sun.prism.impl.BaseResourceFactory.canRepeat.

Annotations
@Override
computeMaxTextureSizeback to summary
private int computeMaxTextureSize()
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
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
createRTTextureback to summary
public RTTexture createRTTexture(int width, int height, Texture.WrapMode wrapMode)

Implements com.sun.prism.ResourceFactory.createRTTexture.

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
createShaderback to summary
public Shader createShader(String pixelShaderName, InputStream pixelShaderCode, Map<String, Integer> samplers, Map<String, Integer> params, int maxTexCoordIndex, boolean isPixcoordUsed, boolean isPerVertexColorUsed)

Implements com.sun.prism.ps.ShaderFactory.createShader.

Annotations
@Override
createStockShaderback to summary
public Shader createStockShader(String name)

Implements com.sun.prism.ps.ShaderFactory.createStockShader.

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
createTextureback to summary
public Texture createTexture(MediaFrame frame)

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
createVertexShaderCodeback to summary
private static String createVertexShaderCode(boolean includePerVertexColor, int maxTexCoordIndex)
disposeback to summary
public void dispose()

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

Implements com.sun.prism.GraphicsResource.dispose.

Annotations
@Override
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
getTextureResourcePoolback to summary
public TextureResourcePool<T> getTextureResourcePool()

Implements com.sun.prism.ResourceFactory.getTextureResourcePool.

Annotations
@Override
getVertexAttributesback to summary
private Map<String, Integer> getVertexAttributes(boolean includePerVertexColor, int maxTexCoordIndex)
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