APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.java2d.x11

public abstract Class X11SurfaceData

extends XSurfaceData
Class Inheritance
Known Direct Subclasses
sun.java2d.x11.X11SurfaceData.X11WindowSurfaceData, sun.java2d.x11.X11SurfaceData.X11PixmapSurfaceData
Imports
java.awt.Composite, .GraphicsConfiguration, .GraphicsDevice, .GraphicsEnvironment, .Image, .Rectangle, .Transparency, java.awt.color.ColorSpace, java.awt.image.ColorModel, .ComponentColorModel, .DirectColorModel, .IndexColorModel, .Raster, sun.awt.SunHints, .SunToolkit, .X11ComponentPeer, .X11GraphicsConfig, sun.awt.image.PixelConverter, sun.font.X11TextRenderer, sun.java2d.InvalidPipeException, .SunGraphics2D, .SunGraphicsEnvironment, .SurfaceData, .SurfaceDataProxy, sun.java2d.loops.CompositeType, .GraphicsPrimitive, .RenderLoops, .SurfaceType, .XORComposite, sun.java2d.pipe.PixelToShapeConverter, .Region, .TextPipe, .ValidatePipe

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static Boolean
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
protected int
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final SurfaceType
pack-priv X11GraphicsConfig
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
private static X11SurfaceData.LazyPipe
pack-priv X11ComponentPeer
private RenderLoops
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
private Region
private boolean
private int
private XORComposite
protected X11Renderer
protected static TextPipe
protected PixelToShapeConverter
private long
private int
Inherited from sun.java2d.x11.XSurfaceData:
isX11SurfaceDataInitialized

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public abstract boolean

Returns:

true if there is any chance that an XCopyArea from the given source coordinates could produce any X11 Exposure events.
canSourceSendExposures
(int x, int y, int w, int h)

Returns a boolean indicating whether or not a copyArea from the given rectangle source coordinates might be incomplete and result in X11 GraphicsExposure events being generated from XCopyArea.

public boolean
copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy)

Overrides sun.java2d.SurfaceData.copyArea.

Performs a copyarea within this surface.

public static X11SurfaceData.X11WindowSurfaceData
createData(X11ComponentPeer peer)

Method for instantiating a Window SurfaceData

public static X11SurfaceData.X11PixmapSurfaceData
createData(X11GraphicsConfig gc, int width, int height, ColorModel cm, Image image, long drawable, int transparency, boolean isTexture)

Method for instantiating a Pixmap SurfaceData (offscreen)

public final long
getBlitGC(Region clip, boolean needExposures)

public GraphicsConfiguration
getDeviceConfiguration()

Implements abstract sun.java2d.SurfaceData.getDeviceConfiguration.

Return the GraphicsConfiguration object that describes this destination surface.

public static X11GraphicsConfig
pack-priv final long
getGC(Region clip, int compState, Composite comp, int pixel, boolean needExposures)

public Raster
getRaster(int x, int y, int w, int h)

Implements abstract sun.java2d.SurfaceData.getRaster.

Return a readable Raster which contains the pixels for the specified rectangular region of the destination surface.

public final long
getRenderGC(Region clip, int compState, Composite comp, int pixel)

public RenderLoops
getRenderLoops(SunGraphics2D sg2d)

Overrides sun.java2d.SurfaceData.getRenderLoops.

Return a RenderLoops object containing all of the basic GraphicsPrimitive objects for rendering to the destination surface with the current attributes of the given SunGraphics2D.

public static SurfaceType
getSurfaceType(X11GraphicsConfig gc, int transparency)

public static SurfaceType
getSurfaceType(X11GraphicsConfig gc, int transparency, boolean pixmapSurface)

private static native void
initIDs(Class<?> xorComp)

protected native void
initSurface(int depth, int width, int height, long drawable)

public void
invalidate()

Overrides sun.java2d.SurfaceData.invalidate.

Sets this SurfaceData object to the invalid state.

