Top Description Fields Constructors Methods
sun.java2d.pipe

public abstract Class BufferedMaskBlit

extends MaskBlit
Class Inheritance
Known Direct Subclasses
sun.java2d.opengl.OGLMaskBlit
Imports
java.awt.AlphaComposite, .Composite, sun.java2d.SurfaceData, sun.java2d.loops.Blit, .CompositeType, .MaskBlit, .SurfaceType

The MaskBlit operation is expressed as: dst = ((src <MODE> dst) * pathA) + (dst * (1 - pathA)) The OGL/D3D implementation of the MaskBlit operation differs from the above equation because it is not possible to perform such a complex operation in OpenGL/Direct3D (without the use of advanced techniques like fragment shaders and multitexturing). Therefore, the BufferedMaskBlit operation is expressed as: dst = (src * pathA) <SrcOver> dst This simplified formula is only equivalent to the "true" MaskBlit equation in the following situations: - <MODE> is SrcOver - <MODE> is Src, extra alpha == 1.0, and the source surface is opaque Therefore, we register BufferedMaskBlit primitives for only the SurfaceType and CompositeType restrictions mentioned above. In addition for the Src case, we must override the composite with a SrcOver (no extra alpha) instance, so that we set up the OpenGL/Direct3D blending mode to match the BufferedMaskBlit equation.

Field Summary

Modifier and TypeField and Description
private Blit
private final RenderQueue
private final int
private static final int
private static final int
private static final int
private static final int
Inherited from sun.java2d.loops.MaskBlit:
methodSignatureprimTypeID

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
private native int
enqueueTile(long buf, int bpos, SurfaceData srcData, long pSrcOps, int srcType, byte[] mask, int masklen, int maskoff, int maskscan, int srcx, int srcy, int dstx, int dsty, int width, int height)

public void
MaskBlit(SurfaceData src, SurfaceData dst, Composite comp, Region clip, int srcx, int srcy, int dstx, int dsty, int width, int height, byte[] mask, int maskoff, int maskscan)

Overrides sun.java2d.loops.MaskBlit.MaskBlit.

All MaskBlit implementors must have this invoker method

protected abstract void
validateContext(SurfaceData dstData, Composite comp, Region clip)

Validates the context state using the given destination surface and composite/clip values.

Inherited from sun.java2d.loops.MaskBlit:
getFromCachelocatemakePrimitivetraceWrap

Field Detail

blitopback to summary
private Blit blitop
rqback to summary
private final RenderQueue rq
srcTypeValback to summary
private final int srcTypeVal
ST_INT_ARGBback to summary
private static final int ST_INT_ARGB
ST_INT_ARGB_PREback to summary
private static final int ST_INT_ARGB_PRE
ST_INT_BGRback to summary
private static final int ST_INT_BGR
ST_INT_RGBback to summary
private static final int ST_INT_RGB

Constructor Detail

BufferedMaskBlitback to summary
protected BufferedMaskBlit(RenderQueue rq, SurfaceType srcType, CompositeType compType, SurfaceType dstType)

Method Detail

enqueueTileback to summary
private native int enqueueTile(long buf, int bpos, SurfaceData srcData, long pSrcOps, int srcType, byte[] mask, int masklen, int maskoff, int maskscan, int srcx, int srcy, int dstx, int dsty, int width, int height)
MaskBlitback to summary
public void MaskBlit(SurfaceData src, SurfaceData dst, Composite comp, Region clip, int srcx, int srcy, int dstx, int dsty, int width, int height, byte[] mask, int maskoff, int maskscan)

Overrides sun.java2d.loops.MaskBlit.MaskBlit.

Doc from sun.java2d.loops.MaskBlit.MaskBlit.

All MaskBlit implementors must have this invoker method

Annotations
@Override
validateContextback to summary
protected abstract void validateContext(SurfaceData dstData, Composite comp, Region clip)

Validates the context state using the given destination surface and composite/clip values.