Commit Graph

47 Commits

Author SHA1 Message Date
Adam Jackson
132b464d73 Remove a bunch of useless casts.
We've had void * for twenty years now people let's try to act like we
know how it works.
2009-01-22 02:11:16 -05:00
Paulo Cesar Pereira de Andrade
aa71ac1dd4 Add dependency tracking to sdksyms.c and export composite wrapper.
Thanks to David Miller for noticing a make problem with sdksyms.c
not being regenerated when sdksyms.sh is updated. This is not yet the
best solution; automake generates dependency for sdksyms.o, but the
build really should also regenerate sdksyms.c when sdksyms.o needs to
be regenerated.
  Export the symbols in miext/cw/cw.h. These symbols are in libxaa, and
at least the nvidia driver uses them. Maybe cw.h should be installed
in the sdk.
2008-12-10 00:36:41 -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
Eamon Walsh
b633d54b94 Merge branch 'master' into XACE-SELINUX
Conflicts:

	GL/glx/glxscreens.c
	hw/xnest/Screen.c
	render/glyph.c
	render/glyphstr.h
	render/render.c
2007-10-25 12:19:30 -04:00
Eric Anholt
4b14c9a9cd Replace calls to Glyphs screen hook with CompositeGlyphs and remove dead code.
Not all of the DDX/miext Glyphs hook implementations have been removed, but
they should be.
2007-10-19 16:34:54 -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
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
Eamon Walsh
42d6112ec2 xace: add hooks + new access codes: core protocol GC requests 2007-08-14 13:09:38 -04:00
Adam Jackson
4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Soren Sandmann Pedersen
4fe918b385 Fix bug 8871 - scrolling corruption with a compositing manager
Call miHandleExposures() in CopyArea/CopyPlane explicitly in cw to
generate GraphicsExposes correctly.
2007-04-26 12:41:01 -04:00
Eric Anholt
6ed08949af Move libcw setup to the only renderer requiring it (XAA).
Additionally, protect libcw setup behind checks for Render, to avoid
segfaulting if Render isn't available (xnest).

The previous setup was an ABI-preserving dance, which is better nuked now.
Now, anything that needs libcw must explicitly initialize it, and
miDisableCompositeWrapper (previously only called by EXA and presumably binary
drivers) is gone.
2007-03-27 17:31:28 -07:00
Daniel Stone
84683f19b4 get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULE
Get rid of almost all uses of these definitions.  They're still defined for
delinquent out-of-tree drivers, and also for the Mesa build.  As well as
for miinitext.c.  But largely gone.
2006-07-18 18:17:38 -04:00
Eric Anholt
53f74b6aa9 Bugzilla #5120, #7246: In CW's GC ops, validate the backing GC against the
backing drawable if the serial numbers differ.  Fixes crash in XAA which
occurred when the DDX bumped the serial number on the backing drawable and
expected it to get re-validated, and we didn't because the wrapped drawable
hadn't been bumped.
2006-06-16 10:14:30 -07:00
Adam Jackson
6bb2dc02a7 Coverity #337: Remove useless NULL check. 2006-03-15 16:01:47 +00:00
Lars Knoll
0693083335 render/picture.c Correctly initialize devPrivates variable in source only
pictures to 0
miext/cw/cw.h Don't try to access devPrivates of source only pictures
2006-03-06 21:00:09 +00:00
Adam Jackson
3fe482c77e Mark everything in misym.c as _X_EXPORT. 2006-02-15 19:05:55 +00:00
Eric Anholt
c3d1403672 Remove libcwrapper usage from xorg server modules. The libcwrapper is only
of (marginal) use in the drivers, and that usage remains.
2006-02-10 22:00:30 +00:00
Adam Jackson
b99dea9dcf Bug #4935: Fix includes. (Eric Anholt) 2005-12-09 18:32:46 +00:00
Kevin E Martin
7c00afd0ec Define XFree86Server only where it is required. 2005-12-02 06:02:45 +00:00
Kevin E Martin
da5d66f2ff Fix usage of XFree86LOADER/XFree86Module/IN_MODULE and update loadable
module builds to reflect this change.
2005-11-29 16:39:33 +00:00
Eric Anholt
ecaa46380e Bugzilla #4616:
- Merge various fb/ bits of COMPOSITE support from xserver, which weren't
    necessary before due to cw hiding the issues. Fixes offset calculations
    for a number of operations, and may pull some fixes that cairo has
    wanted for XAA as well.