public static boolean
private static native boolean
isShmPMAvailable()

Returns true if shared memory pixmaps are available

public synchronized void
public SurfaceDataProxy
makeProxyFor(SurfaceData srcData)

Overrides sun.java2d.SurfaceData.makeProxyFor.

This method is called on a destination SurfaceData to choose a proper SurfaceDataProxy subclass for a source SurfaceData to use to control when and with what surface to override a given image operation.

public void
private static native void
XSetCopyMode(long xgc)

The following methods and variables are used to keep the Java-level context state in sync with the native X11 GC associated with this X11SurfaceData object.

private static native void
XSetForeground(long xgc, int pixel)

private static native void
XSetXorMode(long xgc)

Inherited from sun.java2d.x11.XSurfaceData:
flushNativeSurfaceinitOpsisDrawableValidisX11SurfaceDataInitializedsetInvalidsetX11SurfaceDataInitializedXCreateGCXResetClipXSetClipXSetGraphicsExposures

Field Detail

accelerationEnabledback to summary
private static Boolean accelerationEnabled
ByteGrayX11back to summary
public static final SurfaceType ByteGrayX11
ByteGrayX11_BMback to summary
public static final SurfaceType ByteGrayX11_BM
ByteIndexedOpaqueX11back to summary
public static final SurfaceType ByteIndexedOpaqueX11
ByteIndexedX11_BMback to summary
public static final SurfaceType ByteIndexedX11_BM
depthback to summary
protected int depth
DESC_3BYTE_BGR_X11back to summary
public static final String DESC_3BYTE_BGR_X11
DESC_3BYTE_BGR_X11_BMback to summary
public static final String DESC_3BYTE_BGR_X11_BM
DESC_3BYTE_RGB_X11back to summary
public static final String DESC_3BYTE_RGB_X11
DESC_3BYTE_RGB_X11_BMback to summary
public static final String DESC_3BYTE_RGB_X11_BM
DESC_4BYTE_ABGR_PRE_X11back to summary
public static final String DESC_4BYTE_ABGR_PRE_X11
DESC_BYTE_GRAY_X11back to summary
public static final String DESC_BYTE_GRAY_X11
DESC_BYTE_GRAY_X11_BMback to summary
public static final String DESC_BYTE_GRAY_X11_BM
DESC_BYTE_IND_OPQ_X11back to summary
public static final String DESC_BYTE_IND_OPQ_X11
DESC_BYTE_IND_X11_BMback to summary
public static final String DESC_BYTE_IND_X11_BM
DESC_INDEX8_GRAY_X11back to summary
public static final String DESC_INDEX8_GRAY_X11
DESC_INDEX8_GRAY_X11_BMback to summary
public static final String DESC_INDEX8_GRAY_X11_BM
DESC_INT_ARGB_PRE_X11back to summary
public static final String DESC_INT_ARGB_PRE_X11
DESC_INT_BGR_X11back to summary
public static final String DESC_INT_BGR_X11
DESC_INT_BGR_X11_BMback to summary
public static final String DESC_INT_BGR_X11_BM
DESC_INT_RGB_X11back to summary
public static final String DESC_INT_RGB_X11
DESC_INT_RGB_X11_BMback to summary
public static final String DESC_INT_RGB_X11_BM
DESC_USHORT_555_RGB_X11back to summary
public static final String DESC_USHORT_555_RGB_X11
DESC_USHORT_555_RGB_X11_BMback to summary
public static final String DESC_USHORT_555_RGB_X11_BM
DESC_USHORT_565_RGB_X11back to summary
public static final String DESC_USHORT_565_RGB_X11
DESC_USHORT_565_RGB_X11_BMback to summary
public static final String DESC_USHORT_565_RGB_X11_BM
DESC_USHORT_INDEXED_X11back to summary
public static final String DESC_USHORT_INDEXED_X11
DESC_USHORT_INDEXED_X11_BMback to summary
public static final String DESC_USHORT_INDEXED_X11_BM
FourByteAbgrPreX11back to summary
public static final SurfaceType FourByteAbgrPreX11
graphicsConfigback to summary
pack-priv X11GraphicsConfig graphicsConfig
Index8GrayX11back to summary
public static final SurfaceType Index8GrayX11
Index8GrayX11_BMback to summary
public static final SurfaceType Index8GrayX11_BM
IntArgbPreX11back to summary
public static final SurfaceType IntArgbPreX11
IntBgrX11back to summary
public static final SurfaceType IntBgrX11
IntBgrX11_BMback to summary
public static final SurfaceType IntBgrX11_BM
IntRgbX11back to summary
public static final SurfaceType IntRgbX11
IntRgbX11_BMback to summary
public static final SurfaceType IntRgbX11_BM
lazypipeback to summary
private static X11SurfaceData.LazyPipe lazypipe
peerback to summary
pack-priv X11ComponentPeer peer
solidloopsback to summary
private RenderLoops solidloops
ThreeByteBgrX11back to summary
public static final SurfaceType ThreeByteBgrX11
ThreeByteBgrX11_BMback to summary
public static final SurfaceType ThreeByteBgrX11_BM
ThreeByteRgbX11back to summary
public static final SurfaceType ThreeByteRgbX11
ThreeByteRgbX11_BMback to summary
public static final SurfaceType ThreeByteRgbX11_BM
UShort555RgbX11back to summary
public static final SurfaceType UShort555RgbX11
UShort555RgbX11_BMback to summary
public static final SurfaceType UShort555RgbX11_BM
UShort565RgbX11back to summary
public static final SurfaceType UShort565RgbX11
UShort565RgbX11_BMback to summary
public static final SurfaceType UShort565RgbX11_BM
UShortIndexedX11back to summary
public static final SurfaceType UShortIndexedX11
UShortIndexedX11_BMback to summary
public static final SurfaceType UShortIndexedX11_BM
validatedClipback to summary
private Region validatedClip
validatedExposuresback to summary
private boolean validatedExposures
validatedPixelback to summary
private int validatedPixel
validatedXorCompback to summary
private XORComposite validatedXorComp
x11pipeback to summary
protected X11Renderer x11pipe
x11textpipeback to summary
protected static TextPipe x11textpipe
x11txpipeback to summary
protected PixelToShapeConverter x11txpipe
xgcback to summary
private long xgc
xorpixelmodback to summary
private int xorpixelmod

