2370N/A/*
2685N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
2370N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2370N/A *
2370N/A * This code is free software; you can redistribute it and/or modify it
2370N/A * under the terms of the GNU General Public License version 2 only, as
2685N/A * published by the Free Software Foundation. Oracle designates this
2370N/A * particular file as subject to the "Classpath" exception as provided
2685N/A * by Oracle in the LICENSE file that accompanied this code.
2370N/A *
2370N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2370N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2370N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2370N/A * version 2 for more details (a copy is included in the LICENSE file that
2370N/A * accompanied this code).
2370N/A *
2370N/A * You should have received a copy of the GNU General Public License version
2370N/A * 2 along with this work; if not, write to the Free Software Foundation,
2370N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2370N/A *
2685N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2685N/A * or visit www.oracle.com if you need additional information or have any
2685N/A * questions.
2370N/A */
2370N/A
2370N/Apackage sun.java2d.xr;
2370N/A
2370N/A/**
2370N/A * XRender pipeline backend interface.
2370N/A * Currently there are two different backends implemented:
2370N/A * - XRBackendJava: And experimental backend, generating protocol directly using java-code and xcb's socket handoff functionality.
2370N/A * - XRBackendNative: Native 1:1 binding with libX11.
2370N/A */
2370N/A
2370N/Aimport java.awt.geom.*;
2370N/Aimport java.util.*;
2370N/A
2370N/Aimport sun.font.*;
2370N/Aimport sun.java2d.jules.*;
2370N/Aimport sun.java2d.pipe.*;
2370N/A
2370N/Apublic interface XRBackend {
2370N/A
2370N/A public void freePicture(int picture);
2370N/A
2370N/A public void freePixmap(int pixmap);
2370N/A
2370N/A public int createPixmap(int drawable, int depth, int width, int height);
2370N/A
2370N/A public int createPicture(int drawable, int formatID);
2370N/A
2370N/A public long createGC(int drawable);
2370N/A
2370N/A public void freeGC(long gc); /* TODO: Use!! */
2370N/A
2370N/A public void copyArea(int src, int dst, long gc, int srcx, int srcy,
2370N/A int width, int height, int dstx, int dsty);
2370N/A
2370N/A public void putMaskImage(int drawable, long gc, byte[] imageData,
2370N/A int sx, int sy, int dx, int dy,
2370N/A int width, int height, int maskOff,
2370N/A int maskScan, float ea);
2370N/A
2370N/A public void setGCClipRectangles(long gc, Region clip);
2370N/A
2370N/A public void GCRectangles(int drawable, long gc, GrowableRectArray rects);
2370N/A
2370N/A public void setClipRectangles(int picture, Region clip);
2370N/A
2370N/A public void setGCExposures(long gc, boolean exposure);
2370N/A
2370N/A public void setGCForeground(long gc, int pixel);
2370N/A
2370N/A public void setPictureTransform(int picture, AffineTransform transform);
2370N/A
2370N/A public void setPictureRepeat(int picture, int repeat);
2370N/A
2370N/A public void setFilter(int picture, int filter);
2370N/A
2370N/A public void renderRectangle(int dst, byte op, XRColor color,
2370N/A int x, int y, int width, int height);
2370N/A
2370N/A public void renderRectangles(int dst, byte op, XRColor color,
2370N/A GrowableRectArray rects);
2370N/A
2370N/A public void renderComposite(byte op, int src, int mask, int dst,
2370N/A int srcX, int srcY, int maskX, int maskY,
2370N/A int dstX, int dstY, int width, int height);
2370N/A
2370N/A public int XRenderCreateGlyphSet(int formatID);
2370N/A
2370N/A public void XRenderAddGlyphs(int glyphSet, GlyphList gl,
2370N/A List<XRGlyphCacheEntry> cacheEntries,
2370N/A byte[] pixelData);
2370N/A
2370N/A public void XRenderFreeGlyphs(int glyphSet, int[] gids);
2370N/A
2370N/A public void XRenderCompositeText(byte op, int src, int dst,
2370N/A int maskFormatID,
2370N/A int xSrc, int ySrc, int xDst, int yDst,
2370N/A int glyphset, GrowableEltArray elts);
2370N/A
2370N/A public int createRadialGradient(Point2D inner, Point2D outer,
2370N/A float innerRadius, float outerRadius,
2370N/A float[] fractions, int[] pixels,
2370N/A int repeat, AffineTransform transform);
2370N/A
2370N/A public int createLinearGradient(Point2D p1, Point2D p2, float[] fractions,
2370N/A int[] pixels, int repeat,
2370N/A AffineTransform transform);
2370N/A
2370N/A public void setGCMode(long gc, boolean copy);
2370N/A
2370N/A public void renderCompositeTrapezoids(byte op, int src, int maskFormat,
2370N/A int dst, int srcX, int srcY,
2370N/A TrapezoidList trapList);
2370N/A}