Modifier and Type | Field and Description |
---|---|
private static final String | DESC_OPENGL_SURFACE
SurfaceTypes |
private static final String | |
private static final String | |
public static final int | FBOBJECT
OGL-specific surface types |
private OGLGraphicsConfig | |
private static boolean | isBIOpShaderEnabled
This will be true if the biopshader system property has been enabled. |
private static boolean | isFBObjectEnabled
This will be true if the fbobject system property has been enabled. |
private static boolean | isGradShaderEnabled
This will be true if the gradshader system property has been enabled. |
private static boolean | isLCDShaderEnabled
This will be true if the lcdshader system property has been enabled. |
private int | |
private int | |
protected static ParallelogramPipe | |
protected static OGLDrawImage | |
protected static OGLRenderer | |
protected static OGLTextRenderer | |
protected static PixelToParallelogramConverter | |
pack-priv static final SurfaceType | |
pack-priv static final SurfaceType | |
pack-priv static final SurfaceType | |
public static final int | |
public static final int | |
public static final int | PF_INT_ARGB
Pixel formats |
public static final int | |
public static final int | |
public static final int | |
public static final int | |
public static final int | |
public static final int | |
public static final int | |
public static final int | |
public static final int | |
protected int |
Access | Constructor and Description |
---|---|
protected |
Modifier and Type | Method and Description |
---|---|
private boolean | |
public boolean | canRenderLCDText(SunGraphics2D sg2d)
Overrides sun. |
public boolean | copyArea(SunGraphics2D sg2d, int
the x coordinate of the area in device space x, int the y coordinate of the area in device space y, int the width of the area in device space w, int the height of the area in device space h, int dx, int dy)Overrides sun. |
pack-priv static void | dispose(long pData, OGLGraphicsConfig gc)
Disposes the native resources associated with the given OGLSurfaceData (referenced by the pData parameter). |
public void | flush()
Overrides sun. |
public final OGLContext | getContext()
Implements sun. |
private static SurfaceType | getCustomSurfaceType(int oglType)
Returns the appropriate SurfaceType corresponding to the given OpenGL surface type constant (e.g. TEXTURE -> OpenGLTexture). |
protected MaskFill | getMaskFill(SunGraphics2D sg2d)
Overrides sun. |
public Rectangle | getNativeBounds()
Implements sun. getBounds .
|
public long | Returns: native resource of specified type or 0L if such resource doesn't exist or can not be retrieved.the type of the requested resource resType)Implements sun. resType associated with
this surface.
|
pack-priv final OGLGraphicsConfig | |
public Raster | getRaster(int x, int y, int w, int h)
Implements abstract sun. |
private native int | |
public final int | getTextureID()
If this surface is backed by a texture object, returns the texture ID for that texture. |
private native int | |
public final int | getTextureTarget()
If this surface is backed by a texture object, returns the target for that texture (either GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB). |
public final int | getType()
Implements sun. |
protected native boolean | initFBObject(long pData, boolean isOpaque, boolean texNonPow2, boolean texRect, int width, int height)
|
protected native boolean | |
protected void | initSurface(final int width, final int height)
Initializes the appropriate OpenGL offscreen surface based on the value of the type parameter. |
private void | initSurfaceNow(int width, int height)
Note This should only be called from the QFT under the AWT lock. |
protected native boolean | initTexture(long pData, boolean isOpaque, boolean texNonPow2, boolean texRect, int width, int height)
|
pack-priv boolean | isOnScreen()
Returns true if the surface is an on-screen window surface or a FBO texture attached to an on-screen CALayer. |
pack-priv boolean | isTexNonPow2Available()
Returns true if OpenGL textures can have non-power-of-two dimensions when using the basic GL_TEXTURE_2D target. |
pack-priv boolean | isTexRectAvailable()
Returns true if OpenGL textures can have non-power-of-two dimensions when using the GL_TEXTURE_RECTANGLE_ARB target (only available when the GL_ARB_texture_rectangle extension is present). |
public SurfaceDataProxy | makeProxyFor(SurfaceData srcData)
Overrides sun. |
pack-priv static void | |
public void |
DESC_OPENGL_SURFACE | back to summary |
---|---|
private static final String DESC_OPENGL_SURFACE SurfaceTypes |
DESC_OPENGL_SURFACE_RTT | back to summary |
---|---|
private static final String DESC_OPENGL_SURFACE_RTT |
DESC_OPENGL_TEXTURE | back to summary |
---|---|
private static final String DESC_OPENGL_TEXTURE |
FBOBJECT | back to summary |
---|---|
public static final int FBOBJECT OGL-specific surface types
|
graphicsConfig | back to summary |
---|---|
private OGLGraphicsConfig graphicsConfig |
isBIOpShaderEnabled | back to summary |
---|---|
private static boolean isBIOpShaderEnabled This will be true if the biopshader system property has been enabled. |
isFBObjectEnabled | back to summary |
---|---|
private static boolean isFBObjectEnabled This will be true if the fbobject system property has been enabled. |
isGradShaderEnabled | back to summary |
---|---|
private static boolean isGradShaderEnabled This will be true if the gradshader system property has been enabled. |
isLCDShaderEnabled | back to summary |
---|---|
private static boolean isLCDShaderEnabled This will be true if the lcdshader system property has been enabled. |
nativeHeight | back to summary |
---|---|
private int nativeHeight |
nativeWidth | back to summary |
---|---|
private int nativeWidth |
oglAAPgramPipe | back to summary |
---|---|
protected static ParallelogramPipe oglAAPgramPipe |
oglImagePipe | back to summary |
---|---|
protected static OGLDrawImage oglImagePipe |
oglRenderPipe | back to summary |
---|---|
protected static OGLRenderer oglRenderPipe |
oglTextPipe | back to summary |
---|---|
protected static OGLTextRenderer oglTextPipe |
oglTxRenderPipe | back to summary |
---|---|
protected static PixelToParallelogramConverter oglTxRenderPipe |
OpenGLSurface | back to summary |
---|---|
pack-priv static final SurfaceType OpenGLSurface |
OpenGLSurfaceRTT | back to summary |
---|---|
pack-priv static final SurfaceType OpenGLSurfaceRTT |
OpenGLTexture | back to summary |
---|---|
pack-priv static final SurfaceType OpenGLTexture |
PF_3BYTE_BGR | back to summary |
---|---|
public static final int PF_3BYTE_BGR |
PF_BYTE_GRAY | back to summary |
---|---|
public static final int PF_BYTE_GRAY |
PF_INT_ARGB | back to summary |
---|---|
public static final int PF_INT_ARGB Pixel formats |
PF_INT_ARGB_PRE | back to summary |
---|---|
public static final int PF_INT_ARGB_PRE |
PF_INT_BGR | back to summary |
---|---|
public static final int PF_INT_BGR |
PF_INT_BGRX | back to summary |
---|---|
public static final int PF_INT_BGRX |
PF_INT_RGB | back to summary |
---|---|
public static final int PF_INT_RGB |
PF_INT_RGBX | back to summary |
---|---|
public static final int PF_INT_RGBX |
PF_USHORT_555_RGB | back to summary |
---|---|
public static final int PF_USHORT_555_RGB |
PF_USHORT_555_RGBX | back to summary |
---|---|
public static final int PF_USHORT_555_RGBX |
PF_USHORT_565_RGB | back to summary |
---|---|
public static final int PF_USHORT_565_RGB |
PF_USHORT_GRAY | back to summary |
---|---|
public static final int PF_USHORT_GRAY |
type | back to summary |
---|---|
protected int type |
OGLSurfaceData | back to summary |
---|---|
protected OGLSurfaceData(OGLGraphicsConfig gc, ColorModel cm, int type) |
canHandleComposite | back to summary |
---|---|
private boolean canHandleComposite(Composite c) |
canRenderLCDText | back to summary |
---|---|
public boolean canRenderLCDText(SunGraphics2D sg2d) Overrides sun. For now, we can only render LCD text if: - the fragment shader extension is available, and - the source color is opaque, and - blending is SrcOverNoEa or disabled - and the destination is opaque Eventually, we could enhance the native OGL text rendering code and remove the above restrictions, but that would require significantly more code just to support a few uncommon cases. |
copyArea | back to summary |
---|---|
public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy) Overrides sun. Doc from sun. Performs a copyarea within this surface. Returns false if there is no algorithm to perform the copyarea given the current settings of the SunGraphics2D.
|
dispose | back to summary |
---|---|
pack-priv static void dispose(long pData, OGLGraphicsConfig gc) Disposes the native resources associated with the given OGLSurfaceData (referenced by the pData parameter). This method is invoked from the native Dispose() method from the Disposer thread when the Java-level OGLSurfaceData object is about to go away. Note that we also pass a reference to the OGLGraphicsConfig for the purposes of making a context current. |
flush | back to summary |
---|---|
public void flush() Overrides sun. Doc from sun. Synchronously releases resources associated with this surface. |
getContext | back to summary |
---|---|
public final OGLContext getContext() Implements sun. Returns the OGLContext for the GraphicsConfig associated with this surface.
|
getCustomSurfaceType | back to summary |
---|---|
private static SurfaceType getCustomSurfaceType(int oglType) Returns the appropriate SurfaceType corresponding to the given OpenGL surface type constant (e.g. TEXTURE -> OpenGLTexture). |
getMaskFill | back to summary |
---|---|
protected MaskFill getMaskFill(SunGraphics2D sg2d) Overrides sun. Doc from sun. Returns a MaskFill object that can be used on this destination with the source (paint) and composite types determined by the given SunGraphics2D, or null if no such MaskFill object can be located. Subclasses can override this method if they wish to filter other attributes (such as the hardware capabilities of the destination surface) before returning a specific MaskFill object.
|
getNativeBounds | back to summary |
---|---|
public Rectangle getNativeBounds() Implements sun. Doc from sun. Returns real bounds of the native surface, which may differ from those
returned by
|
getNativeResource | back to summary |
---|---|
public long getNativeResource(int resType) Implements sun. Returns native resource of specified TEXTURE - texture idNote: the resource returned by this method is only valid on the rendering thread.
|
getOGLGraphicsConfig | back to summary |
---|---|
pack-priv final OGLGraphicsConfig getOGLGraphicsConfig() Returns the OGLGraphicsConfig associated with this surface. |
getRaster | back to summary |
---|---|
public Raster getRaster(int x, int y, int w, int h) Implements abstract sun. Doc from sun. 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. |
getTextureID | back to summary |
---|---|
private native int getTextureID(long pData) |
getTextureID | back to summary |
---|---|
public final int getTextureID() If this surface is backed by a texture object, returns the texture ID for that texture. Otherwise, this method will return zero. |
getTextureTarget | back to summary |
---|---|
private native int getTextureTarget(long pData) |
getTextureTarget | back to summary |
---|---|
public final int getTextureTarget() If this surface is backed by a texture object, returns the target for that texture (either GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB). Otherwise, this method will return zero. |
getType | back to summary |
---|---|
public final int getType() Implements sun. Returns one of the surface type constants defined above.
|
initFBObject | back to summary |
---|---|
protected native boolean initFBObject(long pData, boolean isOpaque, boolean texNonPow2, boolean texRect, int width, int height) |
initFlipBackbuffer | back to summary |
---|---|
protected native boolean initFlipBackbuffer(long pData) |
initSurface | back to summary |
---|---|
protected void initSurface(final int width, final int height) Initializes the appropriate OpenGL offscreen surface based on the value of the type parameter. If the surface creation fails for any reason, an OutOfMemoryError will be thrown. |
initSurfaceNow | back to summary |
---|---|
private void initSurfaceNow(int width, int height) Note This should only be called from the QFT under the AWT lock. This method is kept separate from the initSurface() method below just to keep the code a bit cleaner. |
initTexture | back to summary |
---|---|
protected native boolean initTexture(long pData, boolean isOpaque, boolean texNonPow2, boolean texRect, int width, int height) |
isOnScreen | back to summary |
---|---|
pack-priv boolean isOnScreen() Returns true if the surface is an on-screen window surface or a FBO texture attached to an on-screen CALayer. Needed by Mac OS X port. |
isTexNonPow2Available | back to summary |
---|---|
pack-priv boolean isTexNonPow2Available() Returns true if OpenGL textures can have non-power-of-two dimensions when using the basic GL_TEXTURE_2D target. |
isTexRectAvailable | back to summary |
---|---|
pack-priv boolean isTexRectAvailable() Returns true if OpenGL textures can have non-power-of-two dimensions when using the GL_TEXTURE_RECTANGLE_ARB target (only available when the GL_ARB_texture_rectangle extension is present). |
makeProxyFor | back to summary |
---|---|
public SurfaceDataProxy makeProxyFor(SurfaceData srcData) Overrides sun. Doc from sun. 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.
|
swapBuffers | back to summary |
---|---|
pack-priv static void swapBuffers(long window) |
validatePipe | back to summary |
---|---|
public void validatePipe(SunGraphics2D sg2d) Overrides sun. |