Path: blob/master/src/java.desktop/unix/classes/sun/java2d/xr/XRBackend.java
41159 views
/*1* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package sun.java2d.xr;2627/**28* XRender pipeline backend interface.29* Currently there are two different backends implemented:30* - XRBackendJava: And experimental backend, generating protocol directly using java-code and xcb's socket handoff functionality.31* - XRBackendNative: Native 1:1 binding with libX11.32*/3334import java.awt.geom.*;35import java.util.*;3637import sun.font.*;38import sun.java2d.pipe.*;3940public interface XRBackend {4142public void freePicture(int picture);4344public void freePixmap(int pixmap);4546public int createPixmap(int drawable, int depth, int width, int height);4748public int createPicture(int drawable, int formatID);4950public long createGC(int drawable);5152public void freeGC(long gc); /* TODO: Use!! */5354public void copyArea(int src, int dst, long gc, int srcx, int srcy,55int width, int height, int dstx, int dsty);5657public void putMaskImage(int drawable, long gc, byte[] imageData,58int sx, int sy, int dx, int dy,59int width, int height, int maskOff,60int maskScan, float ea);6162public void setGCClipRectangles(long gc, Region clip);6364public void GCRectangles(int drawable, long gc, GrowableRectArray rects);6566public void setClipRectangles(int picture, Region clip);6768public void setGCExposures(long gc, boolean exposure);6970public void setGCForeground(long gc, int pixel);7172public void setPictureTransform(int picture, AffineTransform transform);7374public void setPictureRepeat(int picture, int repeat);7576public void setFilter(int picture, int filter);7778public void renderRectangle(int dst, byte op, XRColor color,79int x, int y, int width, int height);8081public void renderRectangles(int dst, byte op, XRColor color,82GrowableRectArray rects);8384public void renderComposite(byte op, int src, int mask, int dst,85int srcX, int srcY, int maskX, int maskY,86int dstX, int dstY, int width, int height);8788public int XRenderCreateGlyphSet(int formatID);8990public void XRenderAddGlyphs(int glyphSet, GlyphList gl,91List<XRGlyphCacheEntry> cacheEntries,92byte[] pixelData);9394public void XRenderFreeGlyphs(int glyphSet, int[] gids);9596public void XRenderCompositeText(byte op, int src, int dst,97int maskFormatID,98int xSrc, int ySrc, int xDst, int yDst,99int glyphset, GrowableEltArray elts);100101public int createRadialGradient(float centerX, float centerY,102float innerRadius, float outerRadius,103float[] fractions, int[] pixels,104int repeat);105106public int createLinearGradient(Point2D p1, Point2D p2, float[] fractions,107int[] pixels, int repeat);108109public void setGCMode(long gc, boolean copy);110111}112113114