Constructor Detail

X11SurfaceDataback to summary
protected X11SurfaceData(X11ComponentPeer peer, X11GraphicsConfig gc, SurfaceType sType, ColorModel cm)

Method Detail

canSourceSendExposuresback to summary
public abstract boolean canSourceSendExposures(int x, int y, int w, int h)

Returns a boolean indicating whether or not a copyArea from the given rectangle source coordinates might be incomplete and result in X11 GraphicsExposure events being generated from XCopyArea. This method allows the SurfaceData copyArea method to determine if it needs to set the GraphicsExposures attribute of the X11 GC to True or False to receive or avoid the events.

Returns:boolean

true if there is any chance that an XCopyArea from the given source coordinates could produce any X11 Exposure events.

copyAreaback to summary
public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy)

Overrides sun.java2d.SurfaceData.copyArea.

Doc from sun.java2d.SurfaceData.copyArea.

Performs a copyarea within this surface. Returns false if there is no algorithm to perform the copyarea given the current settings of the SunGraphics2D.

Annotations
@Override
createDataback to summary
public static X11SurfaceData.X11WindowSurfaceData createData(X11ComponentPeer peer)

Method for instantiating a Window SurfaceData

createDataback to summary
public static X11SurfaceData.X11PixmapSurfaceData createData(X11GraphicsConfig gc, int width, int height, ColorModel cm, Image image, long drawable, int transparency, boolean isTexture)

