FB-access-wrapper?
Thomas Winischhofer
thomas at winischhofer.net
Fri Jan 14 10:32:37 PST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Keith Packard wrote:
| Around 4 o'clock on Jan 14, Thomas Winischhofer wrote:
|
|
|>Is there any - reasonable (I don't intend to rewrite half of the XAA
|>code) - way to wrap ALL server functions that directly access video RAM
|>(apart from using the dead-slow shadow framebuffer)?
|
|
| Not really; the frame buffer code assumes a linear mmaped screen and
| doesn't like it if that isn't available.
|
| It seems like what you want is to mirror all of the graphics on both
sides
| of the link; draw twice for acceleratable functions and draw client-side
| only for pure software functions, with sync operations pushing bits
across
| as needed.
|
| So, accelerated rendering functions would look like:
|
| usbPolyFillRect (DrawablePtr d, GCPtr g, int n, xRectangle *r) {
| for (int i = 0; i < n; i++)
| usbFillOneRect (r[i]);
| fbPolyFillRect (d, g, n, r);
| }
|
| Make the screen point at the shadow frame buffer so that 'unknown'
| operations would hit that (and damage it).
|
| I've done this in the past with really slow (10Mb) links between the
| window system and the graphics device and it works fairly well.
Tried this... no better at all. It exactly the small stuff that produces
an enormous overhead. The accelerator setup makes the advantages of the
engine void. And the most important function (copyarea) can't be
accelerated since the source is always in system ram (since there is no
pixmap cache and no offscreen pixmaps).
But I have found a MUCH better solution. I don't refresh the areas when
RefreshArea is called. Instead, I create a box that "covers" all
submitted boxes and update this "large" box in the blockhandler.
This works fantastically fast - like in Windows.
Thomas
- --
Thomas Winischhofer
Vienna/Austria
thomas AT winischhofer DOT net *** http://www.winischhofer.net
twini AT xfree86 DOT org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFB6BBFzydIRAktyUcRAlFVAJ0cRAZ1iWRyPf4r5RP63qZxwCic7QCdHFEm
9TosmS0hX1qQmM1jBoHl8Gw=
=Y8Bf
-----END PGP SIGNATURE-----
More information about the xorg
mailing list