Commit Graph

77 Commits

Author SHA1 Message Date
Adam Jackson
9d8fc33cae composite: Move screen init before extension registration.
Otherwise, you'd still advertise the extension even if no screens
actually supported it, and the first Composite protocol request would
probably crash.
2009-08-20 17:11:57 -04:00
Michel Dänzer
842373104d Add support for RENDER BGRA formats. 2009-08-04 23:23:21 +02:00
Alan Coopersmith
8609a4e883 Correct some Sun license notices to Sun's standard X11 license format
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-05-15 11:24:15 -07:00
Aaron Plattner
a8cf63fd18 Export CompositeRegisterAlternateVisuals.
Drivers need this if they add visuals that require implicit redirection.  Add a
new SDK header, compositeext.h, to contain the prototype for this function.
2009-04-27 13:29:40 -07:00
Kristian Høgsberg
4a27618565 composite: Fix resource lookups 2009-04-14 16:21:04 -04:00
Havoc Pennington
1731882341 Set bg pixmap of composite overlay window to None (#20912)
Otherwise it's impossible to get the COW without a white
flash on the screen, because it's on top, mapped immediately,
and unaffected by composite redirection. This makes
initial login ugly when it doesn't need to be.
2009-04-03 11:23:28 -04:00
Keith Packard
f8dd80d13b Replace dixLookupResource by dixLookupResourceBy{Type,Class}
dixLookupResource attempted to automatically detect whether the caller
wanted a lookup by-type or by-class, unfortunately, it guessed wrong for
RT_NONE. Instead of trying to make the guess better, this patch just reverts
the unification and creates separate functions for each operation.
2009-03-09 13:08:09 -07:00
Peter Åstrand
f508446a2b Composite: Uninitialized borderClipX/borderClipY
Valgrind warned me about two other uninitialized variables, which are not
padding. Valgrind output at the end. I'm a bit unsure of what these should
be initialized to, is zero fine?
2009-03-06 19:43:10 -08:00
Paulo Cesar Pereira de Andrade
49f77fff14 Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.

  This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)

  LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.

  xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
Keith Packard
d26083fe02 Switching from Automatic to Manual redirect needs to unmap/remap
When changing a window from automatic redirection to manual redirection, the
parent clip list needs to be recomputed; the easy way to get that computed
right is to unmap/map the window, just as when redirecting the window the
first time.

Thanks to Owen Taylor for helping diagnose this.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-09-19 20:58:32 -07:00
Aaron Plattner
97b9374a8a Conditionalize Composite-based backing store on pScreen->backingStoreSupport.
(cherry picked from commit 3787660295)
2008-09-17 17:00:46 -07:00
Maarten Maathuis
f4e9a1a98f damage: choose less ambiguous function names 2008-08-31 17:46:26 +02:00
Maarten Maathuis
1861250cd7 {damage,exa}: sanitise damage
- Redo damage naming for more consistency.
- Call post submission functions only where appropriate.
- EXA can now live without it's odd damage workarounds.
2008-08-29 22:15:23 +02:00
Tomas Carnecky
ebea78cdba Prepare for array-index based devPrivates.
TODO: static indices can be made just an int; some indices
can be combined.
2008-08-28 18:05:40 -04:00
Adam Jackson
9757106bba Remove all empty extension reset hooks, replace with NULL. 2008-07-24 15:46:08 -04:00
Adam Jackson
100afae578 Bug #15586: (Correctly) refuse to redirect the root window. 2008-06-24 10:52:31 -04:00
James Cloos
04211c3532 Prevent the -wm command line option from causing a SEGV
The -wm (when mapped) option for the BackingStore support has been
causing the server to dereference a NULL pointer.

This has probably been the case since backing store has been
implemented on top of Composite.

It looks like (some of?) Composite didn’t expect its WIndowPtr
argument to be the root window.

In Composite’s compCheckRedirect() function we now avoid calling
compAllocPixmap() and compFreePixmap() when the pWin pointer’s
parent member is NULL, as is it the case with a server’s root window.

This addresses:

https://bugs.freedesktop.org/show_bug.cgi?id=15878
2008-05-12 03:03:13 -04:00
James Cloos
7e768c08f7 Clean up whitespace 2008-05-12 02:53:59 -04:00
Keith Packard
efa65a0317 Rework composite overlay window code to fix several resource management bugs.
The composite overlay window code had several misunderstandings of the
workings of the X server, in particular error handling paths would often
double-free objects. Clean all of this up by using resource destruction as
the sole mechanism for freeing resource-based objects.
2008-05-04 21:54:27 -07:00
Eamon Walsh
4d91b1d5e4 XACE: Adjust the location of the COMPOSITE creation hook.
Avoids incrementing the refcnt if the hook fails.
2008-02-28 21:52:32 -05:00
Eamon Walsh
5675ae1f72 XACE: Call the creation hook to properly label COMPOSITE window pixmaps. 2008-02-28 18:12:52 -05:00
Eamon Walsh
27bcf40cda XACE: Fix instances of DixUnknownAccess at hook callsites. 2008-02-28 16:43:43 -05:00
Maarten Maathuis
70c0592a97 Resize composite overlay window when the root window changes.
- This allows some compositing managers to work, even after randr12 has changed the root window size.
- Thanks to ajax for figuring out the best place to put this.
- Example:
	- xf86RandR12SetMode() calls EnableDisableFBAccess().
	- That calls xf86SetRootClip() which in turn calls ResizeChildrenWinSize().
	- The final step is the call to PositionWindow().
2008-02-17 11:21:01 +01:00
Eamon Walsh
26586a7ad5 Revert "registry: Register composite extension protocol names."
This reverts commit 166ef972fe.

Moving all the names into dix/registry.c
2007-11-20 17:27:37 -05:00
Eamon Walsh
a52c9b2a59 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/dispatch.c
	dix/property.c
	hw/xfree86/common/xf86VidMode.c
	include/xkbsrv.h
	render/glyph.c
	xkb/xkbActions.c
2007-11-05 19:08:36 -05:00
Aaron Plattner
f2e310132f Add CreatePixmap allocation hints.
These hints allow an acceleration architecture to optimize allocation of certain
types of pixmaps, such as pixmaps that will serve as backing pixmaps for
redirected windows.
2007-11-04 16:11:28 -08:00
Eamon Walsh
166ef972fe registry: Register composite extension protocol names. 2007-10-15 15:22:02 -04:00
Eamon Walsh
27612748e0 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/devices.c
2007-09-26 07:47:29 -04:00
Aaron Plattner
50fa8722d3 Set noCompositeExtension to TRUE when failing to initialize the extension (e.g. when Xinerama is enabled). 2007-09-20 14:00:33 -07:00
Eamon Walsh
97c150b61b Merge branch 'master' into XACE-SELINUX
Conflicts:

	afb/afbpntwin.c
	afb/afbscrinit.c
	afb/afbwindow.c
	cfb/cfb.h
	cfb/cfballpriv.c
	cfb/cfbscrinit.c
	cfb/cfbwindow.c
	configure.ac
	fb/wfbrename.h
	hw/xfree86/xf4bpp/ppcIO.c
	hw/xfree86/xf4bpp/ppcPntWin.c
	hw/xfree86/xf4bpp/ppcWindow.c
	hw/xfree86/xf8_32bpp/cfbscrinit.c
	mfb/mfb.h
	mfb/mfbpntwin.c
	mfb/mfbscrinit.c
	mfb/mfbwindow.c
	mi/miexpose.c