- Add a new call, miDisableCompositeWrapper(), which a DDX can call to keep
    cw from getting initialized from the damage code. While it would be
    cleaner to have each DDX initialize it if it needs it, we don't have
    control over all of them (e.g. nvidia).
- Use the miDisableCompositeWrapper() to keep cw from getting set up for
    screens using EXA, because EXA is already aware of composite. Avoiding
    cw improved performance 0-35% on operations tested by ajax in x11perf.
2005-10-02 08:28:27 +00:00
Adam Jackson
9802106864 dist fixes for cw and GL (Donnie Berkholz, me) 2005-08-03 01:41:34 +00:00
Daniel Stone
e03198972c Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
    source files in the xserver/xorg tree, predicated on defines of
    HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
    <X11/fonts/foo.h>.
2005-07-03 07:02:09 +00:00
Daniel Stone
826a6f029f Continuing Makefile cleanup; add DIX_CFLAGS and XORG_CFLAGS everywhere. 2005-07-02 18:59:44 +00:00
Daniel Stone
ded56b1a74 Adding initial build system. 2005-07-01 20:29:53 +00:00
Markus Kuhn
44f4713a05 Encoding of numerous files changed to UTF-8 2004-12-04 00:43:13 +00:00
Eric Anholt
971755765d Bug #1101: Fix PaintWindow in the pixmap case when the window's origin is
not at the backing pixmap's origin. Resulted in incorrect rendering in
    at least aisleriot, fluxbox, and KDE apps, and probably many more.
    While here, move the ParentRelative loop above the drawable grab -- may
    improve correctness with ParentRelative background origins as well.
    Note that the border code doesn't handle ParentRelative yet.
