430N/A/*
2362N/A * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
430N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
430N/A *
430N/A * This code is free software; you can redistribute it and/or modify it
430N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
430N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
430N/A *
430N/A * This code is distributed in the hope that it will be useful, but WITHOUT
430N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
430N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
430N/A * version 2 for more details (a copy is included in the LICENSE file that
430N/A * accompanied this code).
430N/A *
430N/A * You should have received a copy of the GNU General Public License version
430N/A * 2 along with this work; if not, write to the Free Software Foundation,
430N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
430N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
430N/A */
430N/A
430N/Apackage sun.java2d.d3d;
430N/A
430N/Aimport java.awt.Composite;
430N/Aimport sun.java2d.SurfaceData;
430N/Aimport sun.java2d.loops.CompositeType;
430N/Aimport sun.java2d.loops.GraphicsPrimitive;
430N/Aimport sun.java2d.loops.GraphicsPrimitiveMgr;
430N/Aimport sun.java2d.loops.SurfaceType;
430N/Aimport sun.java2d.pipe.Region;
430N/Aimport sun.java2d.pipe.BufferedMaskBlit;
430N/Aimport static sun.java2d.loops.CompositeType.*;
430N/Aimport static sun.java2d.loops.SurfaceType.*;
430N/A
430N/Aclass D3DMaskBlit extends BufferedMaskBlit {
430N/A
430N/A static void register() {
430N/A GraphicsPrimitive[] primitives = {
430N/A new D3DMaskBlit(IntArgb, SrcOver),
430N/A new D3DMaskBlit(IntArgbPre, SrcOver),
430N/A new D3DMaskBlit(IntRgb, SrcOver),
430N/A new D3DMaskBlit(IntRgb, SrcNoEa),
430N/A new D3DMaskBlit(IntBgr, SrcOver),
430N/A new D3DMaskBlit(IntBgr, SrcNoEa),
430N/A };
430N/A GraphicsPrimitiveMgr.register(primitives);
430N/A }
430N/A
430N/A private D3DMaskBlit(SurfaceType srcType,
430N/A CompositeType compType)
430N/A {
430N/A super(D3DRenderQueue.getInstance(),
430N/A srcType, compType, D3DSurfaceData.D3DSurface);
430N/A }
430N/A
430N/A @Override
430N/A protected void validateContext(SurfaceData dstData,
430N/A Composite comp, Region clip)
430N/A {
430N/A D3DSurfaceData d3dDst = (D3DSurfaceData)dstData;
430N/A D3DContext.validateContext(d3dDst, d3dDst,
430N/A clip, comp, null, null, null,
430N/A D3DContext.NO_CONTEXT_FLAGS);
430N/A }
430N/A}