Method for instantiating a Pixmap SurfaceData (offscreen)

getBlitGCback to summary
public final long getBlitGC(Region clip, boolean needExposures)
getDeviceConfigurationback to summary
public GraphicsConfiguration getDeviceConfiguration()

Implements abstract sun.java2d.SurfaceData.getDeviceConfiguration.

Doc from sun.java2d.SurfaceData.getDeviceConfiguration.

Return the GraphicsConfiguration object that describes this destination surface.

Annotations
@Override
getGCback to summary
public static X11GraphicsConfig getGC(X11ComponentPeer peer)
getGCback to summary
pack-priv final long getGC(Region clip, int compState, Composite comp, int pixel, boolean needExposures)
getRasterback to summary
public Raster getRaster(int x, int y, int w, int h)

Implements abstract sun.java2d.SurfaceData.getRaster.

Doc from sun.java2d.SurfaceData.getRaster.

Return a readable Raster which contains the pixels for the specified rectangular region of the destination surface. The coordinate origin of the returned Raster is the same as the device space origin of the destination surface. In some cases the returned Raster might also be writeable. In most cases, the returned Raster might contain more pixels than requested.

Annotations
@Override
getRenderGCback to summary
public final long getRenderGC(Region clip, int compState, Composite comp, int pixel)
getRenderLoopsback to summary
public RenderLoops getRenderLoops(SunGraphics2D sg2d)

Overrides sun.java2d.SurfaceData.getRenderLoops.

Doc from sun.java2d.SurfaceData.getRenderLoops.

Return a RenderLoops object containing all of the basic GraphicsPrimitive objects for rendering to the destination surface with the current attributes of the given SunGraphics2D.

Annotations
@Override
getSurfaceTypeback to summary
public static SurfaceType getSurfaceType(X11GraphicsConfig gc, int transparency)
getSurfaceTypeback to summary
public static SurfaceType getSurfaceType(X11GraphicsConfig gc, int transparency, boolean pixmapSurface)
Annotations
@SuppressWarnings:fallthrough
initIDsback to summary
private static native void initIDs(Class<?> xorComp)
initSurfaceback to summary
protected native void initSurface(int depth, int width, int height, long drawable)
invalidateback to summary
public void invalidate()

Overrides sun.java2d.SurfaceData.invalidate.

Doc from sun.java2d.SurfaceData.invalidate.

Sets this SurfaceData object to the invalid state. All Graphics objects must get a new SurfaceData object via the refresh method and revalidate their pipelines before continuing.

Annotations
@Override
isAccelerationEnabledback to summary
public static boolean isAccelerationEnabled()
isShmPMAvailableback to summary
private static native boolean isShmPMAvailable()

Returns true if shared memory pixmaps are available

makePipesback to summary
public synchronized void makePipes()
makeProxyForback to summary
public SurfaceDataProxy makeProxyFor(SurfaceData srcData)

Overrides sun.java2d.SurfaceData.makeProxyFor.

Doc from sun.java2d.SurfaceData.makeProxyFor.

This method is called on a destination SurfaceData to choose a proper SurfaceDataProxy subclass for a source SurfaceData to use to control when and with what surface to override a given image operation. The argument is the default SurfaceData for the source Image.

The type of the return object is chosen based on the acceleration capabilities of this SurfaceData and the type of the given source SurfaceData object.

In some cases the original SurfaceData will always be the best choice to use to blit to this SurfaceData. This can happen if the source image is a hardware surface of the same type as this one and so acceleration will happen without any caching. It may also be the case that the source image can never be accelerated on this SurfaceData - for example because it is translucent and there are no accelerated translucent image ops for this surface.

In those cases there is a special SurfaceDataProxy.UNCACHED instance that represents a NOP for caching purposes - it always returns the original sourceSD object as the replacement copy so no caching is ever performed.

Annotations
@Override
validatePipeback to summary
public void validatePipe(SunGraphics2D sg2d)

