xserver-multidpi/dix
Tiago Vignatti 8976e9766e dix: adds support for none root window background
It lets the driver notify the server whether it can draw a background when
'-background none' option is used by the system platform. Use cases for that
could be video drivers performing mode-setting in kernel time, before X is up,
so a seamless transition would happen until X clients start to show up.

If the driver can copy the framebuffer cleanly then it can set the flag
(canDoBGNoneRoot), otherwise the server will fallback to the normal behaviour.
The system must explicit indicates willingness of doing so through
'-background none'. We could do this option as default; in such case,
malicious users would be able to steal the framebuffer with a bit of tricks.

For instance, I can see the content of my nVidia Quadro FX 580 framebuffer
old X session modifying a bit nv driver:

     xf86DPMSInit(pScreen, xf86DPMSSet, 0);

-    /* Clear the screen */
-    if(pNv->xaa) {
-        /* Use the acceleration engine */
-        pNv->xaa->SetupForSolidFill(pScrn, 0, GXcopy, ~0);
-        pNv->xaa->SubsequentSolidFillRect(pScrn,
-            0, 0, pScrn->displayWidth, pNv->offscreenHeight);
-        G80DmaKickoff(pNv);
-    } else {
-        /* Use a slow software clear path */
-        memset(pNv->mem, 0, pitch * pNv->offscreenHeight);
-    }
+    pScreen->canDoBGNoneRoot = TRUE;

The commit is originally based on discussions happened on xorg-devel:
http://lists.freedesktop.org/archives/xorg-devel/2010-June/009755.html

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Acked-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-11-11 23:24:43 +02:00
..
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
atom.c Misc coding style cleanup 2010-05-13 06:16:48 +07:00
buildatoms XFree86 4.3.0.1 2003-11-14 16:49:22 +00:00
BuiltInAtoms R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00
colormap.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
cursor.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
deprecated.c dix: remove dixLookupResource - we don't have any users left. 2009-09-07 10:51:16 +10:00
devices.c input: move proximity state into ProximityClassRec. 2010-10-22 16:18:59 +10:00
dispatch.c Comparison between pointer and integer in latest dix/dispatch.c 2010-10-13 10:20:06 -07:00
dispatch.h xserver: delete pervasively use of DISPATCH_PROC 2010-09-28 16:45:05 +03:00
dixfonts.c dixfonts: Deobfuscate GC ops calls. 2010-09-13 15:55:17 -07:00
dixutils.c dix: optimize CallCallbacks 2010-10-13 09:24:06 -07:00
enterleave.c Use GetCurrentRootWindow or equivalent instead of spriteTrace[0]. 2010-10-13 15:58:12 +10:00
enterleave.h dix: call SetFocusOut and LeaveWindow when disabling a device. 2009-08-03 10:11:48 +10:00
eventconvert.c Add support for per-axis valuator modes (Relative/Absolute) 2010-10-22 13:37:57 +10:00
events.c Use GetCurrentRootWindow or equivalent instead of spriteTrace[0]. 2010-10-13 15:58:12 +10:00
extension.c Replace malloc/strlen/strcpy with strdup. 2010-08-27 19:05:48 -04:00
ffs.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
gc.c Un-export CreateScratchGC now that nothing external uses it. 2010-09-13 15:58:08 -07:00
getevents.c Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-api 2010-11-11 12:54:46 +10:00
globals.c dix: delete logo hack screen saver 2010-11-11 23:20:35 +02:00
glyphcurs.c Replace dixChangeGC with calls directly to the right variant. 2010-05-13 17:14:07 -07:00
grabs.c Remove more superfluous if(p!=NULL) checks around free(p). 2010-11-11 08:29:54 +10:00
initatoms.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
inpututils.c dix: remove valuator_mask_copy_valuators, not needed anymore. 2010-10-22 11:02:53 +10:00
main.c dix: remove proc tables initialization 2010-09-28 16:46:46 +03:00
Makefile.am Move mi/miregion.c to dix/region.c 2010-06-05 17:48:20 -07:00
pixmap.c Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
privates.c Introduce per-object per-screen privates. 2010-09-18 11:17:18 +02:00
property.c Fix property and selection devPrivate allocation. 2010-09-10 11:44:12 -07:00
protocol.txt Add DRI2 requests to protocol.txt 2009-08-28 23:29:05 -04:00
ptrveloc.c Remove superfluous if(p!=NULL) checks around free(p); p=NULL; 2010-11-11 08:22:59 +10:00
region.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
registry.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
resource.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
selection.c Fix property and selection devPrivate allocation. 2010-09-10 11:44:12 -07:00
swaprep.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
swapreq.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
tables.c dix: remove proc tables initialization 2010-09-28 16:46:46 +03:00
window.c dix: adds support for none root window background 2010-11-11 23:24:43 +02:00
Xserver-dtrace.h.in Update Sun license notices to current X.Org standard form 2009-12-16 17:11:35 -08:00
Xserver.d Update Sun license notices to current X.Org standard form 2009-12-16 17:11:35 -08:00