APIdia Launch Partner
Top Description Fields Methods
sun.java2d.pipe.hw

public Interface AccelSurface

extends BufferedContextProvider, Surface
Known Direct Implementers
sun.java2d.opengl.OGLSurfaceData
Imports
java.awt.Rectangle, sun.java2d.Surface, java.lang.annotation.Native

Abstraction for a hardware accelerated surface.

Field Summary

Modifier and TypeField and Description
public static final int
FLIP_BACKBUFFER

A back-buffer surface (SwapChain surface for Direct3D, backbuffer for OpenGL)

public static final int
RT_PLAIN

Render-To Plain surface (Render Target surface for Direct3D)

public static final int
RT_TEXTURE

Render-To Texture surface (fbobject for OpenGL, texture with render-to attribute for Direct3D)

public static final int
TEXTURE

Texture surface

public static final int
UNDEFINED

Undefined

public static final int
WINDOW

Window (or window substitute) surface

Method Summary

Modifier and TypeMethod and Description
public Rectangle

Returns:

Rectangle representing java surface's bounds
getBounds
()

Returns the requested bounds of the destination surface.

public Rectangle

Returns:

Rectangle representing native surface's bounds
getNativeBounds
()

Returns real bounds of the native surface, which may differ from those returned by getBounds.

public long

Returns:

pointer to the native surface's data
getNativeOps
()

Returns a pointer to the native surface data associated with this surface.

public long

Returns:

a long containing a pointer to the native resource of the specified type or 0L if such resource doesn't exist for this surface
getNativeResource
(int
the type of the requested resource
resType
)

Returns a pointer to the real native resource of the specified type associated with this AccelSurface.

public int

Returns:

an integer representing this surface's type
getType
()

Returns int representing surface's type as defined by constants in this interface.

public boolean

Returns:

true if the surface is known to be lost, false otherwise
isSurfaceLost
()

Returns whether this surface is lost.

public boolean

Returns:

true if valid, false otherwise
isValid
()

Returns whether the pipeline considers this surface valid.

public void
markDirty()

Marks this surface dirty.

Inherited from sun.java2d.pipe.hw.BufferedContextProvider:
getContext

Field Detail

FLIP_BACKBUFFERback to summary
public static final int FLIP_BACKBUFFER

A back-buffer surface (SwapChain surface for Direct3D, backbuffer for OpenGL)

Annotations
@Native
RT_PLAINback to summary
public static final int RT_PLAIN

Render-To Plain surface (Render Target surface for Direct3D)

Annotations
@Native
RT_TEXTUREback to summary
public static final int RT_TEXTURE

Render-To Texture surface (fbobject for OpenGL, texture with render-to attribute for Direct3D)

Annotations
@Native
TEXTUREback to summary
public static final int TEXTURE

Texture surface

Annotations
@Native
UNDEFINEDback to summary
public static final int UNDEFINED

Undefined

Annotations
@Native
WINDOWback to summary
public static final int WINDOW

Window (or window substitute) surface

Annotations
@Native

Method Detail

getBoundsback to summary
public Rectangle getBounds()

Returns the requested bounds of the destination surface. The real bounds of the native accelerated surface may differ. Use getNativeBounds to get the bounds of the native surface.

Returns:Rectangle

Rectangle representing java surface's bounds

getNativeBoundsback to summary
public Rectangle getNativeBounds()

Returns real bounds of the native surface, which may differ from those returned by getBounds.

Returns:Rectangle

Rectangle representing native surface's bounds

getNativeOpsback to summary
public long getNativeOps()

Returns a pointer to the native surface data associated with this surface.

Note

this pointer is only valid on the rendering thread.

Returns:long

pointer to the native surface's data

getNativeResourceback to summary
public long getNativeResource(int resType)

Returns a pointer to the real native resource of the specified type associated with this AccelSurface.

Note

this pointer is only valid on the rendering thread.

Parameters
resType:int

the type of the requested resource

Returns:long

a long containing a pointer to the native resource of the specified type or 0L if such resource doesn't exist for this surface

getTypeback to summary
public int getType()

Returns int representing surface's type as defined by constants in this interface.

Returns:int

an integer representing this surface's type

See Also
AccelSurface#UNDEFINED, AccelSurface#WINDOW, AccelSurface#RT_PLAIN, AccelSurface#TEXTURE, AccelSurface#FLIP_BACKBUFFER, AccelSurface#RT_TEXTURE
isSurfaceLostback to summary
public boolean isSurfaceLost()

Returns whether this surface is lost. The return value is only valid on the render thread, meaning that even if this method returns true it could be lost in the next moment unless it is called on the rendering thread.

Returns:boolean

true if the surface is known to be lost, false otherwise

isValidback to summary
public boolean isValid()

Returns whether the pipeline considers this surface valid. A surface may become invalid if it is disposed of, or resized.

Returns:boolean

true if valid, false otherwise

markDirtyback to summary
public void markDirty()

Marks this surface dirty.