1 /*
2 * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.java2d.xr;
27
28 /**
29 * XRender pipeline backend interface.
30 * Currently there are two different backends implemented:
31 * - XRBackendJava: And experimental backend, generating protocol directly using java-code and xcb's socket handoff functionality.
32 * - XRBackendNative: Native 1:1 binding with libX11.
33 */
34
35 import java.awt.geom.*;
36 import java.util.*;
37
38 import sun.font.*;
39 import sun.java2d.pipe.*;
40
41 public interface XRBackend {
42
43 public void freePicture(int picture);
44
45 public void freePixmap(int pixmap);
46
47 public int createPixmap(int drawable, int depth, int width, int height);
48
49 public int createPicture(int drawable, int formatID);
50
51 public long createGC(int drawable);
52
53 public void freeGC(long gc); /* TODO: Use!! */
54
55 public void copyArea(int src, int dst, long gc, int srcx, int srcy,
56 int width, int height, int dstx, int dsty);
57
58 public void putMaskImage(int drawable, long gc, byte[] imageData,
59 int sx, int sy, int dx, int dy,
60 int width, int height, int maskOff,
61 int maskScan, float ea);
62
63 public void setGCClipRectangles(long gc, Region clip);
64
65 public void GCRectangles(int drawable, long gc, GrowableRectArray rects);
66
67 public void setClipRectangles(int picture, Region clip);
68
69 public void setGCExposures(long gc, boolean exposure);
70
71 public void setGCForeground(long gc, int pixel);
72
73 public void setPictureTransform(int picture, AffineTransform transform);
74
75 public void setPictureRepeat(int picture, int repeat);
76
77 public void setFilter(int picture, int filter);
78
79 public void renderRectangle(int dst, byte op, XRColor color,
80 int x, int y, int width, int height);
81
|
1 /*
2 * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.java2d.xr;
27
28 /**
29 * XRender pipeline backend interface.
30 * Currently there are two different backends implemented:
31 * - XRBackendNative: Native 1:1 binding with libX11.
32 * - XRBackendDeferred: Deferrs protocol submission, so that aa tiles
33 * can be submitted in one go.
34 */
35
36 import java.awt.geom.*;
37 import java.util.*;
38
39 import sun.font.*;
40 import sun.java2d.pipe.*;
41
42 public interface XRBackend {
43
44 public void initResources(int parentXID);
45
46 public void freePicture(int picture);
47
48 public void freePixmap(int pixmap);
49
50 public int createPixmap(int drawable, int depth, int width, int height);
51
52 public int createPicture(int drawable, int formatID);
53
54 public long createGC(int drawable);
55
56 public void freeGC(long gc); /* TODO: Use!! */
57
58 public void copyArea(int src, int dst, long gc, int srcx, int srcy,
59 int width, int height, int dstx, int dsty);
60
61 public void maskedComposite(byte op, int src, int eaMask, int dst,
62 int srcX, int srcY, int dstX, int dstY, int width,
63 int height, int maskScan, int maskOff, byte[] mask, float ea);
64
65 public void setGCClipRectangles(long gc, Region clip);
66
67 public void GCRectangles(int drawable, long gc, GrowableRectArray rects);
68
69 public void setClipRectangles(int picture, Region clip);
70
71 public void setGCExposures(long gc, boolean exposure);
72
73 public void setGCForeground(long gc, int pixel);
74
75 public void setPictureTransform(int picture, AffineTransform transform);
76
77 public void setPictureRepeat(int picture, int repeat);
78
79 public void setFilter(int picture, int filter);
80
81 public void renderRectangle(int dst, byte op, XRColor color,
82 int x, int y, int width, int height);
83
|