Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openjdk-multiarch-jdk8u
Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/windows/native/sun/java2d/d3d/D3DRenderQueue.h
32288 views
1
/*
2
* Copyright (c) 2007, 2008, 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 D3DRenderQueue_h_Included
27
#define D3DRenderQueue_h_Included
28
29
#include "D3DContext.h"
30
#include "D3DSurfaceData.h"
31
32
/*
33
* The following macros are used to pick values (of the specified type) off
34
* the queue.
35
*/
36
#define NEXT_VAL(buf, type) (((type *)((buf) += sizeof(type)))[-1])
37
#define NEXT_BYTE(buf) NEXT_VAL(buf, unsigned char)
38
#define NEXT_INT(buf) NEXT_VAL(buf, jint)
39
#define NEXT_FLOAT(buf) NEXT_VAL(buf, jfloat)
40
#define NEXT_BOOLEAN(buf) (jboolean)NEXT_INT(buf)
41
#define NEXT_LONG(buf) NEXT_VAL(buf, jlong)
42
#define NEXT_DOUBLE(buf) NEXT_VAL(buf, jdouble)
43
44
/*
45
* Increments a pointer (buf) by the given number of bytes.
46
*/
47
#define SKIP_BYTES(buf, numbytes) buf += (numbytes)
48
49
/*
50
* Extracts a value at the given offset from the provided packed value.
51
*/
52
#define EXTRACT_VAL(packedval, offset, mask) \
53
(((packedval) >> (offset)) & (mask))
54
#define EXTRACT_BYTE(packedval, offset) \
55
(unsigned char)EXTRACT_VAL(packedval, offset, 0xff)
56
#define EXTRACT_BOOLEAN(packedval, offset) \
57
(jboolean)EXTRACT_VAL(packedval, offset, 0x1)
58
59
D3DContext *D3DRQ_GetCurrentContext();
60
D3DSDOps *D3DRQ_GetCurrentDestination();
61
void D3DRQ_ResetCurrentContextAndDestination();
62
HRESULT D3DRQ_MarkLostIfNeeded(HRESULT res, D3DSDOps *d3dops);
63
64
#endif /* D3DRenderQueue_h_Included */
65
66