nanogui: implementing bitblt in a screen driver
Subject:
implementing bitblt in a screen driver
From:
Sean Machin ####@####.####
Date:
11 Nov 2005 00:39:28 +0000
Message-Id: <4373E795.4050704@yahoo.com>
Hi Greg and others,
I'm trying to get the bitblt function in my custom LCD driver to work.
My test client program defines
an offscreen area and draws a line into it :
p1 = GrNewPixmap(8,8,0);
assert(p1 != 0);
GrLine(p1, gc1, 0, 0, 7, 7);
This info. is then copied to the screen by a call to GrCopyArea() in
response to a mouse down event
later in the client program :
GrCopyArea(w1, gc1, 0,0, 8,8, p1,0,0,MWROP_SRCCOPY);
This works fine with the X11 screen driver. I've traced through the
execution of the memory
allocation and it all seems to work without error and the args passed in
look fine.
The problem I have is that when the blit function is called in my custom
written driver,
the data pointed to by srcpsd->addr is always zero, I was expecting that
to be populated
with the pixel info. I've checked that srcpsd->addr is pointing to the
same chunk of memory
allocated by the GrNewPixmap call. My mapmemgc function in the screen
driver is very simple,
it just saves the address passed in :
static MWBOOL LCD_mapmemgc(PSD mempsd,MWCOORD w,MWCOORD h,int planes,int
bpp,
int linelen,int size,void *addr) {
mempsd->addr = addr;
return 1;
}
Any ideas what could be going wrong?
Thanks,
Sean