[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg-devel
Subject: Re: [PATCH] Adds MIT-SHM AttachFd and CreateSegment requests
From: Adam Jackson <ajax () nwnk ! net>
Date: 2013-10-31 21:47:36
Message-ID: 1383256056.4483.41.camel () dmt
[Download RAW message or body]
On Thu, 2013-10-31 at 13:12 -0700, Keith Packard wrote:
> Passes shared memory segments by file descriptor, AttachFd passes from
> client to server, CreateSegment passes from server to client.
I was hoping for a patch to shmproto.txt, but there isn't one, le sigh.
We should really fix the MIT-SHM docs, Jon's reverse-engineered spec pdf
is full of enough handwave to be embarassing for us.
Failing that: I'm just a little cautious of calling this 1.2 without
some escape hatch for a 1.3. ShmQueryVersion currently has a bool for
shm pixmaps precisely because they might not be supported. Supposing
someone comes up with a comparable API for, say, win32, they'd be a bit
stuck, since the 1.3 idea of "pass a file descriptor" might not be a
thing the OS provides. Even if we don't cotton to non-unix
environments, we might find that one or the other is just too wacky to
try to support in the future.
So maybe something like:
---
#define ShmCapCreatePixmaps (1<<0)
#define ShmCapAttachFd (1<<1)
#define ShmCapCreateSegment (1<<2)
#define X_ShmQueryCapabilities 8
typedef struct _ShmQueryCapabilities {
CARD8 reqType;
CARD8 shmReqType;
CARD16 length;
} xShmQueryCapabilitiesReq;
#define sz_xShmQueryCapabilitiesReq 4
typedef struct {
CARD8 type;
CARD8 pad0;
CARD16 sequenceNumber;
CARD32 length;
CARD32 caps0;
CARD32 caps1;
CARD32 caps2;
CARD32 caps3;
CARD32 caps4;
CARD32 caps5;
} xShmQueryCapabilitiesReply;
#define sz_xShmQueryCapabilitiesReply 32
---
Where the cap bits start filling in from caps0.
Other than that:
Reviewed-by: Adam Jackson <ajax@redhat.com>
- ajax
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic