/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* The MaskBlit operation is expressed as:
* dst = ((src <MODE> dst) * pathA) + (dst * (1 - pathA))
*
* equation because it is not possible to perform such a complex operation in
* 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)
* BufferedMaskBlit equation.
*/
private final int srcTypeVal;
{
this.srcTypeVal = ST_INT_ARGB;
this.srcTypeVal = ST_INT_ARGB_PRE;
this.srcTypeVal = ST_INT_RGB;
this.srcTypeVal = ST_INT_BGR;
} else {
throw new InternalError("unrecognized source surface type");
}
}
{
return;
}
// no mask involved; delegate to regular blit loop
this.getDestType());
}
return;
}
}
try {
/*
* REMIND: we should fix this so that it works with tiles that
* are larger than the entire buffer, but the native
* OGL/D3DMaskBlit isn't even prepared for tiles larger
* than 32x32 pixels, so there's no urgency here...
*/
// enqueue parameters and tile pixels
} finally {
}
}
/**
* Validates the context state using the given destination surface
*/
}