On Sat, 15 Dec 2001, hzeng wrote:

> Hello,
>       I don't paint the colorkey in driver. And I have think that if app programe 
>ask for colorkey and set the colorkey value, 
> then the driver set the relatived registers . and if the app programe don't ask for 
>colorkey , the driver do nothing. Now it 
> seems that my thougnt is too simple. But I have another question, when we auto paint 
>the key color through the driver, if 
> the efficiency will be very slow ? I look at some founction in ati and nv' xv driver 
>in putvideo, it seems that they use 2D 
> founction, it's do that ? 

   The driver painting the key automatically is the default behavior.
Some hardware use blits rather than overlay so they don't have a key.
The simplest applications aren't expected to know about overlays or
keys.  They just call XvShmPutImage and the image is expected to show
up regardless of the mechanism.  Because of that, key painting is
automatic by default.

   The general idea is to cache the last area painted.  If it has
changed since, then repaint it.  Most drivers save a copy of the 
new cliplist with REGION_COPY() and compare it with the next one
with the RegionsEqual function.  See the logic in NVPutOverlayImage().

   As for painting the key you can use the xf86XVFillKeyHelper()
to paint it for you.


                        Mark.


_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to