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

public abstract Class BufferedMaskFill

extends MaskFill
Class Inheritance
Known Direct Subclasses
sun.java2d.opengl.OGLMaskFill
Imports
java.awt.AlphaComposite, .Composite, sun.java2d.SunGraphics2D, .SurfaceData, sun.java2d.loops.CompositeType, .MaskFill, .SurfaceType

The MaskFill operation is expressed as: dst = ((src <MODE> dst) * pathA) + (dst * (1 - pathA)) The OGL/D3D implementation of the MaskFill 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 BufferedMaskFill operation is expressed as: dst = (src * pathA) <SrcOver> dst This simplified formula is only equivalent to the "true" MaskFill equation in the following situations: - <MODE> is SrcOver - <MODE> is Src, extra alpha == 1.0, and the source paint is opaque Therefore, we register BufferedMaskFill primitives for only the SurfaceType and CompositeType restrictions mentioned above. In addition, for the SrcNoEa case we must override the incoming composite with a SrcOver (no extra alpha) instance, so that we set up the OpenGL/Direct3D blending mode to match the BufferedMaskFill equation.

Field Summary

Modifier and TypeField and Description
protected final RenderQueue
Inherited from sun.java2d.loops.MaskFill:
drawPgramSignaturefillPgramSignaturemethodSignatureprimTypeID

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
MaskFill(SunGraphics2D sg2d, SurfaceData sData, Composite comp, final int x, final int y, final int w, final int h, final byte[] mask, final int maskoff, final int maskscan)

Overrides sun.java2d.loops.MaskFill.MaskFill.

All MaskFill implementors must have this invoker method

protected abstract void
maskFill(int x, int y, int w, int h, int maskoff, int maskscan, int masklen, byte[] mask)

Called as a separate Runnable when the operation is too large to fit on the RenderQueue.

protected abstract void
validateContext(SunGraphics2D sg2d, Composite comp, int ctxflags)

Validates the state in the provided SunGraphics2D object and sets up any special resources for this operation (e.g. enabling gradient shading).

Inherited from sun.java2d.loops.MaskFill:
canDoParallelogramsDrawAAPgramFillAAPgramgetFromCachelocatelocatePrimmakePrimitivetraceWrap

Field Detail

rqback to summary
protected final RenderQueue rq

Constructor Detail

BufferedMaskFillback to summary
protected BufferedMaskFill(RenderQueue rq, SurfaceType srcType, CompositeType compType, SurfaceType dstType)

Method Detail

MaskFillback to summary
public void MaskFill(SunGraphics2D sg2d, SurfaceData sData, Composite comp, final int x, final int y, final int w, final int h, final byte[] mask, final int maskoff, final int maskscan)

Overrides sun.java2d.loops.MaskFill.MaskFill.

Doc from sun.java2d.loops.MaskFill.MaskFill.

All MaskFill implementors must have this invoker method

Annotations
@Override
maskFillback to summary
protected abstract void maskFill(int x, int y, int w, int h, int maskoff, int maskscan, int masklen, byte[] mask)

Called as a separate Runnable when the operation is too large to fit on the RenderQueue. The OGL/D3D pipelines each have their own (small) native implementation of this method.

validateContextback to summary
protected abstract void validateContext(SunGraphics2D sg2d, Composite comp, int ctxflags)

Validates the state in the provided SunGraphics2D object and sets up any special resources for this operation (e.g. enabling gradient shading).