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

pack-priv Class ES2SwapChain

extends Object
implements ES2RenderTarget, Presentable, GraphicsResource
Class Inheritance
All Implemented Interfaces
com.sun.prism.GraphicsResource, com.sun.prism.Presentable, com.sun.prism.RenderTarget, com.sun.prism.Surface, com.sun.prism.es2.ES2RenderTarget
Imports
com.sun.glass.ui.Screen, com.sun.javafx.geom.Rectangle, com.sun.prism.GraphicsResource, .Presentable, .PresentableState, .RTTexture, .CompositeMode, .ResourceFactory, .Texture.WrapMode, com.sun.prism.impl.PrismSettings, com.sun.javafx.PlatformUtil

Field Summary

Modifier and TypeField and Description
private final ES2Context
private boolean
private GLDrawable
private int
h

private final boolean
pack-priv long
private boolean
private boolean
private float
private float
private final PresentableState
private RTTexture
stableBackbuffer

An offscreen surface that acts as a persistent backbuffer, currently only used when dirty region optimizations are enabled in the scenegraph.

private int
w

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ES2Graphics
public void
private void
drawTexture(ES2Graphics g, RTTexture src, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2)

public Screen
public int
public int
public int
public int
public int
public int
public int
public float
public float
public boolean
public boolean
public boolean
lockResources(PresentableState pState)

Implements com.sun.prism.Presentable.lockResources.

Locks any underlying resources needed for a createGraphics/prepare/present sequence and returns a boolean indicating if the presentable needs to be recreated.

public boolean
prepare(Rectangle clip)

Implements com.sun.prism.Presentable.prepare.

display the indicated region to the user.

public boolean
present()

Implements com.sun.prism.Presentable.present.

present the prepared region to the user.

public void
setOpaque(boolean isOpaque)

Implements com.sun.prism.RenderTarget.setOpaque.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private final ES2Context context
copyFullBufferback to summary
private boolean copyFullBuffer
drawableback to summary
private GLDrawable drawable
hback to summary
private int h
msaaback to summary
private final boolean msaa
nativeDestHandleback to summary
pack-priv long nativeDestHandle
needsResizeback to summary
private boolean needsResize
opaqueback to summary
private boolean opaque
pixelScaleFactorXback to summary
private float pixelScaleFactorX
pixelScaleFactorYback to summary
private float pixelScaleFactorY
pStateback to summary
private final PresentableState pState
stableBackbufferback to summary
private RTTexture stableBackbuffer

An offscreen surface that acts as a persistent backbuffer, currently only used when dirty region optimizations are enabled in the scenegraph. In OpenGL, the contents of a window's (hardware) backbuffer are undefined after a swapBuffers() operation. The dirty region optimizations used in the Prism scenegraph require the window's backbuffer to be persistent, so when those optimizations are enabled, we insert this special stableBackbuffer into the swap chain. In createGraphics() we return a Graphics object that points to this stableBackbuffer so that the scenegraph gets rendered into it, and then at present() time we first copy stableBackbuffer into the window's hardware backbuffer prior to calling swapBuffers().

wback to summary
private int w

Constructor Detail

ES2SwapChainback to summary
pack-priv ES2SwapChain(ES2Context context, PresentableState pState)

Method Detail

createGraphicsback to summary
public ES2Graphics createGraphics()

Implements com.sun.prism.RenderTarget.createGraphics.

Annotations
@Override
disposeback to summary
public void dispose()

Implements com.sun.prism.GraphicsResource.dispose.

Annotations
@Override
drawTextureback to summary
private void drawTexture(ES2Graphics g, RTTexture src, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2)
getAssociatedScreenback to summary
public Screen getAssociatedScreen()

Implements com.sun.prism.RenderTarget.getAssociatedScreen.

Annotations
@Override
getContentHeightback to summary
public int getContentHeight()

Implements com.sun.prism.Surface.getContentHeight.

Annotations
@Override
getContentWidthback to summary
public int getContentWidth()

Implements com.sun.prism.Surface.getContentWidth.

Annotations
@Override
getContentXback to summary
public int getContentX()

Implements com.sun.prism.Surface.getContentX.

Annotations
@Override
getContentYback to summary
public int getContentY()

Implements com.sun.prism.Surface.getContentY.

Annotations
@Override
getFboIDback to summary
public int getFboID()

Implements com.sun.prism.es2.ES2RenderTarget.getFboID.

Annotations
@Override
getPhysicalHeightback to summary
public int getPhysicalHeight()

Implements com.sun.prism.Surface.getPhysicalHeight.

Annotations
@Override
getPhysicalWidthback to summary
public int getPhysicalWidth()

Implements com.sun.prism.Surface.getPhysicalWidth.

Annotations
@Override
getPixelScaleFactorXback to summary
public float getPixelScaleFactorX()

Implements com.sun.prism.Presentable.getPixelScaleFactorX.

Annotations
@Override
getPixelScaleFactorYback to summary
public float getPixelScaleFactorY()

Implements com.sun.prism.Presentable.getPixelScaleFactorY.

Annotations
@Override
isMSAAback to summary
public boolean isMSAA()

Implements com.sun.prism.RenderTarget.isMSAA.

Annotations
@Override
isOpaqueback to summary
public boolean isOpaque()

Implements com.sun.prism.RenderTarget.isOpaque.

Annotations
@Override
lockResourcesback to summary
public boolean lockResources(PresentableState pState)

Implements com.sun.prism.Presentable.lockResources.

Doc from com.sun.prism.Presentable.lockResources.

Locks any underlying resources needed for a createGraphics/prepare/present sequence and returns a boolean indicating if the presentable needs to be recreated. If the method returns true and the Presentable implements GraphicsResource then its dispose() method will be called prior to recreating a new Presentable object and so no resource should need to be locked in that case. The resources will be unlocked in either prepare() or present().

Annotations
@Override
prepareback to summary
public boolean prepare(Rectangle clip)

Implements com.sun.prism.Presentable.prepare.

Doc from com.sun.prism.Presentable.prepare.

display the indicated region to the user.

Annotations
@Override
presentback to summary
public boolean present()

Implements com.sun.prism.Presentable.present.

Doc from com.sun.prism.Presentable.present.

present the prepared region to the user.

Annotations
@Override
setOpaqueback to summary
public void setOpaque(boolean isOpaque)

Implements com.sun.prism.RenderTarget.setOpaque.

Annotations
@Override