Overrides sun.java2d.SurfaceData.validatePipe.

Annotations
@Override
XSetCopyModeback to summary
private static native void XSetCopyMode(long xgc)

The following methods and variables are used to keep the Java-level context state in sync with the native X11 GC associated with this X11SurfaceData object.

XSetForegroundback to summary
private static native void XSetForeground(long xgc, int pixel)
XSetXorModeback to summary
private static native void XSetXorMode(long xgc)
sun.java2d.x11 back to summary

public final Class X11SurfaceData.LazyPipe

extends ValidatePipe
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
Inherited from sun.java2d.pipe.ValidatePipe:
copyImagecopyImagedrawdrawArcdrawCharsdrawGlyphVectordrawLinedrawOvaldrawPolygondrawPolylinedrawRectdrawRoundRectdrawStringfillfillArcfillOvalfillPolygonfillRectfillRoundRectscaleImagescaleImagetransformImagetransformImage

Constructor Detail

LazyPipeback to summary
public LazyPipe()

Method Detail

validateback to summary
public boolean validate(SunGraphics2D sg2d)

Overrides sun.java2d.pipe.ValidatePipe.validate.

Annotations
@Override
sun.java2d.x11 back to summary

private final Class X11SurfaceData.X11PixmapSurfaceData

extends X11SurfaceData
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
private final Image
private final int
private final int
private final int
Inherited from sun.java2d.x11.X11SurfaceData:
ByteGrayX11ByteGrayX11_BMByteIndexedOpaqueX11ByteIndexedX11_BMdepthDESC_3BYTE_BGR_X11DESC_3BYTE_BGR_X11_BMDESC_3BYTE_RGB_X11DESC_3BYTE_RGB_X11_BMDESC_4BYTE_ABGR_PRE_X11DESC_BYTE_GRAY_X11DESC_BYTE_GRAY_X11_BMDESC_BYTE_IND_OPQ_X11DESC_BYTE_IND_X11_BMDESC_INDEX8_GRAY_X11DESC_INDEX8_GRAY_X11_BMDESC_INT_ARGB_PRE_X11DESC_INT_BGR_X11DESC_INT_BGR_X11_BMDESC_INT_RGB_X11DESC_INT_RGB_X11_BMDESC_USHORT_555_RGB_X11DESC_USHORT_555_RGB_X11_BMDESC_USHORT_565_RGB_X11DESC_USHORT_565_RGB_X11_BMDESC_USHORT_INDEXED_X11DESC_USHORT_INDEXED_X11_BMFourByteAbgrPreX11graphicsConfigIndex8GrayX11Index8GrayX11_BMIntArgbPreX11IntBgrX11IntBgrX11_BMIntRgbX11IntRgbX11_BMpeerThreeByteBgrX11ThreeByteBgrX11_BMThreeByteRgbX11ThreeByteRgbX11_BMUShort555RgbX11UShort555RgbX11_BMUShort565RgbX11UShort565RgbX11_BMUShortIndexedX11UShortIndexedX11_BMx11pipex11textpipex11txpipe

Constructor Summary

AccessConstructor and Description
public
X11PixmapSurfaceData(X11GraphicsConfig gc, int width, int height, Image image, SurfaceType sType, ColorModel cm, long drawable, int transparency, boolean isTexture)

Method Summary

Modifier and TypeMethod and Description
public boolean
canSourceSendExposures(int x, int y, int w, int h)

Implements abstract sun.java2d.x11.X11SurfaceData.canSourceSendExposures.

Returns a boolean indicating whether or not a copyArea from the given rectangle source coordinates might be incomplete and result in X11 GraphicsExposure events being generated from XCopyArea.

public void
flush()

Overrides sun.java2d.SurfaceData.flush.

Synchronously releases resources associated with this surface.

public Rectangle
getBounds()

Implements abstract sun.java2d.SurfaceData.getBounds.

