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
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
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
|
static
MaskFill
|
getFromCache(SurfaceType src, CompositeType comp, SurfaceType dst)
|
static
MaskFill
|
locate(SurfaceType srctype, CompositeType comptype, SurfaceType dsttype)
|
static
MaskFill
|
locatePrim(SurfaceType srctype, CompositeType comptype, SurfaceType dsttype)
|
GraphicsPrimitive
|
makePrimitive(SurfaceType srctype, CompositeType comptype, SurfaceType dsttype)
|
GraphicsPrimitive
|
traceWrap()
|
|
From class
sun.java2d.loops.GraphicsPrimitive
static
SurfaceData
|
convertFrom(Blit ob, SurfaceData srcData, int srcX, int srcY, int w, int h, SurfaceData dstData, int type)
|
static
SurfaceData
|
convertFrom(Blit ob, SurfaceData srcData, int srcX, int srcY, int w, int h, SurfaceData dstData)
|
static
void
|
convertTo(Blit ob, SurfaceData srcImg, SurfaceData dstImg, Region clip, int dstX, int dstY, int w, int h)
|
static
Blit
|
createConverter(SurfaceType srctype, SurfaceType dsttype)
|
final
CompositeType
|
getCompositeType()
|
final
SurfaceType
|
getDestType()
|
static
GraphicsPrimitive
|
getGeneralOp(int primID, CompositeType comptype)
|
final
long
|
getNativePrim()
|
final
int
|
getPrimTypeID()
Gets unique id for this GraphicsPrimitive type.
|
final
String
|
getSignature()
|
final
SurfaceType
|
getSourceType()
|
final
int
|
getUniqueID()
Gets instance ID of this graphics primitive.
|
synchronized
final
static
int
|
makePrimTypeID()
|
abstract
GraphicsPrimitive
|
makePrimitive(SurfaceType srctype, CompositeType comptype, SurfaceType dsttype)
|
synchronized
final
static
int
|
makeUniqueID(int primTypeID, SurfaceType src, CompositeType cmp, SurfaceType dst)
|
final
boolean
|
satisfies(String signature, SurfaceType srctype, CompositeType comptype, SurfaceType dsttype)
Return true if this primitive can be used for the given signature
surfaces, and composite.
|
void
|
setupGeneralBinaryOp(GraphicsPrimitive.GeneralBinaryOp gbo)
|
void
|
setupGeneralUnaryOp(GraphicsPrimitive.GeneralUnaryOp guo)
|
static
String
|
simplename(Field[] fields, Object o)
|
static
String
|
simplename(CompositeType ct)
|
static
String
|
simplename(SurfaceType st)
|
String
|
toString()
Returns a string representation of the object.
|
synchronized
static
void
|
tracePrimitive(Object prim)
|
abstract
GraphicsPrimitive
|
traceWrap()
|
static
boolean
|
tracingEnabled()
|
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Fields
Protected Constructors
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).