nanogui: what need to do about Blit();


Previous by date: 8 Jun 2001 19:26:20 -0000 Re: Use of docs an keyboard, Greg Haerr
Next by date: 8 Jun 2001 19:26:20 -0000 Re: GrPeekEvent() causes client to crash, Greg Haerr
Previous in thread: 8 Jun 2001 19:26:20 -0000 what need to do about Blit();, jacky
Next in thread:

Subject: Re: [nanogui] what need to do about Blit();
From: "Greg Haerr" ####@####.####
Date: 8 Jun 2001 19:26:20 -0000
Message-Id: <012f01c0f050$a2674260$3aba46a6@xmission.com>

: i find that in many display drivers files such as scr_x11.c there are
: blit() function.
: but i think the Blit() function is too complex to understand.
: though the Blit() function which in scr_svga.c is very easy, i am not
: sure whether it is right.
: anyone could tell me what need to do about Blit()?
: thank you!

Blit is simple in concept, but sometimes tricky to
write correctly.  Basically, blit just transfers a 
block of bits from source to destination.  This is
specified with x,y,w,h source and destination parameters.
In the normal, simple blit implementations, say
for 8bpp framebuffer, see microwin/src/drivers/fblin8.c.
This driver copies a section of bytes from one "framebuffer"
to another.  Note that a framebuffer is just user-accessible
memory  (some have the cool property that when you
write to them, you see the results on the screen...)

The complex blit driver has to be written when the
device doesn't actually support memory-accessed screen
RAM.  This is the case for x11 and svga.  Thus, we keep
a second copy in the x11 driver.  The SVGA driver isn't
as complicated since you can ask the driver for the 
screen bits and then copy them to the destination yourself.
This is exactly what I've done for the screen-to-screen
blit, but you will also need a mem-to-screen blit.

Regards,

Greg


Previous by date: 8 Jun 2001 19:26:20 -0000 Re: Use of docs an keyboard, Greg Haerr
Next by date: 8 Jun 2001 19:26:20 -0000 Re: GrPeekEvent() causes client to crash, Greg Haerr
Previous in thread: 8 Jun 2001 19:26:20 -0000 what need to do about Blit();, jacky
Next in thread:


Powered by ezmlm-browse 0.20.