[Xcb] XCBImage

Barton C Massey bart at cs.pdx.edu
Fri Mar 4 14:23:53 PST 2005


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

In message <20050304203309.GC11747 at minilop.net> you wrote:
> On Fri, Mar 04, 2005 at 08:45:50PM +0100, Vincent Torri wrote:
> > Or should i ask the user to pass these informations to the functions ?
> > 
> > I would prefer the second choice, but feel free to convince me to do like
> > Xlib ;)
> 
> Argue in *support* of an Xlib design decision? Me? ;-)
> 
> 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?


More information about the xcb mailing list