public abstract class

BufferedMaskFill

extends MaskFill
java.lang.Object
   ↳ sun.java2d.loops.GraphicsPrimitive
     ↳ sun.java2d.loops.MaskFill
       ↳ sun.java2d.pipe.BufferedMaskFill

Class Overview

The MaskFill operation is expressed as: dst = ((src 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) dst This simplified formula is only equivalent to the "true" MaskFill equation in the following situations: - is SrcOver - 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.

Summary

[Expand]
Inherited Constants
From class sun.java2d.loops.GraphicsPrimitive
Fields
protected final RenderQueue rq
[Expand]
Inherited Fields
From class sun.java2d.loops.MaskFill
From class sun.java2d.loops.GraphicsPrimitive
Protected Constructors
BufferedMaskFill(RenderQueue rq, SurfaceType srcType, CompositeType compType, SurfaceType dstType)
Public Methods
void MaskFill(SunGraphics2D sg2d, SurfaceData sData, Composite comp, int x, int y, int w, int h, byte[] mask, int maskoff, int maskscan)
All MaskFill implementors must have this invoker method
Protected Methods
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.
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.
[Expand]
Inherited Methods
From class sun.java2d.loops.MaskFill
From class sun.java2d.loops.GraphicsPrimitive
From class java.lang.Object

Fields

protected final RenderQueue rq

Protected Constructors

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

Public Methods

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

All MaskFill implementors must have this invoker method

Protected Methods

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.

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).