nanogui: Patch for Shared Memory Pixmaps


Previous by date: 14 Aug 2001 15:21:19 -0000 Re: Patch for Shared Memory Pixmaps, Jordan Crouse
Next by date: 14 Aug 2001 15:21:19 -0000 Re: mwin on win32 (using cygwin), Greg Haerr
Previous in thread: 14 Aug 2001 15:21:19 -0000 Re: Patch for Shared Memory Pixmaps, Jordan Crouse
Next in thread:

Subject: Re: [nanogui] Re: Patch for Shared Memory Pixmaps
From: David Eger ####@####.####
Date: 14 Aug 2001 15:21:19 -0000
Message-Id: <Pine.LNX.4.33.0108141016190.295-100000@su13.eastnet.gatech.edu>

I have used this patch, and it has worked.  But then, there are a couple
of caveats; you will have to change some code.

(1) The passed parameter is no longer a pointer.  It is a shmid.  Pointers
will not work.  So you need to actually do System V memory calls in your
user code to get a new Sys V ShM area and use it.

(2) If you are NOT using ShM Pixmaps, then yes, you need to change the
third argument of GrNewPixmap from 0 to -1.  Yes, it's a pain.  Yes, I see
your point.

(2) The pixmap currently MUST be the same bit depth as the framebuffer.

Other than that, it should be golden.  If you have problems, let me know.

-David


On Tue, 14 Aug 2001, Jordan Crouse wrote:

> So what happens if I compile this patch into one of my existing programs and
> run it as is? (I am famous for using lots of pixmaps)..  Will it crash, or
> will it work as advertised?
>
> Jordan
>
> On Monday 13 August 2001 23:41, David T Eger mentioned:
> > Sorry about the wait.  Been busy cleaning up a Framebuffer driver.
> > Here's the patch. I haven't differentiated GrNewPixmap() into separate
> > functions (as Jordan suggested) from the standard code for several
> > reasons:
> >
> > (1) If we really do link statically and pass a pointer, then isn't the
> > client/server X model sort of misplaced?
> > (2) 0 is not an invalid SHM key, however -1 is an invalid SHM key, and
> > also an invalid pointer.  We will never have a one byte pixmap at the end
> > of memory
> > (3) I'm too lazy to rewrite it right now.
> >
> > -David Eger
> >

[ snip ]



Previous by date: 14 Aug 2001 15:21:19 -0000 Re: Patch for Shared Memory Pixmaps, Jordan Crouse
Next by date: 14 Aug 2001 15:21:19 -0000 Re: mwin on win32 (using cygwin), Greg Haerr
Previous in thread: 14 Aug 2001 15:21:19 -0000 Re: Patch for Shared Memory Pixmaps, Jordan Crouse
Next in thread:


Powered by ezmlm-browse 0.20.