public void compose(Raster srcIn, Raster dstIn, WritableRaster dstOut) {

        if(!srcCM.isCompatibleRaster(srcIn)) {
            // awt.48=The srcIn raster is incompatible with src ColorModel
            throw new IllegalArgumentException(Messages.getString("awt.48")); //$NON-NLS-1$
        }

        if(!dstCM.isCompatibleRaster(dstIn)) {
            // awt.49=The dstIn raster is incompatible with dst ColorModel
            throw new IllegalArgumentException(Messages.getString("awt.49")); //$NON-NLS-1$
        }

        if(dstIn != dstOut){
            if(!dstCM.isCompatibleRaster(dstOut)) {
                // awt.4A=The dstOut raster is incompatible with dst ColorModel
                throw new IllegalArgumentException(Messages.getString("awt.4A")); //$NON-NLS-1$
            }
            dstOut.setDataElements(0, 0, dstIn);
        }
        WritableRaster src;
        if(srcIn instanceof WritableRaster){
            src = (WritableRaster) srcIn;
        }else{
            src = srcIn.createCompatibleWritableRaster();
            src.setDataElements(0, 0, srcIn);
        }
        srcSurf = new ImageSurface(srcCM, src);
        dstSurf = new ImageSurface(dstCM, dstOut);

        int w = Math.min(srcIn.getWidth(), dstOut.getWidth());
        int h = Math.min(srcIn.getHeight(), dstOut.getHeight());

        JavaBlitter.getInstance().blit(0, 0, srcSurf, 0, 0, dstSurf,
                w, h, composite, null, null);

    }