Top Fields Constructors Methods
com.sun.prism.impl

public abstract Class BaseContext

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.prism.impl.ps.BaseShaderContext
Imports
java.nio.ByteBuffer, java.util.HashMap, .Iterator, .Map, com.sun.glass.ui.Screen, com.sun.javafx.font.FontResource, .FontStrike, com.sun.javafx.geom.RectBounds, com.sun.javafx.geom.transform.BaseTransform, .GeneralTransform3D, com.sun.javafx.image.ByteToBytePixelConverter, com.sun.javafx.image.impl.ByteGray, com.sun.javafx.sg.prism.NGCamera, com.sun.prism.PixelFormat, .RTTexture, .RenderTarget, .ResourceFactory, .Texture, .Texture.WrapMode, com.sun.prism.impl.paint.PaintUtil, com.sun.prism.impl.shape.MaskData, com.sun.prism.paint.Gradient

Field Summary

Modifier and TypeField and Description
private ByteBuffer
private int
private int
private boolean
private final ResourceFactory
private final Map<FontStrike, GlyphCache>
private int
private final Map<FontStrike, GlyphCache>
private ByteBuffer
private Texture
private static final int
private int
private Texture
private ByteBuffer
private int[]
private Texture
private final GeneralTransform3D
private Texture
private int
private final Screen
private final VertexBuffer
private Texture

Constructor Summary

AccessConstructor and Description
protected
BaseContext(Screen screen, ResourceFactory factory, int vbQuads)

Method Summary

Modifier and TypeMethod and Description
protected boolean
private void
public void
private void
public void
dispose()

Dispose of this context.

public void
drawQuads(float[] coordArray, byte[] colorArray, int numVertices)

protected final void
public void
public Screen
public GlyphCache
private GlyphCache
public Texture
getGradientTexture(Gradient grad, BaseTransform xform, int paintW, int paintH, MaskData maskData, float bx, float by, float bw, float bh)

public abstract RTTexture
public Texture
protected GeneralTransform3D
public Texture
public int
public ResourceFactory
public VertexBuffer
public Texture
public final boolean

Returns:

true if this context has been disposed.
isDisposed
()

Returns a flag indicating whether this context has been disposed.

public boolean
protected void
protected abstract void
renderQuads(float[] coordArray, byte[] colorArray, int numVertices)

protected void
protected void
protected void
public void
setRenderTarget(BaseGraphics g)

This method will call releaseRenderTarget method to reset last renderTarget and textures if g is null

protected abstract void
setRenderTarget(RenderTarget target, NGCamera camera, boolean depthTest, boolean state3D)

public void
updateMaskTexture(MaskData maskData, RectBounds maskBounds, boolean canScale)

public abstract void
public Texture
validateMaskTexture(MaskData maskData, boolean canScale)

public abstract void
validatePaintOp(BaseGraphics g, BaseTransform xform, Texture maskTex, float bx, float by, float bw, float bh)

public abstract void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clearBufferback to summary
private ByteBuffer clearBuffer
curMaskColback to summary
private int curMaskCol
curMaskRowback to summary
private int curMaskRow
disposedback to summary
private boolean disposed
factoryback to summary
private final ResourceFactory factory
greyGlyphCachesback to summary
private final Map<FontStrike, GlyphCache> greyGlyphCaches
highMaskColback to summary
private int highMaskCol
lcdGlyphCachesback to summary
private final Map<FontStrike, GlyphCache> lcdGlyphCaches
maskBufferback to summary
private ByteBuffer maskBuffer
maskTexback to summary
private Texture maskTex
MIN_MASK_DIMback to summary
private static final int MIN_MASK_DIM
nextMaskRowback to summary
private int nextMaskRow
ovalTexback to summary
private Texture ovalTex
paintBufferback to summary
private ByteBuffer paintBuffer
paintPixelsback to summary
private int[] paintPixels
paintTexback to summary
private Texture paintTex
perspectiveTransformback to summary
private final GeneralTransform3D perspectiveTransform
rectTexback to summary
private Texture rectTex
rectTexMaxback to summary
private int rectTexMax
screenback to summary
private final Screen screen
vertexBufferback to summary
private final VertexBuffer vertexBuffer
wrapRectTexback to summary
private Texture wrapRectTex

Constructor Detail

BaseContextback to summary
protected BaseContext(Screen screen, ResourceFactory factory, int vbQuads)

Method Detail

checkDisposedback to summary
protected boolean checkDisposed()
clearCachesback to summary
private void clearCaches(Map<FontStrike, GlyphCache> glyphCaches)
clearGlyphCachesback to summary
public void clearGlyphCaches()
createRectTextureback to summary
private void createRectTexture()
disposeback to summary
public void dispose()

Dispose of this context. Subclass implementations can override this if needed. They must call super.dispose().

drawQuadsback to summary
public void drawQuads(float[] coordArray, byte[] colorArray, int numVertices)
flushMaskback to summary
protected final void flushMask()
flushVertexBufferback to summary
public void flushVertexBuffer()
getAssociatedScreenback to summary
public Screen getAssociatedScreen()
getGlyphCacheback to summary
public GlyphCache getGlyphCache(FontStrike strike)
getGlyphCacheback to summary
private GlyphCache getGlyphCache(FontStrike strike, Map<FontStrike, GlyphCache> glyphCaches)
getGradientTextureback to summary
public Texture getGradientTexture(Gradient grad, BaseTransform xform, int paintW, int paintH, MaskData maskData, float bx, float by, float bw, float bh)
getLCDBufferback to summary
public abstract RTTexture getLCDBuffer()
getOvalTextureback to summary
public Texture getOvalTexture()
getPerspectiveTransformNoCloneback to summary
protected GeneralTransform3D getPerspectiveTransformNoClone()
getRectTextureback to summary
public Texture getRectTexture()
getRectTextureMaxSizeback to summary
public int getRectTextureMaxSize()
getResourceFactoryback to summary
public ResourceFactory getResourceFactory()
getVertexBufferback to summary
public VertexBuffer getVertexBuffer()
getWrapRectTextureback to summary
public Texture getWrapRectTexture()
isDisposedback to summary
public final boolean isDisposed()

Returns a flag indicating whether this context has been disposed. A graphics context is disposed by the associated ResourceFactory when it is disposed. If a context has been disposed, it must be recreated, by a new ResourceFactory. All draw calls will be ignored. An attempt to create a resource will be ignored and will return null.

Returns:boolean

true if this context has been disposed.

isSuperShaderEnabledback to summary
public boolean isSuperShaderEnabled()
releaseRenderTargetback to summary
protected void releaseRenderTarget()
renderQuadsback to summary
protected abstract void renderQuads(float[] coordArray, byte[] colorArray, int numVertices)
setDeviceParametersFor2Dback to summary
protected void setDeviceParametersFor2D()
setDeviceParametersFor3Dback to summary
protected void setDeviceParametersFor3D()
setPerspectiveTransformback to summary
protected void setPerspectiveTransform(GeneralTransform3D transform)
setRenderTargetback to summary
public void setRenderTarget(BaseGraphics g)

This method will call releaseRenderTarget method to reset last renderTarget and textures if g is null

setRenderTargetback to summary
protected abstract void setRenderTarget(RenderTarget target, NGCamera camera, boolean depthTest, boolean state3D)
updateMaskTextureback to summary
public void updateMaskTexture(MaskData maskData, RectBounds maskBounds, boolean canScale)
validateClearOpback to summary
public abstract void validateClearOp(BaseGraphics g)
validateMaskTextureback to summary
public Texture validateMaskTexture(MaskData maskData, boolean canScale)
validatePaintOpback to summary
public abstract void validatePaintOp(BaseGraphics g, BaseTransform xform, Texture maskTex, float bx, float by, float bw, float bh)
validateTextureOpback to summary
public abstract void validateTextureOp(BaseGraphics g, BaseTransform xform, Texture src, PixelFormat format)