Re: source diver Q:
- From: Jan Kratochvil <rcpt-gtk-devel-list AT gnome org jankratochvil net>
- To: Abhishek Chitlangia <abhishek chitlangia jhu edu>
- Cc: gtk-devel-list gnome org, johanka <johanka root cz>
- Subject: Re: source diver Q:
- Date: Mon, 7 Jul 2003 12:25:17 +0200
Hi,
On Sun, 06 Jul 2003 21:51:35 +0200, Abhishek Chitlangia wrote:
> I'm a "shallow source diver", and am getting into the linux-fb part of
> gdk. I have a basic question
...
> impl->drawable_data.mem = gdk_display->fb_mem;
...
> Does this mean that the window's drawing memory region
> (drawable_data_mem) is initialized to the framebuffer's start address
> via <gdk_display->fb_mem>?
Yes.
> This seems uinlikely because every widget has its own gdkwindow.
But all these windows are displayed directly to the display memory.
For example pixmaps are only memory-mapped (not visible) and they have their
'impl->drawable_data.mem' set just to g_malloc()ed memory.
> I am sure I am missing something here. For one, is <drawable_data->mem>
> really the start of the drawing memory region of the window?
Yes, but you must be aware that 'start' is not the first pixel of such window
as its top-left pixel is shifted by 'GdkDrawableFBData->abs_x' and
'GdkDrawableFBData->abs_y' sized 'GdkDrawableFBData->width' and
'GdkDrawableFBData->height' (therefore its bottom-right pixel is at coors
'GdkDrawableFBData->abs_x+GdkDrawableFBData->width-1' and
'GdkDrawableFBData->abs_y+GdkDrawableFBData->height-1'.
> For another, am I wrong in assuming that when mmapping the </dev/fb0> file
> onto <gdk_display->fb_mem>, you get a linear reprsentation of the actual
> framebuffer pointed to by <gdk_display->fb_mem>?
It is so - mmaped(). You just must respect the actual display pixel
representation described by 'gdk_display->sinfo.visual' initialized by
FBIOGET_FSCREENINFO ioctl.
Lace
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]