Note: conflicts caused by devPrivates rework vs. paintwindow changes.
2007-09-19 07:25:55 -04:00
Eric Anholt
e4d11e58ce Remove the PaintWindow optimization.
This was an attempt to avoid scratch gc creation and validation for paintwin
because that was expensive.  This is not the case in current servers, and the
danger of failure to implement it correctly (as seen in all previous
implementations) is high enough to justify removing it.  No performance
difference detected with x11perf -create -move -resize -circulate on Xvfb.
Leave the screen hooks for PaintWindow* in for now to avoid ABI change.
2007-09-13 00:08:53 +00:00
Eamon Walsh
0003ccfcdf xace: add new fields to resource access hook to allow parent resource objects
to be passed in at create time.  Also added a missing devPrivates initializer.
2007-09-05 11:18:36 -04:00
Keith Packard
f98dfec79d [COMPOSITE] Composite used for pixmap population on redirect. (Bug #7447)
compNewPixmap copies bits from the parent window to the redirected child
pixmap to populate the pixmap with reasonable data. It cannot always use
CopyArea as that only works across matching depths. Use Composite when
the depths do not match.
2007-09-01 21:14:22 -07:00
Eamon Walsh
c9ceb48780 xace: add hooks + new access codes: Composite extension 2007-08-31 11:03:54 -04:00
Eamon Walsh
4017d31902 devPrivates rework: since API is already broken, switch everything
over to new system.

Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
2007-08-28 09:28:25 -04:00
Adam Jackson
ae7f71a8b3 Implement core protocol backing store exclusively in terms of Composite.
Composite's automatic redirection is a more general mechanism than the
ad-hoc BS machinery, so it's much prettier to implement the one in terms
of the other.  Composite now wraps ChangeWindowAttributes and activates
automatic redirection for windows with backing store requested.  The old
backing store infrastructure is completely gutted: ABI-visible structures
retain the function pointers, but they never get called, and all the
open-coded conditionals throughout the DIX layer to implement BS are gone.

Note that this is still not a strictly complete implementation of backing
store, since Composite will throw the bits away on unmap and therefore
WhenMapped and Always hints are equivalent.
2007-08-25 15:08:20 -04:00
Aaron Plattner
951c058e78 Don't fail compScreenInit if the driver added its own alternate visuals. 2007-07-31 14:23:58 -07:00
Adam Jackson
aed6569309 Refactor how Composite adds visuals to the screen.
Besides being slightly simpler to read, it's now trivial to add a depth-16
visual to a depth-24 screen just by adding a line for it in the alternate
visual list.  Visuals for indexed depths are slightly tricky still.
2007-07-18 15:54:26 -04:00
Keith Packard
b2f9ca6ac4 Redirect fix: Manual + Automatic - Manual = Automatic
A window with redirect manual *and* redirect automatic which loses the
manual redirecting client becomes redirect automatic.
2007-07-10 21:33:55 -07:00
Michel Dänzer
5957aa6fdc Fix regression from recent composite changes.
One pWin->redirectDraw test was converted incorrectly, causing incorrect
rendering in some cases.
2007-07-09 08:47:05 +02:00
Keith Packard
f106c04b62 Have Composite always report server version.
It was reporting the lessor of the server and client versions, which doesn't
make sense with the 0.4 semantic change in clipping.
2007-07-03 14:47:19 -07:00
Keith Packard
4f88d68bdb Force advertised Composite version to 0.4 instead of using header version.
Installed protocol header version may be newer than the server code base.
Use internal version number for Composite extension to make sure the server
doesn't advertise capabilities it doesn't support.
2007-07-03 14:43:17 -07:00
Keith Packard
866f092ca0 Make Composite manual redirect windows not clip their parent.
This patch changes the semantics of manual redirect windows so that they no
longer affect the clip list of their parent. Doing this means the parent can
draw to the area covered by the child without using IncludeInferiors. More
importantly, this also means that the parent receives expose events when
that region is damaged by other actions.
2007-07-03 14:29:11 -07:00
Adam Jackson
4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Luo Jie
1f48995d66 Fix build of composite, dix, and randr when Xinerama is disabled. 2007-05-24 11:20:59 -07:00
Eric Anholt
0bfc3cc22d Disable composite when Xinerama is active.
It will likely take a decent bit of work to make that work right.
2007-03-27 17:34:00 -07:00
Eric Anholt
5e7936371c Disable Composite when the screen's visual is pseudocolor.
Rendering fails badly in this case, and I don't care enough to fix it.
2007-03-27 17:31:39 -07:00
Eric Anholt
8afc7e2eb3 Refuse to initialize Composite if Render is not present.
Composite relies on the presence of Render, in particular for the automatic
compositing.
2007-03-27 17:31:34 -07:00
Adam Jackson
9a0f25de7c Static cleanups, dead code deletion. 2007-03-25 12:27:01 -04:00
Eamon Walsh
04c721854f Convert callers of LookupWindow() to dixLookupWindow(). 2006-12-15 14:19:54 -05:00