Returns the bounds of the destination surface.

public double
getDefaultScaleX()

Overrides sun.java2d.SurfaceData.getDefaultScaleX.

Returns default horizontal scale factor of the destination surface.

public double
getDefaultScaleY()

Overrides sun.java2d.SurfaceData.getDefaultScaleY.

Returns default vertical scale factor of the destination surface.

public Object
getDestination()

Implements abstract sun.java2d.SurfaceData.getDestination.

Returns destination Image associated with this SurfaceData.

public SurfaceData
getReplacement()

Implements abstract sun.java2d.SurfaceData.getReplacement.

Certain changes in the configuration of a surface require the invalidation of existing associated SurfaceData objects and the creation of brand new ones.

public int
getTransparency()

Overrides sun.java2d.SurfaceData.getTransparency.

Implements java.awt.Transparency.getTransparency.

Need this since the surface data is created with the color model of the target GC, which is always opaque.

Inherited from sun.java2d.x11.X11SurfaceData:
copyAreacreateDatacreateDatagetBlitGCgetDeviceConfigurationgetGCgetGCgetRastergetRenderGCgetRenderLoopsgetSurfaceTypegetSurfaceTypeinitSurfaceinvalidateisAccelerationEnabledmakePipesmakeProxyForvalidatePipe

Field Detail

heightback to summary
private final int height
offscreenImageback to summary
private final Image offscreenImage
scaleback to summary
private final int scale
transparencyback to summary
private final int transparency
widthback to summary
private final int width

Constructor Detail

X11PixmapSurfaceDataback to summary
public X11PixmapSurfaceData(X11GraphicsConfig gc, int width, int height, Image image, SurfaceType sType, ColorModel cm, long drawable, int transparency, boolean isTexture)

Method Detail

canSourceSendExposuresback to summary
public boolean canSourceSendExposures(int x, int y, int w, int h)

Implements abstract sun.java2d.x11.X11SurfaceData.canSourceSendExposures.

Doc from sun.java2d.x11.X11SurfaceData.canSourceSendExposures.

Returns a boolean indicating whether or not a copyArea from the given rectangle source coordinates might be incomplete and result in X11 GraphicsExposure events being generated from XCopyArea. This method allows the SurfaceData copyArea method to determine if it needs to set the GraphicsExposures attribute of the X11 GC to True or False to receive or avoid the events.

Annotations
@Override
flushback to summary
public void flush()

Overrides sun.java2d.SurfaceData.flush.

Doc from sun.java2d.SurfaceData.flush.

Synchronously releases resources associated with this surface.

Annotations
@Override
getBoundsback to summary
public Rectangle getBounds()

Implements abstract sun.java2d.SurfaceData.getBounds.

Doc from sun.java2d.SurfaceData.getBounds.

Returns the bounds of the destination surface.

Annotations
@Override
getDefaultScaleXback to summary
public double getDefaultScaleX()

Overrides sun.java2d.SurfaceData.getDefaultScaleX.

Doc from sun.java2d.SurfaceData.getDefaultScaleX.

Returns default horizontal scale factor of the destination surface. Scale factor describes the mapping between virtual and physical coordinates of the SurfaceData. If the scale is 2 then virtual pixel coordinates need to be doubled for physical pixels.

Annotations
@Override
getDefaultScaleYback to summary
public double getDefaultScaleY()

Overrides sun.java2d.SurfaceData.getDefaultScaleY.

Doc from sun.java2d.SurfaceData.getDefaultScaleY.

Returns default vertical scale factor of the destination surface. Scale factor describes the mapping between virtual and physical coordinates of the SurfaceData. If the scale is 2 then virtual pixel coordinates need to be doubled for physical pixels.

Annotations
@Override
getDestinationback to summary
public Object getDestination()

Implements abstract sun.java2d.SurfaceData.getDestination.

Returns destination Image associated with this SurfaceData.

