Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/solaris/classes/sun/java2d/xr/XRBackend.java
32288 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.jules.*;39import sun.java2d.pipe.*;4041public interface XRBackend {4243public void freePicture(int picture);4445public void freePixmap(int pixmap);4647public int createPixmap(int drawable, int depth, int width, int height);4849public int createPicture(int drawable, int formatID);5051public long createGC(int drawable);5253public void freeGC(long gc); /* TODO: Use!! */5455public void copyArea(int src, int dst, long gc, int srcx, int srcy,56int width, int height, int dstx, int dsty);5758public void putMaskImage(int drawable, long gc, byte[] imageData,59int sx, int sy, int dx, int dy,60int width, int height, int maskOff,61int maskScan, float ea);6263public void setGCClipRectangles(long gc, Region clip);6465public void GCRectangles(int drawable, long gc, GrowableRectArray rects);6667public void setClipRectangles(int picture, Region clip);6869public void setGCExposures(long gc, boolean exposure);7071public void setGCForeground(long gc, int pixel);7273public void setPictureTransform(int picture, AffineTransform transform);7475public void setPictureRepeat(int picture, int repeat);7677public void setFilter(int picture, int filter);7879public void renderRectangle(int dst, byte op, XRColor color,80int x, int y, int width, int height);8182public void renderRectangles(int dst, byte op, XRColor color,83GrowableRectArray rects);8485public void renderComposite(byte op, int src, int mask, int dst,86int srcX, int srcY, int maskX, int maskY,87int dstX, int dstY, int width, int height);8889public int XRenderCreateGlyphSet(int formatID);9091public void XRenderAddGlyphs(int glyphSet, GlyphList gl,92List<XRGlyphCacheEntry> cacheEntries,93byte[] pixelData);9495public void XRenderFreeGlyphs(int glyphSet, int[] gids);9697public void XRenderCompositeText(byte op, int src, int dst,98int maskFormatID,99int xSrc, int ySrc, int xDst, int yDst,100int glyphset, GrowableEltArray elts);101102public int createRadialGradient(float centerX, float centerY,103float innerRadius, float outerRadius,104float[] fractions, int[] pixels,105int repeat);106107public int createLinearGradient(Point2D p1, Point2D p2, float[] fractions,108int[] pixels, int repeat);109110public void setGCMode(long gc, boolean copy);111112public void renderCompositeTrapezoids(byte op, int src, int maskFormat,113int dst, int srcX, int srcY,114TrapezoidList trapList);115}116117118