mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
XQuartz: Add support for GLXPixmaps to the AppleDRI.
This involved wrapping some GCOps to get the proper behavior when using X11 raster ops mixed with OpenGL (see driWrap.c). This extends the AppleDRI protocol with create and destroy pixmap functions. The dri.c code has been extended quite a bit to enable this, and to initialize the wrapping of CreateGC for GCOps. This has been tested with tests/glxpixmap and proven to work with the new libGL. Existing applications seem to work fine too. Redraws all appear to be correct. There may be some bugs lurking that I haven't found yet. I plan to drive them out by extending the libGL test suite. (cherry picked from commit 630518766b01022c49fe3a9e7d501808f71b06e2)
This commit is contained in:
parent
970725d23e
commit
95052caa2c
7 changed files with 892 additions and 10 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
Copyright 2000 VA Linux Systems, Inc.
|
||||
Copyright (c) 2002 Apple Computer, Inc.
|
||||
Copyright (c) 2002, 2008, 2009 Apple Computer, Inc.
|
||||
All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
|
|
@ -153,13 +153,85 @@ typedef struct _AppleDRINotify {
|
|||
BYTE type; /* always eventBase + event type */
|
||||
BYTE kind;
|
||||
CARD16 sequenceNumber B16;
|
||||
Time time B32; /* time of change */
|
||||
CARD32 time B32; /* time of change */
|
||||
CARD32 pad1 B32;
|
||||
CARD32 arg B32;
|
||||
CARD32 pad3 B32;
|
||||
} xAppleDRINotifyEvent;
|
||||
#define sz_xAppleDRINotifyEvent 20
|
||||
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 driReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
CARD32 drawable B32;
|
||||
BOOL doubleSwap;
|
||||
CARD8 pad1, pad2, pad3;
|
||||
} xAppleDRICreateSharedBufferReq;
|
||||
|
||||
#define sz_xAppleDRICreateSharedBufferReq 16
|
||||
|
||||
typedef struct {
|
||||
BYTE type;
|
||||
BYTE data1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 stringLength B32; /* 0 on error */
|
||||
CARD32 width B32;
|
||||
CARD32 height B32;
|
||||
CARD32 pad1 B32;
|
||||
CARD32 pad2 B32;
|
||||
CARD32 pad3 B32;
|
||||
} xAppleDRICreateSharedBufferReply;
|
||||
|
||||
#define sz_xAppleDRICreateSharedBufferReply 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 driReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 screen B32;
|
||||
CARD32 drawable B32;
|
||||
} xAppleDRISwapBuffersReq;
|
||||
|
||||
#define sz_xAppleDRISwapBuffersReq 12
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType; /*1*/
|
||||
CARD8 driReqType; /*2*/
|
||||
CARD16 length B16; /*4*/
|
||||
CARD32 screen B32; /*8*/
|
||||
CARD32 drawable B32; /*12*/
|
||||
} xAppleDRICreatePixmapReq;
|
||||
|
||||
#define sz_xAppleDRICreatePixmapReq 12
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /*1*/
|
||||
BOOL pad1; /*2*/
|
||||
CARD16 sequenceNumber B16; /*4*/
|
||||
CARD32 length B32; /*8*/
|
||||
CARD32 width B32; /*12*/
|
||||
CARD32 height B32; /*16*/
|
||||
CARD32 pitch B32; /*20*/
|
||||
CARD32 bpp B32; /*24*/
|
||||
CARD32 size B32; /*28*/
|
||||
CARD32 stringLength B32; /*32*/
|
||||
} xAppleDRICreatePixmapReply;
|
||||
|
||||
#define sz_xAppleDRICreatePixmapReply 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType; /*1*/
|
||||
CARD8 driReqType; /*2*/
|
||||
CARD16 length; /*4*/
|
||||
CARD32 drawable B32; /*8*/
|
||||
} xAppleDRIDestroyPixmapReq;
|
||||
|
||||
#define sz_xAppleDRIDestroyPixmapReq 8
|
||||
|
||||
#ifdef _APPLEDRI_SERVER_
|
||||
|
||||
void AppleDRISendEvent (
|
||||
|
|
|
|||
Loading…
Reference in a new issue