Annotations
@Override
getReplacementback to summary
public SurfaceData getReplacement()

Implements abstract sun.java2d.SurfaceData.getReplacement.

Doc from sun.java2d.SurfaceData.getReplacement.

Certain changes in the configuration of a surface require the invalidation of existing associated SurfaceData objects and the creation of brand new ones. These changes include size, ColorModel, or SurfaceType. Existing Graphics objects which are directed at such surfaces, however, must continue to render to them even after the change occurs underneath the covers. The getReplacement() method is called from SunGraphics2D.revalidateAll() when the associated SurfaceData is found to be invalid so that a Graphics object can continue to render to the surface in its new configuration. Such changes only tend to happen to window based surfaces since most image based surfaces never change size or pixel format. Even VolatileImage objects never change size and they only change their pixel format when manually validated against a new GraphicsConfiguration, at which point old Graphics objects are no longer expected to render to them after the validation step. Thus, only window based surfaces really need to deal with this form of replacement.

Annotations
@Override
getTransparencyback to summary
public int getTransparency()

Overrides sun.java2d.SurfaceData.getTransparency.

Implements java.awt.Transparency.getTransparency.

Need this since the surface data is created with the color model of the target GC, which is always opaque. But in SunGraphics2D.blitSD we choose loops based on the transparency on the source SD, so it could choose wrong loop (blit instead of blitbg, for example).

Annotations
@Override
sun.java2d.x11 back to summary

private final Class X11SurfaceData.X11WindowSurfaceData

extends X11SurfaceData
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
Inherited from sun.java2d.x11.X11SurfaceData:
ByteGrayX11ByteGrayX11_BMByteIndexedOpaqueX11ByteIndexedX11_BMdepthDESC_3BYTE_BGR_X11DESC_3BYTE_BGR_X11_BMDESC_3BYTE_RGB_X11DESC_3BYTE_RGB_X11_BMDESC_4BYTE_ABGR_PRE_X11DESC_BYTE_GRAY_X11DESC_BYTE_GRAY_X11_BMDESC_BYTE_IND_OPQ_X11DESC_BYTE_IND_X11_BMDESC_INDEX8_GRAY_X11DESC_INDEX8_GRAY_X11_BMDESC_INT_ARGB_PRE_X11DESC_INT_BGR_X11DESC_INT_BGR_X11_BMDESC_INT_RGB_X11DESC_INT_RGB_X11_BMDESC_USHORT_555_RGB_X11DESC_USHORT_555_RGB_X11_BMDESC_USHORT_565_RGB_X11DESC_USHORT_565_RGB_X11_BMDESC_USHORT_INDEXED_X11DESC_USHORT_INDEXED_X11_BMFourByteAbgrPreX11graphicsConfigIndex8GrayX11Index8GrayX11_BMIntArgbPreX11IntBgrX11IntBgrX11_BMIntRgbX11IntRgbX11_BMpeerThreeByteBgrX11ThreeByteBgrX11_BMThreeByteRgbX11ThreeByteRgbX11_BMUShort555RgbX11UShort555RgbX11_BMUShort565RgbX11UShort565RgbX11_BMUShortIndexedX11UShortIndexedX11_BMx11pipex11textpipex11txpipe

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
canSourceSendExposures(int x, int y, int w, int h)

Implements abstract sun.java2d.x11.X11SurfaceData.canSourceSendExposures.

Returns a boolean indicating whether or not a copyArea from the given rectangle source coordinates might be incomplete and result in X11 GraphicsExposure events being generated from XCopyArea.

public Rectangle
getBounds()

Implements abstract sun.java2d.SurfaceData.getBounds.

Returns the bounds of the destination surface.

public double
getDefaultScaleX()

Overrides sun.java2d.SurfaceData.getDefaultScaleX.

Returns default horizontal scale factor of the destination surface.

public double
getDefaultScaleY()

Overrides sun.java2d.SurfaceData.getDefaultScaleY.

