Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderer.h
41159 views
1
/*
2
* Copyright (c) 2019, 2021, 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
#ifndef MTLRenderer_h_Included
27
#define MTLRenderer_h_Included
28
29
#include "sun_java2d_pipe_BufferedRenderPipe.h"
30
#include "MTLContext.h"
31
#include "MTLGraphicsConfig.h"
32
#import "MTLLayer.h"
33
34
#define BYTES_PER_POLY_POINT \
35
sun_java2d_pipe_BufferedRenderPipe_BYTES_PER_POLY_POINT
36
#define BYTES_PER_SCANLINE \
37
sun_java2d_pipe_BufferedRenderPipe_BYTES_PER_SCANLINE
38
#define BYTES_PER_SPAN \
39
sun_java2d_pipe_BufferedRenderPipe_BYTES_PER_SPAN
40
41
void MTLRenderer_DrawLine(MTLContext *mtlc, BMTLSDOps * dstOps,
42
jint x1, jint y1, jint x2, jint y2);
43
void MTLRenderer_DrawPixel(MTLContext *mtlc, BMTLSDOps * dstOps,
44
jint x, jint y);
45
void MTLRenderer_DrawRect(MTLContext *mtlc, BMTLSDOps * dstOps,
46
jint x, jint y, jint w, jint h);
47
void MTLRenderer_DrawPoly(MTLContext *mtlc, BMTLSDOps * dstOps,
48
jint nPoints, jint isClosed,
49
jint transX, jint transY,
50
jint *xPoints, jint *yPoints);
51
void MTLRenderer_DrawScanlines(MTLContext *mtlc, BMTLSDOps * dstOps,
52
jint count, jint *scanlines);
53
void MTLRenderer_DrawParallelogram(MTLContext *mtlc, BMTLSDOps * dstOps,
54
jfloat fx11, jfloat fy11,
55
jfloat dx21, jfloat dy21,
56
jfloat dx12, jfloat dy12,
57
jfloat lw21, jfloat lw12);
58
void MTLRenderer_DrawAAParallelogram(MTLContext *mtlc, BMTLSDOps * dstOps,
59
jfloat fx11, jfloat fy11,
60
jfloat dx21, jfloat dy21,
61
jfloat dx12, jfloat dy12,
62
jfloat lw21, jfloat lw12);
63
void MTLRenderer_FillRect(MTLContext *mtlc, BMTLSDOps * dstOps,
64
jint x, jint y, jint w, jint h);
65
void MTLRenderer_FillSpans(MTLContext *mtlc, BMTLSDOps * dstOps,
66
jint count, jint *spans);
67
void MTLRenderer_FillParallelogram(MTLContext *mtlc, BMTLSDOps * dstOps,
68
jfloat fx11, jfloat fy11,
69
jfloat dx21, jfloat dy21,
70
jfloat dx12, jfloat dy12);
71
void MTLRenderer_FillAAParallelogram(MTLContext *mtlc, BMTLSDOps * dstOps,
72
jfloat fx11, jfloat fy11,
73
jfloat dx21, jfloat dy21,
74
jfloat dx12, jfloat dy12);
75
76
#endif /* MTLRenderer_h_Included */
77
78