Top Fields Constructors Methods
com.sun.scenario.effect.impl.prism.ps

public Class PPSRenderer

extends PrRenderer
Class Inheritance
Imports
java.io.InputStream, java.lang.reflect.Constructor, java.nio.FloatBuffer, java.util.Map, com.sun.glass.ui.Screen, com.sun.javafx.geom.Rectangle, com.sun.javafx.geom.transform.BaseTransform, com.sun.prism.Graphics, .GraphicsPipeline, .GraphicsPipeline.ShaderModel, .GraphicsPipeline.ShaderType, .Image, .PixelFormat, .RTTexture, .ResourceFactory, .ResourceFactoryListener, .Texture, .Texture.Usage, .Texture.WrapMode, com.sun.prism.impl.PrismSettings, com.sun.prism.ps.Shader, .ShaderFactory, com.sun.scenario.effect.Effect.AccelType, .FilterContext, .Filterable, .FloatMap, .ImageData, .LockableResource, com.sun.scenario.effect.impl.EffectPeer, .Renderer, com.sun.scenario.effect.impl.hw.ShaderSource, com.sun.scenario.effect.impl.prism.PrDrawable, .PrFilterContext, .PrImage, .PrRenderer, .PrTexture

Field Summary

Modifier and TypeField and Description
private final ResourceFactoryListener
private boolean
private ResourceFactory
private Screen
private final ShaderSource
private Renderer.RendererState

Constructor Summary

AccessConstructor and Description
private
PPSRenderer(Screen screen, ShaderSource shaderSource)

Method Summary

Modifier and TypeMethod and Description
public void
clearImage(Filterable
the image to be cleared
filterable
)

Implements abstract com.sun.scenario.effect.impl.Renderer.clearImage.

Mainly used by ImagePool for the purpose of clearing an image before handing it back to the user.

public final PPSDrawable
public PrDrawable
public LockableResource
public ImageData
createImageData(FilterContext
the filter context
fctx
,
Filterable src)

Implements abstract com.sun.scenario.effect.impl.Renderer.createImageData.

Mainly used by the Identity effect for the purpose of creating a cached ImageData from the given platform-specific image (e.g. a BufferedImage wrapped in a J2DImage).

private EffectPeer<T extends RenderState>

Returns:

a new EffectPeer instance
createIntrinsicPeer
(FilterContext
the filter context
fctx
,
String
the name of the effect peer
name
)

Creates a new EffectPeer instance that can be used by any of the Prism-based backend implementations.

protected EffectPeer<T extends RenderState>
createPeer(FilterContext
context shared with the renderer
fctx
,
String
of the peer
name
,
int
unroll count
unrollCount
)

Implements abstract com.sun.scenario.effect.impl.Renderer.createPeer.

Creates a new peer given the context, name and unroll count.

private EffectPeer<T extends RenderState>

Returns:

a new EffectPeer instance
createPlatformPeer
(FilterContext
the filter context
fctx
,
String
the name of the effect peer
name
,
int
the unroll count
unrollCount
)

Creates a new EffectPeer instance that is specific to the current shader-based backend.

public static Renderer
public Shader
createShader(String name, Map<String, Integer> samplers, Map<String, Integer> params, boolean isPixcoordUsed)

private static ShaderSource
protected void
dispose()

Disposes this renderer (flushes the associated images).

public Effect.AccelType
getAccelType()

Implements abstract com.sun.scenario.effect.impl.Renderer.getAccelType.

Returns the AccelType used by default for peers of this renderer.

protected Renderer
getBackupRenderer()

Implements abstract com.sun.scenario.effect.impl.Renderer.getBackupRenderer.

Returns an instance of backup renderer to be used if this renderer is in LOST state.

public int
public PPSDrawable
public int
public synchronized Renderer.RendererState
getRendererState()

Implements abstract com.sun.scenario.effect.impl.Renderer.getRendererState.

Warning

may be called on the rendering thread

public boolean
isImageDataCompatible(final ImageData
ImageData to be checked
id
)

Implements abstract com.sun.scenario.effect.impl.Renderer.isImageDataCompatible.

