mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 20:14:43 +02:00
6851515: awt_p.h incorporates a chunk of the XRender header
Use XRender header directly rather than copying chunks locally Reviewed-by: anthony, ohair
This commit is contained in:
parent
d184c2ebce
commit
fdff41f711
2 changed files with 5 additions and 44 deletions
|
@ -337,7 +337,7 @@ getAllConfigs (JNIEnv *env, int screen, AwtScreenDataPtr screenDataPtr) {
|
|||
char errmsg[128];
|
||||
int xinawareScreen;
|
||||
void* xrenderLibHandle = NULL;
|
||||
XRenderFindVisualFormatFunc *XRenderFindVisualFormat = NULL;
|
||||
XRenderFindVisualFormatFunc* xrenderFindVisualFormat = NULL;
|
||||
int major_opcode, first_event, first_error;
|
||||
|
||||
if (usingXinerama) {
|
||||
|
@ -435,7 +435,7 @@ getAllConfigs (JNIEnv *env, int screen, AwtScreenDataPtr screenDataPtr) {
|
|||
#endif
|
||||
|
||||
if (xrenderLibHandle != NULL) {
|
||||
XRenderFindVisualFormat =
|
||||
xrenderFindVisualFormat =
|
||||
(XRenderFindVisualFormatFunc*)dlsym(xrenderLibHandle,
|
||||
"XRenderFindVisualFormat");
|
||||
}
|
||||
|
@ -454,8 +454,8 @@ getAllConfigs (JNIEnv *env, int screen, AwtScreenDataPtr screenDataPtr) {
|
|||
graphicsConfigs [ind]->awt_depth = pVITrue [i].depth;
|
||||
memcpy (&graphicsConfigs [ind]->awt_visInfo, &pVITrue [i],
|
||||
sizeof (XVisualInfo));
|
||||
if (XRenderFindVisualFormat != NULL) {
|
||||
XRenderPictFormat *format = XRenderFindVisualFormat (awt_display,
|
||||
if (xrenderFindVisualFormat != NULL) {
|
||||
XRenderPictFormat *format = xrenderFindVisualFormat (awt_display,
|
||||
pVITrue [i].visual);
|
||||
if (format &&
|
||||
format->type == PictTypeDirect &&
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include <X11/Xatom.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/keysymdef.h>
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#ifndef XAWT
|
||||
#include <Xm/CascadeB.h>
|
||||
#include <Xm/DrawingA.h>
|
||||
|
@ -120,48 +121,8 @@ typedef struct _DamageRect {
|
|||
|
||||
#ifndef HEADLESS
|
||||
|
||||
/* Note: until we include the <X11/extensions/Xrender.h> explicitly
|
||||
* we have to define a couple of things ourselves.
|
||||
*/
|
||||
typedef unsigned long PictFormat;
|
||||
#define PictTypeIndexed 0
|
||||
#define PictTypeDirect 1
|
||||
|
||||
typedef struct {
|
||||
short red;
|
||||
short redMask;
|
||||
short green;
|
||||
short greenMask;
|
||||
short blue;
|
||||
short blueMask;
|
||||
short alpha;
|
||||
short alphaMask;
|
||||
} XRenderDirectFormat;
|
||||
|
||||
typedef struct {
|
||||
PictFormat id;
|
||||
int type;
|
||||
int depth;
|
||||
XRenderDirectFormat direct;
|
||||
Colormap colormap;
|
||||
} XRenderPictFormat;
|
||||
|
||||
#define PictFormatID (1 << 0)
|
||||
#define PictFormatType (1 << 1)
|
||||
#define PictFormatDepth (1 << 2)
|
||||
#define PictFormatRed (1 << 3)
|
||||
#define PictFormatRedMask (1 << 4)
|
||||
#define PictFormatGreen (1 << 5)
|
||||
#define PictFormatGreenMask (1 << 6)
|
||||
#define PictFormatBlue (1 << 7)
|
||||
#define PictFormatBlueMask (1 << 8)
|
||||
#define PictFormatAlpha (1 << 9)
|
||||
#define PictFormatAlphaMask (1 << 10)
|
||||
#define PictFormatColormap (1 << 11)
|
||||
|
||||
typedef XRenderPictFormat *
|
||||
XRenderFindVisualFormatFunc (Display *dpy, _Xconst Visual *visual);
|
||||
/* END OF Xrender.h chunk */
|
||||
|
||||
typedef struct _AwtGraphicsConfigData {
|
||||
int awt_depth;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue