[Xcb] XCBImage

Vincent Torri Vincent.Torri at iecn.u-nancy.fr
Fri Mar 4 23:10:57 PST 2005

I think that i'll leave the xcbimage like it is right now, create a
XCBShminfo struct that contains shmseg, shmid and shmaddr. I don't really
know if i add the readonly field. It will not be difficult to change this

Jamey: if i'm not wrong, XCBShmAttach requires a XCBshmSEG and the 2 other
fields (shmid and readonly fields)

i'm also writing a test for this stuff.


On Fri, 4 Mar 2005, Barton C Massey wrote:

> Just talking off the top of my head here, but it seems to me
> that the XShmSegmentInfo.{shmseg,shmaddr} might normally be
> reused with different images.  So it might make sense to
> pass a structure containing shared memory information
> separately from a structure containing other image
> information.  Or not...I don't feel strongly about it.
> We need some scenarios.  Build it however to start with, and
> we'll write/port some code to use it and see how it goes.
>     Bart
> >
> > The XCBShmSEG XID and the base address of the associated segment are
> > tied together with the address of the XCBImage data. (These correspond
> > to the shmseg and shmaddr fields of XShmSegmentInfo. The other two
> > fields of XShmSegmentInfo only matter for ShmAttach, though, which
> > surely doesn't need a structure to have its arguments passed in.) I
> > think it'd only make the interface error-prone to expect the application
> > to keep track of those values separately.
> >
> > I am inclined to store these values differently than Xlib does, though.
> > XCBShmCreateImage should return an XCBShmImage structure, which should
> > contain an XCBImage and these two extra values. Your version of
> > XCBShmPutImage et al should only accept an XCBShmImage. Xlib just
> > assumes that the (void *obdata) in the XImage handed to it is an
> > XShmSegmentInfo, but we can get the C compiler to check for us.
> >
> > Does that seem reasonable?
> _______________________________________________
> xcb mailing list
> xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb

More information about the xcb mailing list