Determines whether the passed ImageData is compatible with this renderer (that is, if it can be used as a input source for this renderer's peers).

protected final synchronized void
markLost()

Marks this renderer as lost.

public Filterable
transform(FilterContext fctx, Filterable original, BaseTransform transform, Rectangle origBounds, Rectangle xformBounds)

Implements abstract com.sun.scenario.effect.impl.Renderer.transform.

public ImageData
transform(FilterContext fctx, ImageData original, BaseTransform transform, Rectangle origBounds, Rectangle xformBounds)

Implements abstract com.sun.scenario.effect.impl.Renderer.transform.

public void
private boolean
Inherited from com.sun.scenario.effect.impl.prism.PrRenderer:
isIntrinsicPeer

Field Detail

listenerback to summary
private final ResourceFactoryListener listener
needsSWDispMapback to summary
private boolean needsSWDispMap
rfback to summary
private ResourceFactory rf
screenback to summary
private Screen screen
shaderSourceback to summary
private final ShaderSource shaderSource
stateback to summary
private Renderer.RendererState state

Constructor Detail

PPSRendererback to summary
private PPSRenderer(Screen screen, ShaderSource shaderSource)

Method Detail

clearImageback to summary
public void clearImage(Filterable filterable)

Implements abstract com.sun.scenario.effect.impl.Renderer.clearImage.

Doc from com.sun.scenario.effect.impl.Renderer.clearImage.

Mainly used by ImagePool for the purpose of clearing an image before handing it back to the user.

Parameters
filterable:Filterable

the image to be cleared

Annotations
@Override
createCompatibleImageback to summary
public final PPSDrawable createCompatibleImage(int w, int h)

Implements abstract com.sun.scenario.effect.impl.Renderer.createCompatibleImage.

Annotations
@Override
createDrawableback to summary
public PrDrawable createDrawable(RTTexture rtt)

Implements abstract com.sun.scenario.effect.impl.prism.PrRenderer.createDrawable.

Annotations
@Override
createFloatTextureback to summary
public LockableResource createFloatTexture(int w, int h)

Overrides com.sun.scenario.effect.impl.Renderer.createFloatTexture.

Annotations
@Override
createImageDataback to summary
public ImageData createImageData(FilterContext fctx, Filterable src)

Implements abstract com.sun.scenario.effect.impl.Renderer.createImageData.

Doc from com.sun.scenario.effect.impl.Renderer.createImageData.

Mainly used by the Identity effect for the purpose of creating a cached ImageData from the given platform-specific image (e.g. a BufferedImage wrapped in a J2DImage).

Parameters
fctx:FilterContext

the filter context

Returns:ImageData

a new ImageData

Annotations
@Override
createIntrinsicPeerback to summary
private EffectPeer<T extends RenderState> createIntrinsicPeer(FilterContext fctx, String name)

Creates a new EffectPeer instance that can be used by any of the Prism-based backend implementations. For example, we can implement the Reflection effect using only Prism operations, so we can share that implemenation across all of the Prism-based backends.

Parameters
fctx:FilterContext

the filter context

name:String

the name of the effect peer

Returns:EffectPeer<T extends RenderState>

a new EffectPeer instance

createPeerback to summary
protected EffectPeer<T extends RenderState> createPeer(FilterContext fctx, String name, int unrollCount)

Implements abstract com.sun.scenario.effect.impl.Renderer.createPeer.

Doc from com.sun.scenario.effect.impl.Renderer.createPeer.

Creates a new peer given the context, name and unroll count.

Parameters
fctx:FilterContext

context shared with the renderer

name:String

of the peer

unrollCount:int

unroll count

Returns:EffectPeer<T extends RenderState>

new peer

Annotations
@Override
createPlatformPeerback to summary
private EffectPeer<T extends RenderState> createPlatformPeer(FilterContext fctx, String name, int unrollCount)

Creates a new EffectPeer instance that is specific to the current shader-based backend.

Parameters
fctx:FilterContext

the filter context

name:String

the name of the effect peer

unrollCount:int

the unroll count

Returns:EffectPeer<T extends RenderState>

a new EffectPeer instance

createRendererback to summary
public static Renderer createRenderer(FilterContext fctx)

Hides com.sun.scenario.effect.impl.prism.PrRenderer.createRenderer.

createShaderback to summary
public Shader createShader(String name, Map<String, Integer> samplers, Map<String, Integer> params, boolean isPixcoordUsed)
createShaderSourceback to summary
private static ShaderSource createShaderSource(String name)
disposeback to summary
protected void dispose()

Disposes this renderer (flushes the associated images).

Warning

must be called only on the rendering thread (for example in response to device reset event). May be called multiple times.

getAccelTypeback to summary
public Effect.AccelType getAccelType()

Implements abstract com.sun.scenario.effect.impl.Renderer.getAccelType.

Doc from com.sun.scenario.effect.impl.Renderer.getAccelType.

Returns the AccelType used by default for peers of this renderer. Note that the Renderer may specialize in peers of this type, and it may create them in general by default, but the renderers all look for an Intrinsic peer for a given operation as well so the actual peer implementaiton for a given effect may sometimes differ from this AccelType. Care should be taken if the actual AccelType for a specific operation is needed, then the EffectPeer#getAccelType() should be consulted directly in those cases.

Returns:Effect.AccelType

the AccelType used by typical peers of this renderer

Annotations
@Override
getBackupRendererback to summary
protected Renderer getBackupRenderer()

Implements abstract com.sun.scenario.effect.impl.Renderer.getBackupRenderer.

Doc from com.sun.scenario.effect.impl.Renderer.getBackupRenderer.

Returns an instance of backup renderer to be used if this renderer is in LOST state.

Returns:Renderer

backup renderer

Annotations
@Override
getCompatibleHeightback to summary
public int getCompatibleHeight(int h)

Implements abstract com.sun.scenario.effect.impl.Renderer.getCompatibleHeight.

Annotations
@Override
getCompatibleImageback to summary
public PPSDrawable getCompatibleImage(int w, int h)

Overrides com.sun.scenario.effect.impl.Renderer.getCompatibleImage.

Annotations
@Override
getCompatibleWidthback to summary
public int getCompatibleWidth(int w)

Implements abstract com.sun.scenario.effect.impl.Renderer.getCompatibleWidth.

Annotations
@Override
getRendererStateback to summary
public synchronized Renderer.RendererState getRendererState()

Implements abstract com.sun.scenario.effect.impl.Renderer.getRendererState.

Warning

may be called on the rendering thread

Returns:Renderer.RendererState

Doc from com.sun.scenario.effect.impl.Renderer.getRendererState.

the state

Annotations
@Override
isImageDataCompatibleback to summary
public boolean isImageDataCompatible(final ImageData id)

Implements abstract com.sun.scenario.effect.impl.Renderer.isImageDataCompatible.

Doc from com.sun.scenario.effect.impl.Renderer.isImageDataCompatible.

Determines whether the passed ImageData is compatible with this renderer (that is, if it can be used as a input source for this renderer's peers).

Parameters
id:ImageData

ImageData to be checked

Returns:boolean

true if this image data is compatible, false otherwise

Annotations
@Override
markLostback to summary
protected final synchronized void markLost()

Marks this renderer as lost.

Warning

may be called on the rendering thread

transformback to summary
public Filterable transform(FilterContext fctx, Filterable original, BaseTransform transform, Rectangle origBounds, Rectangle xformBounds)

Implements abstract com.sun.scenario.effect.impl.Renderer.transform.

Annotations
@Override
transformback to summary
public ImageData transform(FilterContext fctx, ImageData original, BaseTransform transform, Rectangle origBounds, Rectangle xformBounds)

Implements abstract com.sun.scenario.effect.impl.Renderer.transform.

Annotations
@Override
updateFloatTextureback to summary
public void updateFloatTexture(LockableResource texture, FloatMap map)

Overrides com.sun.scenario.effect.impl.Renderer.updateFloatTexture.

Annotations
@Override
validateback to summary
private boolean validate()