Returns default vertical scale factor of the destination surface.

public Object
getDestination()

Implements abstract sun.java2d.SurfaceData.getDestination.

Returns destination Component associated with this SurfaceData.

public SurfaceData
getReplacement()

Implements abstract sun.java2d.SurfaceData.getReplacement.

Certain changes in the configuration of a surface require the invalidation of existing associated SurfaceData objects and the creation of brand new ones.

Inherited from sun.java2d.x11.X11SurfaceData:
copyAreacreateDatacreateDatagetBlitGCgetDeviceConfigurationgetGCgetGCgetRastergetRenderGCgetRenderLoopsgetSurfaceTypegetSurfaceTypeinitSurfaceinvalidateisAccelerationEnabledmakePipesmakeProxyForvalidatePipe

Field Detail

scaleback to summary
private final int scale

Constructor Detail

X11WindowSurfaceDataback to summary
public X11WindowSurfaceData(X11ComponentPeer peer, X11GraphicsConfig gc, SurfaceType sType)

Method Detail

canSourceSendExposuresback to summary
public boolean canSourceSendExposures(int x, int y, int w, int h)

Implements abstract sun.java2d.x11.X11SurfaceData.canSourceSendExposures.

Doc from sun.java2d.x11.X11SurfaceData.canSourceSendExposures.

Returns a boolean indicating whether or not a copyArea from the given rectangle source coordinates might be incomplete and result in X11 GraphicsExposure events being generated from XCopyArea. This method allows the SurfaceData copyArea method to determine if it needs to set the GraphicsExposures attribute of the X11 GC to True or False to receive or avoid the events.

Annotations
@Override
getBoundsback to summary
public Rectangle getBounds()

Implements abstract sun.java2d.SurfaceData.getBounds.

Doc from sun.java2d.SurfaceData.getBounds.

Returns the bounds of the destination surface.

Annotations
@Override
getDefaultScaleXback to summary
public double getDefaultScaleX()

Overrides sun.java2d.SurfaceData.getDefaultScaleX.

Doc from sun.java2d.SurfaceData.getDefaultScaleX.

Returns default horizontal scale factor of the destination surface. Scale factor describes the mapping between virtual and physical coordinates of the SurfaceData. If the scale is 2 then virtual pixel coordinates need to be doubled for physical pixels.

Annotations
@Override
getDefaultScaleYback to summary
public double getDefaultScaleY()

Overrides sun.java2d.SurfaceData.getDefaultScaleY.

Doc from sun.java2d.SurfaceData.getDefaultScaleY.

Returns default vertical scale factor of the destination surface. Scale factor describes the mapping between virtual and physical coordinates of the SurfaceData. If the scale is 2 then virtual pixel coordinates need to be doubled for physical pixels.

Annotations
@Override
getDestinationback to summary
public Object getDestination()

Implements abstract sun.java2d.SurfaceData.getDestination.

Returns destination Component associated with this SurfaceData.

Annotations
@Override
getReplacementback to summary
public SurfaceData getReplacement()

Implements abstract sun.java2d.SurfaceData.getReplacement.

Doc from sun.java2d.SurfaceData.getReplacement.

Certain changes in the configuration of a surface require the invalidation of existing associated SurfaceData objects and the creation of brand new ones. These changes include size, ColorModel, or SurfaceType. Existing Graphics objects which are directed at such surfaces, however, must continue to render to them even after the change occurs underneath the covers. The getReplacement() method is called from SunGraphics2D.revalidateAll() when the associated SurfaceData is found to be invalid so that a Graphics object can continue to render to the surface in its new configuration. Such changes only tend to happen to window based surfaces since most image based surfaces never change size or pixel format. Even VolatileImage objects never change size and they only change their pixel format when manually validated against a new GraphicsConfiguration, at which point old Graphics objects are no longer expected to render to them after the validation step. Thus, only window based surfaces really need to deal with this form of replacement.

Annotations
@Override