Re: Linux-fbdev-users Digest, Vol 1, Issue 332

"Nathan King" <[email protected]> Thu, 29 Jun 2006 15:20:26 -0500
Newsgroups gmane.linux.fbdev.user
Message-ID <[email protected]>
Hi James,

I can mmap it, but I found that using file operations to access it was
about 2-3 times faster than accessing it through a mmap'ed buffer. Is
it possible I'm doing that wrong? Here's my stuff for that:

fbfd = open("/dev/fb0", O_RDONLY);
fbp = (unsigned char *)mmap(0, screensize, PROT_READ, MAP_SHARED, fbfd, 0);

Then I read from fbp with memcpy and memcmp. If I'm going against some
long upheld programming convention feel free to throw things at me.

Thanks,
Nathan


>
> On Wed, 2006-06-28 at 18:08 -0600, Nathan King wrote:
> > What's the preferred way to read a block of pixels from the screen?
> > I'm developing something like a remote desktop app, and I haven't
> > found a whole lot of documentation on this. Right now I'm opening
> > the /dev/fb0 device and accessing it by means of lseek/read, file
> > descriptor style. This seems reasonably fast but I feel there must be
> > a better way.
>
> Can you mmap /dev/fb0?
>
> Regards,
> James.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642