2004-08-27 21:09:23 +00:00
Eric Anholt
5335bc8a06 Bug #1138: Wrap funcs in CW's GC ops as well. While this is unnecessary
according to the rules as I understand them (bug #1045), not everybody
    follows the rules. GC funcs were being called on the same GC from
    within GC ops, and the cwValidateGC caused a loop in the funcs chain
    that resulted in a crash, notably in cwPolylines.
2004-08-26 20:32:59 +00:00
Kevin E Martin
8784228500 Fix CopyArea for non-redir dst, redir src (Bug #1105, Eric Anholt). 2004-08-18 21:11:17 +00:00
Keith Packard
9da0c214ab Clip destination instead of source. Should be the same, but it looks nicer
to me.
Clean up transition between cheap and expensive GC wrappers by using the
    prologue and epilogue macros. Before, the GC would be left unvalidated
    sometimes which would cause all kinds of entertaining bugs against a
    DDX which cares (XAA).
2004-08-15 21:13:11 +00:00
Keith Packard
a68f350195 Remove debugging code which did a full tree walk on every window operation
Eliminate needless (and, it turns out, dangerous) call to ChangeGC on
    DestroyGCPrivate.
in cwSetWindowPixmap, check if the pixmap is the screen pixmap and disable
    the wrapper by setting the private to NULL.
2004-08-15 19:05:01 +00:00
Keith Packard
1e728c3e88 Copy bits from parent window when allocating pixmaps so that Background ==
None works.
Copy filter to backing picture during validation.
Mark picture serialNumber when setting Filter or Transform so Validate
    occurs.
Initialize xf86Screens[i]->pScreen to NULL so that RADEON driver doesn't
    crash during server reset using old pScreen.
2004-08-15 03:34:18 +00:00
Keith Packard
9433085179 Redraw window borders when switching window pixmaps around
Make cw "own" the window pixmaps by wrapping
    GetWindowPixmap/SetWindowPixmap.
2004-08-15 00:43:39 +00:00
Keith Packard
e483fe3ec3 Fix offsets again. Really, it works this time. Promise. 2004-08-14 21:57:58 +00:00
Keith Packard
e6216b48f5 Fix offsets, do whole region at once by using GC clipping 2004-08-14 21:36:10 +00:00
Keith Packard
cc3ad0ed43 Fix clip list computation and setting to ignore clip changes to "real"
GC/Picture and track serial numbers correctly when copying
    pCompositeClip down.
2004-08-14 19:53:36 +00:00
Eric Anholt
183c6d0645 Wrap CopyWindow in cw, which fixes scrolling in many apps. 2004-08-14 19:51:11 +00:00
Keith Packard
e61b5d38ab Use XLIB_SKIP_ARGB_VISUALS environment variable to disable all depth 32
visuals. Necessary to keep Flash from crashing.
Must call ValidateGC/ValidatePicture on "real" GC/Picture to ensure
    pCompositeClip is set correctly.
Need to take the composite clip from the "real" GC/Picture and turn it into
    the clientClip for the backing version.
Adjust pixmap screen origin to account for drawable->x/y Change debugging
    output a bit (disabled by default)
2004-08-14 07:12:37 +00:00
Eric Anholt
6e0228722c Fix various cw issues, including a couple reported by deronj:
- Fix wrapping of GC ops/funcs according to policy described in bug #1045.
- Remove ValidateGC/ValidatePictures on the redirected drawables/pictures
    -- it's not needed, and DDXs shouldn't be seeing redirected drawables
    in render or GC ops/funcs when cw is running.
- Mark all GC/Picture state as dirty when moving from redirected to
    non-redirected, since it hadn't been passed down in Change* or
    Validate* while redirected.
- Remove CreatePicture wrapper that didn't do anything.
- Comment on why AddTraps wrapper isn't needed.
2004-08-12 08:11:59 +00:00
Keith Packard
9d0213525f Paint to parent window instead of parent window's pixmap (helps for servers
that don't have a pixmap for the root)
Fix offsets for render drawing.
2004-08-12 00:09:30 +00:00
Keith Packard
2bdbc2c0d3 Clean up cw initialization, make sure wrappers re-wrap on exit. 2004-08-07 01:02:41 +00:00
Eric Anholt
e847bcda08 Fix missing ';' in cw.c and unwrap the render wrapper properly. 2004-08-06 00:31:28 +00:00
Eric Anholt
ae1580c494 - Add a new Render function, CopyPicture, which will update a picture with
the flagged bits from a source picture. Approved in principle by
    keithp.
- Use CopyPicture and SetTransform to update most of the backing picture's
    state in the composite wrapper. Filters are still missing.
- Don't allocate a picture private, now that we calculate clipping properly
    and don't need the serialNumber or stateChanges.
- Use the format of the source pixmap rather than generating the format
    from the window's visual.
- Wrap the rest of the Render primitives that were stubbed out before.
2004-08-05 18:24:58 +00:00
Eric Anholt
73e14bd611 - Always validate the backing GC in cwValidateGC, not just when the clip
list changes.
- Use FillTiled instead of FillSolid for painting tiled border/background
    pixmaps, and don't needlessly change the scratch GC's defaults.
- Use the preferred dixChangeGC instead of DoChangeGC.
- Simplify a silly loop and clean up a couple of comments.
2004-08-04 23:18:38 +00:00
Eric Anholt
bfbb40c28c Major improvements to Composite wrapper. Several issues remain, but it now
appears stable in limited testing.
- Allocate the picture private, avoiding segfault.
- Wrap PaintWindow to draw the background/border to the backing pixmap
    (based on Deron Johnson's comptran.c).
- Set the x_off/y_off returns to translate coordinates properly.
- Don't bother allocating temporary areas for the modified coordinates.
    Layers above are responsible for handling lower layers changing the
    arguments, so cw doesn't have to worry about it. mibstore.c has to do
    the allocation because it calls down twice (front buffer and backing
    store). (Suggested by keithp)
- Handle the mode argument to PolyPoint, Polylines, and FillPolygon.
- Remove some dead elements in the cw privates.
- Kill a prototype warning in compinit.c by adding the cw.h header.
2004-08-03 05:49:48 +00:00
Eric Anholt
d690556d49 Integrate COMPOSITEWRAP branch including composite wrapper. This code still
has several issues, including:
- CopyWindow and PaintWindow wrappers missing (will be done soon)
- Some segfaults seen in the Render wrappers.
- Xprt server build breaks with Composite.
- DDXs must be recompiled for Composite due to VisualRec size change.
- Composite bugs pointed out by Deron Johnson in email.
Also, reorder XFixes initialization according to comments by Keith which
    are also in xserver CVS.
2004-07-31 08:24:14 +00:00