nanogui: what's the use of physpixels in clientfb.c?
Subject:
Re: [nanogui] what's the use of physpixels in clientfb.c?
From:
####@####.####
Date:
8 Feb 2002 03:01:34 -0000
Message-Id: <008001c1b04c$c33380a0$2b64a8c0@rdcenter.com>
> : Hi,in GrOpenClientFramebuffer,I think frame_map is
> : equivalent to psd->addr,if true,what's the use of
> : physpixels?
>
> That's just a static global that holds the framebuffer
> address of the singly-allowed client since there
> isn't access to the server-sided psd-> structure to
> get any other address (all this runs on the client
> side, which normally doesn't have an open framebuffer)
I am sorry I didn't express clearly,my meaning is:
in scr_fb.c:
psd->size = (psd->size + getpagesize () - 1)
/ getpagesize () * getpagesize ();
psd->addr = mmap(NULL, psd->size,
PROT_READ|PROT_WRITE,MAP_SHARED,fb,0);
in clientfb.c:
frame_offset = (((long)finfo.smem_start) -
(((long)finfo.smem_start)&~(PAGE_SIZE-1)));
frame_len = finfo.smem_len + frame_offset;
frame_map = (unsigned char *)mmap(NULL,
frame_len, PROT_READ|PROT_WRITE,MAP_SHARED,
frame_fd, 0);
physpixels = frame_map + frame_offset;
I think frame_map is equivalent to psd->addr,
on server side using the psd->addr to draw,
so I think in client should use frame_map,
and not physpixels.
Thank you very much!