Acceleration of 2D operations for kdrive

Abhinav Duggal abhinavduggal at gmail.com
Tue Feb 6 03:45:52 PST 2007


Hi all,
Can i use mi functions for 2D acceleration of drawing lines, rectangle and
filling etc. The mi functions call the functions corresponding to entry in
GCOps.I am not very clear about this machine independent X. Correct me if i
am wrong.

_X_EXPORT void
miPolySegment(pDraw, pGC, nseg, pSegs)
    DrawablePtr pDraw;
    GCPtr       pGC;
    int         nseg;
    xSegment    *pSegs;
{
    int i;

    for (i=0; i<nseg; i++)
    {
        (*pGC->ops->Polylines)(pDraw, pGC, CoordModeOrigin,
2,(DDXPointPtr)pSegs);
        pSegs++;
    }
}
 If i give assign  Polylines pointer to my accelerated function i can get
line acceleration.Similarly I can use  miPolyRectangle for rectangle drawing
acceleration.This way I can accelerate these 2D functions.
If not this approach then can anyone elaborate on the following comment
given by Keith a little further.

>Of course, changing kdrive to add line acceleration should be easy; as
>you can see, the structure within the driver is not complicated. Patches
>are always welcome. It's not like kdrive is fixed in any way; there is
>no ABI or API guarantee necessary as the drivers are statically linked
>to the X server.


Also, how can i support video overlay features like image rotation ,
resizing and color conversion.
Thanks for help.


On 2/4/07, Alex Deucher <alexdeucher at gmail.com> wrote:
>
> On 2/3/07, Daniel Stone <daniel at fooishbar.org> wrote:
> > On Fri, Feb 02, 2007 at 02:04:42PM -0800, Keith Packard wrote:
> > > For short lines, software is almost always faster; the cost of setting
> > > up the line and synchronizing with the hardware swamps the benefit of
> > > using it. For long lines, you fill the screen fast enough that using
> the
> > > hardware doesn't make a huge difference. That's why I didn't bother
> > > adding hardware line hooks.
> >
> > (FWIW, this is the case on the Nokia 770 and N800.)
> >
>
> Do the 770 or the N800 have an sort of accelerated X server or is it
> just fbdev?  Just curious.
>
> Alex
>
> > Cheers,
> > Daniel
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.3 (GNU/Linux)
> >
> > iD8DBQFFxL+7RkzMgPKxYGwRAsrvAJ0T4B0Ivdafhq/21PkTQ6HPjiCwagCfWZnp
> > ohNSfjNCV94eVjWmaBTBIAU=
> > =45Lf
> > -----END PGP SIGNATURE-----
> >
> >
> > _______________________________________________
> > xorg mailing list
> > xorg at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/xorg
> >
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20070206/e17fe8de/attachment.html>


More information about the xorg mailing list