Commit Graph

387 Commits

Author SHA1 Message Date
Keith Packard 2dc138922b Rename region macros to eliminate screen argument
This is a combination of a huge mechanical patch and a few small
fixups required to finish the job. They were reviewed separately, but
because the server does not build without both pieces, I've merged
them together at this time.

The mechanical changes were performed by running the included
'fix-region' script over the whole tree:

$ git ls-files | grep -v '^fix-' | xargs ./fix-region

And then, the white space errors in the resulting patch were fixed
using the provided fix-patch-whitespace script.

$ sh ./fix-patch-whitespace

Thanks to Jamey Sharp for the mighty fine sed-generating sed script.

The hand-done changes involve removing functions from dix/region.c
that duplicate inline functions in include/regionstr.h, along with
their declarations in regionstr.h, mi.h and mispans.h.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-05 18:59:00 -07:00
Keith Packard 9b6f5f549d Change region implementation names to eliminate the 'mi' prefix
This prepares the file to be moved from mi to dix. This patch
was done mechanically with the included scripts 'fix-miregion' run over
the entire X server and 'fix-miregion-private' run over
include/regionstr.h and mi/miregion.c.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-05 17:47:32 -07:00
Jamey Sharp e7fae9ecc4 Move each screen's root-window pointer into ScreenRec.
Many references to the WindowTable array already had the corresponding
screen pointer handy, which meant they usually looked like
"WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of
keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.

Since dix uses this data, a screen private entry isn't appropriate.

xf86-video-dummy currently uses WindowTable, so it needs to be updated
to reflect this change.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03 14:03:23 -07:00
Jamey Sharp 6a84cd9434 Replace dixChangeGC with calls directly to the right variant.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13 17:14:07 -07:00
Jamey Sharp e2929db7b7 dixChangeGC callers: Use ChangeGCVal instead of XID almost everywhere.
The exceptions are ProcChangeGC and CreateGC.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13 17:13:48 -07:00
Jamey Sharp 65cedf3905 Kill DoChangeGC in favor of dixChangeGC.
This doesn't change any behavior, but it isn't clear whether NullClient
is correct in all cases. As ajax says,

> For most of these changes, I think it's correct to use NullClient,
> since they are server-initiated changes and should not fail for (eg)
> xace reasons. ... At any rate, you're certainly not changing any
> semantics by leaving them all as NullClient, so this patch can't be
> more wrong than before.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-12 18:09:55 -07:00
Mikhail Gusarov 3f3ff971ec Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to
plain alloc/calloc/realloc/free/strdup.

X* functions are still exported from server and x* macros are still defined in
header file, so both ABI and API are not affected by this change.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-13 00:22:37 +07:00
Jamey Sharp a2c716eaf6 fb: track screens' installed colormaps as screen privates.
Several DDXes allow each screen to have at most one (or in some cases,
exactly one) installed colormap. These all use the same pattern: Declare
a global-lifetime array of MAXSCREENS ColormapPtrs, and index it by
screen number. This patch converts most of those to use screen privates
instead.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-04-23 15:32:19 +03:00
Keith Packard 28b7b2b8d0 unifdef -B -DRENDER to always include RENDER code
This patch was created with:

git ls-files '*.[ch]' | while read f; do unifdef -B -DRENDER -o $f $f; done

Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-19 09:26:10 -07:00
Oliver McFadden aeae6637b5 fb: fbFinishScreenInit: leaked_storage: Variable "(visuals|depths)" goes out of scope
Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-21 15:20:27 -07:00
Pierre-Loup A. Griffais a6bd5d2e48 Fix source pictures getting random transforms after 2d6a8f6683.
*xoff and *yoff were uninitialized for source-only pictures.x

Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-27 14:03:03 -08:00
Alan Coopersmith c9726bbe31 Update Sun license notices to current X.Org standard form
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-16 17:11:35 -08:00
Keith Packard a72c65e917 fb: Adjust transform or composite coordinates for pixman operations
Windows (or even pixmaps, in some cases) may not sit at the origin of
the containing pixmap, so any coordinates relative to the drawable
must be adjusted. For destinations and untransformed sources, the
operation coordinates are adjusted. For transformed sources, the
transform matrix is adjusted.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11 11:51:45 -08:00
Keith Packard bd567061c8 Split fbGetDrawable into fbGetDrawablePixmap and fbGetPixmapBitsData
These two sub-macros each perform half of the original macro work and
the old macro is now implemented in terms of the new ones. This makes
way for new code which wants to know the underlying pixmap for a
window instead of just getting a pointer to the bits.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11 11:51:28 -08:00
Keith Packard 6133505297 Revert "Fix clipping when windows are used as sources"
This reverts commit e9aa61e9f0.

Conflicts:

	fb/fbpict.c

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11 11:51:22 -08:00
Keith Packard 071b3c1810 Revert "Use IncludeInferiors when copying windows before compositing."
This reverts commit 7c7f0c2c6a.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11 11:51:14 -08:00
Keith Packard 8e640d6b13 Revert "Reserve space for two GC values in copy_drawable()."
This reverts commit 08df24555c.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11 11:51:00 -08:00
Keith Packard 0816c5482c Revert "fb: Don't crash if copy_drawable() returns NULL."
This reverts commit 66a9616d64.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11 11:49:38 -08:00
Michel Dänzer 66a9616d64 fb: Don't crash if copy_drawable() returns NULL.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24634 .

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-30 08:37:12 -08:00
Soeren Sandmann f450be9992 Add xoff and yoff to drawable->x and drawable->y in create_bits_picture().
These are 0, except when the drawable is a redirected window.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-14 16:09:37 +10:00
Eamon Walsh 1bdc9ec617 Fix "warning: left-hand operand of comma expression has no effect"
Signed-off-by: Eamon Walsh <efw@eamonwalsh.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-07 11:00:50 +10:00
Michel Dänzer 842373104d Add support for RENDER BGRA formats. 2009-08-04 23:23:21 +02:00
Soren Sandmann Pedersen 08df24555c Reserve space for two GC values in copy_drawable().
Pointed out by Pierre Willenbrock.
2009-07-09 17:23:04 -04:00
Søren Sandmann Pedersen 7c7f0c2c6a Use IncludeInferiors when copying windows before compositing.
Part of bug 22484.
2009-07-06 13:06:50 -04:00
Søren Sandmann Pedersen e9aa61e9f0 Fix clipping when windows are used as sources
The new clipping rules:

	- client clips happen after transformation
	- pixels unavailable due to the hierarchy are undefined

The first one is implemented in pixman; the second one is realized by
making a copy of window sources (to prevent out-of-bounds access).
2009-06-18 12:36:11 -04:00
Søren Sandmann Pedersen ebfd6688d1 Make compositing with transformed windows work again.
The coordinate translation was broken in pretty much every way
imaginable.
2009-05-10 23:27:56 -04:00
Eamon Walsh 57aff88c7d Fix most remaining deprecated resource lookups.
Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
2009-04-29 01:04:37 -04:00
Maarten Maathuis 734b23e598 fb: add fbDoCopy and fbCopyRegion compatibility wrappers. 2009-02-11 14:35:17 +01:00
Maarten Maathuis 2e76958d30 fb: move some code to mi 2009-02-06 18:42:39 +01:00
Paulo Cesar Pereira de Andrade b1dac41fb3 Use libtool convenience libraries and better "symbol" table.
All .a libraries were converted to .la, and instead of linking the
Xorg binary with a mix of .a and .la, and adding some libraries more
then once in the command line, etc, now it generates a single libxorg.la
from all the required convenience libraries, and links with a dummy
xorg.c (that should usually be the file with the main function...).
This removes the requirement of some things like libosandcommon and
libinit, that existed to circumvent problems when linking multiple
.a and .la in the final Xorg binary.

  The "symbol table" is now generated dynamically, by a shell script,
with an embedded gawk parser that parses cpp output. The new file
sdksyms.sh is generated by hand by analyzing all Makefile.am's and
making it create a sdksyms.c file, that includes all sdk headers that
will add symbols for the Xorg binary. Module headers aren't read, and
a in 2 files it was required to add a "<hash>ifndef XorgLoader" around
declarations shared between the Xorg binary and libextmod. A few
other changes were added to other sdk headers, like preventing
multiple inclusion, or including other headers to satisfy dependencies.

  This should be a lot more portable, and better (hopefully properly)
using libtool to generate convenience libraries.
2008-12-07 02:22:19 -02: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
Paulo Cesar Pereira de Andrade 180bad8477 Add visibility flags to XSERVER_CFLAGS.
This is done to actually change DIX_CFLAGS, as not all "modules" use
XORG_CFLAGS.
  Also export the symbols that are required by other modules after
the change.
2008-12-02 02:50:45 -02:00
Paulo Cesar Pereira de Andrade fb22d4d928 Remove declarations of symbols that are never defined.
These symbols were removed from the X Server, or never declared.
  One symbol that may need special attention is XkbBuildCoreState(),
that doesn't have a prototype anywhere, but is called from
xkb/xkbEvents.c:XkbFilterEvents(), and also used by the macros
XkbStateFieldFromRec() and XkbGrabStateFromRec() defined in
include/xkbstr.h.
  fb/wfbrename.h also may need some cleanup, as it makes several
"renames" of non existing symbols.
2008-11-30 01:33:20 -02:00
Paulo Cesar Pereira de Andrade d6cbd4511e Export symbols defined in the sdk.
This is the biggest "visibility" patch. Instead of doing a "export"
symbol on demand, export everything in the sdk, so that if some module
fails due to an unresolved symbol, it is because it is using a symbol
not in the sdk.

  Most exported symbols shouldn't really be made visible, neither
advertised in the sdk, as they are only used by a single shared object.

  Symbols in the sdk (or referenced in sdk macros), but not defined
anywhere include:
XkbBuildCoreState()
XkbInitialMap
XkbXIUnsupported
XkbCheckActionVMods()
XkbSendCompatNotify()
XkbDDXFakePointerButton()
XkbDDXApplyConfig()
_XkbStrCaseCmp()
_XkbErrMessages[]
_XkbErrCode
_XkbErrLocation
_XkbErrData
XkbAccessXDetailText()
XkbNKNDetailMaskText()
XkbLookupGroupAndLevel()
XkbInitAtoms()
XkbGetOrderedDrawables()
XkbFreeOrderedDrawables()
XkbConvertXkbComponents()
XkbWriteXKBSemantics()
XkbWriteXKBLayout()
XkbWriteXKBKeymap()
XkbWriteXKBFile()
XkbWriteCFile()
XkbWriteXKMFile()
XkbWriteToServer()
XkbMergeFile()
XkmFindTOCEntry()
XkmReadFileSection()
XkmReadFileSectionName()
InitExtInput()
xf86CheckButton()
xf86SwitchCoreDevice()
RamDacSetGamma()
RamDacRestoreDACValues()
xf86Bpp
xf86ConfigPix24
xf86MouseCflags[]
xf86SupportedMouseTypes[]
xf86NumMouseTypes
xf86ChangeBusIndex()
xf86EntityEnter()
xf86EntityLeave()
xf86WrapperInit()
xf86RingBell()
xf86findOptionBoolean()
xf86debugListOptions()
LoadSubModuleLocal()
LoaderSymbolLocal()
getInt10Rec()
xf86CurrentScreen
xf86ReallocatePciResources()
xf86NewSerialNumber()
xf86RandRSetInitialMode()
fbCompositeSolidMask_nx1xn
fbCompositeSolidMask_nx8888x0565C
fbCompositeSolidMask_nx8888x8888C
fbCompositeSolidMask_nx8x0565
fbCompositeSolidMask_nx8x0888
fbCompositeSolidMask_nx8x8888
fbCompositeSrc_0565x0565
fbCompositeSrc_8888x0565
fbCompositeSrc_8888x0888
fbCompositeSrc_8888x8888
fbCompositeSrcAdd_1000x1000
fbCompositeSrcAdd_8000x8000
fbCompositeSrcAdd_8888x8888
fbGeneration
fbIn
fbOver
fbOver24
fbOverlayGeneration
fbRasterizeEdges
fbRestoreAreas
fbSaveAreas
composeFunctions
VBEBuildVbeModeList()
VBECalcVbeModeIndex()
TIramdac3030CalculateMNPForClock()
shadowBufPtr
shadowFindBuf()
miRRGetScreenInfo()
RRSetScreenConfig()
RRModePruneUnused()
PixmanImageFromPicture()
extern int miPointerGetMotionEvents()
miClipPicture()
miRasterizeTriangle()
fbPush1toN()
fbInitializeBackingStore()
ddxBeforeReset()
SetupSprite()
InitSprite()
DGADeliverEvent()

  SPECIAL CASES
o defined as _X_INTERNAL
	xf86NewInputDevice()
o defined as static
	fbGCPrivateKey
	fbOverlayScreenPrivateKey
	fbScreenPrivateKey
	fbWinPrivateKey
o defined in libXfont.so, but declared in xorg/dixfont.h
	GetGlyphs()
	QueryGlyphExtents()
	QueryTextExtents()
	ParseGlyphCachingMode()
	InitGlyphCaching()
	SetGlyphCachingMode()
2008-11-29 23:56:06 -02:00
Paulo Cesar Pereira de Andrade 31285d063e Make visible symbols required by xorg modules.
This patch exports all symbols required by the compilable
(in a x86 linux computer) xorg/driver/* modules.
  Still missing symbols worth mentioning are:

sunleo
	miFindMaxBand no longer available

intel	(uxa/uxa-accel.c)
	fbShmPutImage no longer available (and should have been static)

mga
	MGAGetClientPointer (should come from matrox's libhal)

  This is not a definitive "visibility" patch, as all it does is to
export missing symbols, but the modules that current don't compile,
may require more symbols once fixed, and third party drivers should
also require more symbols exported.
  A "definitive" patch should export symbols defined in the sdk.
2008-11-28 01:55:11 -02:00
Jeremy Huddleston 9c5fc7762e Partially reverts commit 505c216d03.
I don't know how the hell git-cherrypick messed that up to delete fbwindow.c
2008-10-03 11:24:34 -07:00
Jeremy Huddleston 505c216d03 Added dep on applewmproto 1.1.0
(cherry picked from commit b350b06674)
2008-10-03 11:11:37 -07:00
Adam Jackson b1a3173473 Fix bad preprocessor line 2008-10-02 17:03:21 -04: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 856db05b58 Unifdef sgi. 2008-07-23 13:37:42 -04:00
Daniel Stone 446fe9eecd Dead code removal
Remove a whole bunch of code that was never built, be it entire files or
just dead ifdefs.
2008-07-17 21:37:50 +03:00
Adam Jackson 9719354ae0 Check for __amd64__, not __x86_64__.
Spiritual revert of 1fa4de80fc.  Intel's C
compiler claims to be gcc-compatible; if they're not defining the same
macros as gcc then that's their bug, not ours.  Even if we were to do
this aliasing we should do it once and for all in servermd.h.
2008-06-24 14:37:06 -04:00
Adam Jackson b55fbca4f0 Bug #12414: Create full-fledged pixmaps in fb24_32ReformatTile().
... instead of creating pixmaps that only fb knows about, which will
have no devPrivates for any other subsystem and thus cause havoc if
(when) they leak out.
2008-06-20 13:27:32 -04:00
Eamon Walsh 60f64af075 Fix "warning: passing argument 1 of 'pixman_fill' from incompatible pointer type". 2008-06-13 21:23:31 -04:00
Adam Jackson f31bd087e8 Death to mfb.
Anyone still interested in 1 or 4 bpp framebuffers, talk to fb.
2008-06-13 10:51:18 -04:00
Peter Hutterer e73a03d589 fb: shut up two compiler warnings. 2008-05-20 10:54:32 +09:30
Tilman Sauerbeck d3d00d9258 Removed fbpseudocolor.h from sdk_HEADERS. 2008-04-19 12:54:40 +02:00
Adam Jackson 5bdc419879 Remove fbpseudocolor
"An experimental pseudocolor emulation layer.  Not fully completed,
currently only works for 16bpp."  That was almost four years ago.
It still doesn't work, only one driver even attempts to use it, it
contains an ad-hoc implementation of damage, and should really be
done up in Composite now anyway.
2008-04-19 04:06:19 -04:00
Matt Turner 1fa4de80fc Check for __x86_64__ when we check for __amd64__
It seems Intel C Compiler neglects to define __amd64__, __amd64, or
amd64, but *does* define __x86_64__.
2008-04-12 20:39:18 +02:00
Adam Jackson 24bebdded4 fbFillRegionTiled() is now dead code.
Only ever called from the old PaintWindow* screen hooks, but those are
gone now.  As a pleasant side effect, fb loses its #ifdef PANORAMIX.
2008-02-22 15:22:38 -05:00
Eamon Walsh c8feb73f58 Merge branch 'master' into XACE-SELINUX
Conflicts:

	Xext/EVI.c
	Xext/bigreq.c
	Xext/cup.c
	Xext/dpms.c
	Xext/fontcache.c
	Xext/mitmisc.c
	Xext/xcmisc.c
	Xext/xf86bigfont.c
	Xext/xtest.c
	configure.ac
	dbe/dbe.c
	hw/darwin/darwin.h
	hw/darwin/darwinEvents.c
	hw/darwin/iokit/xfIOKit.h
	hw/darwin/iokit/xfIOKitCursor.c
	hw/darwin/quartz/fullscreen/fullscreen.c
	hw/darwin/quartz/fullscreen/quartzCursor.c
	hw/darwin/quartz/quartz.c
	hw/darwin/quartz/quartzCommon.h
	hw/darwin/quartz/quartzCursor.c
	hw/darwin/quartz/xpr/dri.c
	hw/darwin/quartz/xpr/dristruct.h
	hw/darwin/quartz/xpr/xprCursor.c
	hw/darwin/quartz/xpr/xprFrame.c
	hw/xfree86/modes/xf86RandR12.c
	include/cursor.h
	miext/rootless/rootlessCommon.h
	miext/rootless/rootlessScreen.c
	miext/rootless/rootlessWindow.c
	render/picturestr.h

Trying to pick up the pieces from the darwin churn here...
2007-12-13 18:38:25 -05:00
Adam Jackson fa47910045 Clean up many #if 0. 2007-12-02 12:40:25 -05:00
Eamon Walsh 709c1a70c8 Remove some duplicate include statements. 2007-11-20 15:18:02 -05:00
Eamon Walsh 2d17f47cc7 Merge branch 'master' into XACE-SELINUX
Conflicts:

	hw/xnest/Pixmap.c
	include/dix.h
2007-11-19 18:10:46 -05:00
Aaron Plattner f797c96845 Save pixmap allocation hints into the PixmapRec. 2007-11-15 12:21:25 -08: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
Daniel Stone 34cdf06e4c fb: Remove usage of alloca
Replace with heap storage.
2007-11-05 14:34:42 +00: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 c3f7b86255 Merge branch 'master' into XACE-SELINUX
Conflicts:

	os/access.c
2007-10-17 15:00:54 -04:00
Dodji Seketeli a5bd536869 fbcmap_mi.c: add a missing api
* fb/fbcmap_mi.c:
         (fbSetVisualTypesAndMasks): added this entry point that was missing.
         This is useful so that servers using this entry point can use fbcmap_mi.c,
         and be obliged to stick to fbcmap.c. Note that fbcmap.c does implement this
         entry point. Up to now, kdrive based server could not use fbcmap_mi.c because this
         entry point was missing. The will allow Xephyr to properly use GL.
2007-10-02 16:55:17 +02:00
Alan Hourihane c11a27ef85 Add the FB_ACCESS_WRAPPER checks 2007-09-27 14:55:40 +01:00
Alan Hourihane e0bb33b3d2 Fix bug #12286 2007-09-27 14:55:40 +01: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 8554707326 Merge branch 'master' into XACE-SELINUX
Conflicts:

	include/miscstruct.h
	mi/mibstore.c
	mi/midispcur.c
	os/Makefile.am
2007-08-28 07:25:21 -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
Søren Sandmann Pedersen 943dd6ad99 Revert "Revert "Require pixman 0.9.5; Use pixman_image_set_source_clipping() to fix"" since the pixman changes have been pushed now.
This reverts commit 57f7f2a532.
2007-08-23 12:15:03 -04:00
Eric Anholt 57f7f2a532 Revert "Require pixman 0.9.5; Use pixman_image_set_source_clipping() to fix"
The corresponding pixman code hasn't been pushed, so revert until the code is
ready.

This reverts commit 53941c8e68.
2007-08-22 09:02:03 -07:00
Eric Anholt d0dc9698ae Revert "Fix <pixman.h> include to <pixman/pixman.h>"
The pixman headers have been located under pixman-1/ instead of pixman/ since
around 2007-08-06, and pixman-1.pc has the updated include paths to account
for this.

This reverts commit feb1b3e455.
2007-08-22 09:00:45 -07:00
Alan Hourihane feb1b3e455 Fix <pixman.h> include to <pixman/pixman.h> 2007-08-22 16:54:29 +01:00
Søren Sandmann Pedersen 53941c8e68 Require pixman 0.9.5; Use pixman_image_set_source_clipping() to fix
bug 11620 (reported by Jens Stroebel.
2007-08-21 14:26:14 -04:00
Aaron Plattner 6a32a96d8d stride is in FbBits-sized chunks, but xoff is not.
Fixes corruption problems with composite rendering to redirected windows in
depth 16.
2007-08-16 17:43:29 -07:00
Aaron Plattner 32666d7722 Bug #12015: Use the right offsets in the dst arguments of pixman_blt. 2007-08-16 14:57:32 -07:00
Søren Sandmann Pedersen aa3c6aaaab Require pixman-1 0.9.4, update pixman includes to new scheme 2007-08-06 19:00:59 -04:00
Aaron Plattner 74feba4d77 Don't unwrap too early in libwfb for Composite.
Don't call fbFinishWrap until the pixman_image_t that stores the pointer is
actually freed.  This prevents corruption or crashes caused by accessing a
wrapped pointer after the wrapping is torn down.
2007-08-06 14:22:49 -07:00
Eamon Walsh e34fcd2bf4 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/devices.c
	dix/property.c
	include/dix.h
2007-08-02 14:27:03 -04:00
Alan Coopersmith 7c0ca27f6d "fbpict.c", line 215: void function cannot return value 2007-07-11 17:16:59 -07:00
Adam Jackson bcb2352742 Clean up unused #ifdefs from fb. 2007-07-05 15:56:25 -04:00
Adam Jackson 4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Aaron Plattner 1e189ed1da Handle tileStride > 1 in fbEvenTile.
Patch courtesy of James Jones.
2007-06-27 10:16:40 -07:00
Søren Sandmann Pedersen 19cde59c41 In fbFill() make sure the drawable is validated when pixman_fill() succeeds.
In fbSolidBoxClipped() don't return when pixman_fill() succeeds.
2007-06-22 00:39:28 -04:00
Arcady Goldmints-Orlov 5138f710a1 Fixed fbSolidBoxClipped() to fill the right place.
Changed an X2 to a Y1.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2007-06-20 16:46:22 -07:00
Søren Sandmann Pedersen 78179ae827 Remove fbmmx.[ch] files 2007-06-11 22:46:42 -04:00
Søren Sandmann Pedersen eb2d7fe02f Replace fbFillmmx() with pixman_fill() and remove fbmmx.[ch] 2007-06-11 22:43:01 -04:00
Søren Sandmann Pedersen d1d85c04e2 Delete fbBltmmx(). 2007-06-11 21:25:42 -04:00
Eamon Walsh e2a720c9a1 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/dixutils.c
2007-06-11 15:29:11 -04:00
Søren Sandmann Pedersen 3f9adb18f1 Port a few forgotten fbSolidFillmmx()'es to fbFillmmx(). Use pixman_blt() instead of fbBltmmx()
in fbCopyNToN().
2007-06-11 15:19:27 -04:00
Søren Sandmann Pedersen d06099b38e Remove fbCopyAreammx() and fbSolidFillmmx() 2007-06-11 14:10:33 -04:00
Søren Sandmann Pedersen d4a034370c Split fbSolidFillmmx() into a new FbFillmmx() function. Call that from fbFill(). 2007-06-11 14:10:33 -04:00
Søren Sandmann Pedersen 3210902a73 Split fbCopyAreammx() into a new fbBltmmx() function; call this
function from fbCopyNToN().
2007-06-11 14:10:33 -04:00
Søren Sandmann Pedersen 54e023cec0 Don't pass regions to pixman_image_composite() anymore. 2007-06-11 09:43:15 -04:00
Aaron Plattner 9c47b86bd9 Add new fb symbols to wfbrename.h.
Avoids crashes when wfbComposite calls the wrong image_from_pict.
2007-06-07 13:57:12 -07:00
Søren Sandmann Pedersen 567b5bf765 Delete fbCompositeCopyAreammx() 2007-06-05 20:26:49 -04:00
Søren Sandmann Pedersen 49ed31c0b3 Remove most of the fast-path MMX operations from fbmmx. fbCopyAreammx
and fbSolidFillmmx are still needed by other code.
2007-06-05 17:48:33 -04:00
Benjamin Herrenschmidt e5ce982381 Include pixman.h from fb.h or compile of some files will fail
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-06-03 09:40:37 +10:00
Soren Sandmann Pedersen 047bf3349b Delete trapezoid rendering code; replace with pixman calls 2007-05-23 16:56:05 -04:00
Soren Sandmann Pedersen 9d87ef4e0d - Make image_from_pict() non-static
- Delete fbedge.c and fbedgeimp.h
- Use pixman_rasterize_edges() in fbtrap.c
2007-05-23 15:50:25 -04:00
Soren Sandmann Pedersen 3ba3ede9bb Add missing offsets for window coordinates - reported by Colin Harrison 2007-05-23 12:56:04 -04:00
Eamon Walsh 2a4aa63a23 Merge branch 'master' into XACE-SELINUX
Conflicts:

	include/miscstruct.h
2007-05-22 14:50:26 -04:00
Soren Sandmann Pedersen 56fd927155 Remove fast path code from fbpict.c
Remove the various fast path functions from fbpict, and instead use
pixman_image_composite().
2007-05-21 20:00:25 -04:00
Soren Sandmann Pedersen 756acea23a Use pixman_image_set_indexed() to make 8 bit work 2007-05-18 14:06:21 -04:00
Soren Sandmann Pedersen 7916419a00 Comment out setup of general MMX code 2007-05-18 14:06:21 -04:00
Soren Sandmann Pedersen 998164bac6 Move fbCompositeGeneral() to fbpict.c and remove fbcompose.c 2007-05-18 14:06:21 -04:00
Soren Sandmann Pedersen a2e3614eb8 Break image_from_pict() into a few subfunctions. 2007-05-18 14:06:21 -04:00
Soren Sandmann Pedersen c5ef84c325 Make the general compositing code create a pixman image and call
pixman_image_composite(). Leave the general code commented out for now.
2007-05-18 14:06:21 -04:00
Soren Sandmann Pedersen 0375009a97 Remove excessive unrolling in fbCompositeSrc_x888x8x8888() and fix bug where
the source alpha was used instead of 0xff.
2007-05-17 12:59:24 -04:00
Soren Sandmann Pedersen 546465ee6a Make fbFetch_b8g8r8() actually write the read value to the buffer 2007-05-16 17:42:04 -04:00
Soren Sandmann Pedersen 3da842bf93 Revert various fast path functions to their pre-pixman-merge state
since they fail rendercheck. Remove their associated macros.

See bug 10903.
2007-05-15 14:57:14 -04:00
Soren Sandmann Pedersen d2f813f7db New fbWalkCompositeRegion() function
This new function walks the composite region and calls a rectangle
compositing function on each compositing rectangle. Previously there
were buggy duplicates of this code in fbcompose.c and
miext/rootles/safealpha/safeAlphaPicture.c.
2007-05-03 12:17:24 -04:00
Soren Sandmann Pedersen e0959adcd8 Add fbCompositeRect() as another special case in the switch of doom in fbpict.c
This is phase one of getting the two region walkers in fbcompose.c and
fbpict.c merged together.
2007-05-03 12:17:24 -04:00
Keith Packard 71fc5b3e93 Fix for a divide by zero that can be triggered by a malicious client.
Problem reported by Derek Abdine of rapid7.com. Thanks.
2007-05-02 11:41:11 +02:00
Michel Dänzer 5e4b3232da Fix fbCompositeTrans_0888xnx0888 build for wfb on big endian. 2007-04-29 23:38:22 +02:00
Michel Dänzer 2866e0bac9 Fix a couple of picture repeat fields incorrectly compared to RepeatNormal. 2007-04-29 23:38:13 +02:00
Soren Sandmann Pedersen 78a2045535 Pixman merging
More msvc++ porting
2007-04-27 15:20:24 -04:00
Soren Sandmann Pedersen 6c4f1826bf Bug fix in fbCompositeIn_nx8x8888
Make sure both halves of the dst word is set to zero when the masks
are both 0.
2007-04-27 08:13:45 -04:00
Soren Sandmann Pedersen 2208c6087d Change expand_alpha_rev to expand_alpha in mmxSaturateU 2007-04-26 14:40:30 -04:00
Soren Sandmann Pedersen a300ef84ce Fix typo in previous commit 2007-04-26 14:37:53 -04:00
Soren Sandmann Pedersen 0ebe48be59 Pixman merge
- Changes to support MS Visual C++

- use inline instead of __inline__

- Fix rounding errors (Billy Biggs, from xserver via pixman)
2007-04-26 14:36:32 -04:00
Soren Sandmann Pedersen 0ff7c94fcf Pixman merge
Make use of fbCompositeSrcAdd_8888x8x8mmx
2007-04-26 10:56:02 -04:00
Soren Sandmann Pedersen 701ccb4a22 Pixman merge
- Remove stray default label

- Integrate new MMX ops SolidMaskSrc_nx8x8888mmx, In_8x8mmx, and
  In_nx8x8mmx

- Formatting changes to reduce diff noise
2007-04-26 10:49:06 -04:00
Soren Sandmann Pedersen a54ef54db1 Pixman merge
Make sure fbCompositeSrc_x888x8x8888mmx and fbCompositeSrc_8888x8x8888mmx
are used when possible.
2007-04-26 10:24:25 -04:00
Soren Sandmann Pedersen 3571b8e65b More pixman merging
- Move some code around to minimize diff noise

- Add mmx ops from pixman that never made it into X

- Merge Jeff Muizelaar's bugfixes to fbCompositeSrc_8888x8x8888mmx and
  fbCompositeSrc_x888x8x8888mmx.
2007-04-26 10:06:47 -04:00
Soren Sandmann Pedersen 67347739b0 Don't treat convolution filters as transformations.
Some rearrangement of code to get it closer to pixman.
2007-04-25 22:22:22 -04:00
Soren Sandmann Pedersen c056ce95d8 Port MSVC++ CPU detection code from pixman. (Vladimir Vukicevic). 2007-04-25 22:22:22 -04:00
Soren Sandmann Pedersen c19ece1d8c Integrate optimization from xserver from David Reveman where repeats
get handled by fbFetchTransformed() rather than in the region walking
code.
2007-04-25 22:22:22 -04:00
Soren Sandmann Pedersen 48c73dfc36 Add function fbCompositeSrcAdd_8888x8x8(), and fix a bug where
srcRepeat = FALSE would be set in the wrong place.
2007-04-25 22:22:22 -04:00
Soren Sandmann Pedersen 66ba3d758a Various fixes from xserver via pixman (Billy Biggs) 2007-04-25 22:22:22 -04:00
Soren Sandmann Pedersen 0a2fe443d2 Use READ/WRITE macros for new functions introduced in previous commits. 2007-04-24 19:02:44 -04:00
Soren Sandmann Pedersen 7e16da7b78 Remove #if 0'ed blocks 2007-04-24 18:15:34 -04:00
Soren Sandmann Pedersen 2d9a7a7687 From pixman (Jeff Muizelaar)
Fix up the fast-path compositing operators; those are useful for
    sources without alpha, but can't be used for sources with
    alpha. Also, replaced fbCompositeSrcSrc_nxn with call to fbBlt as
    this function must handle 1, 4, 8, 16, 24, 32 bpp objects. Would
    be nice to optimize fbBlt for common cases involving 8, 16, 24 and
    32bpp.

    From Keith Packard.
2007-04-24 14:46:59 -04:00
Soren Sandmann Pedersen fde4a5adf0 From xserver via pixman (Jeff Muizelaar)
Add some optimizations from jaymz. Also adds some compile
     warnings that will hopefully go awa y as we continue merging.
2007-04-24 13:30:43 -04:00
Soren Sandmann Pedersen 13e1d5ea55 Fix format vs formatCode in previous commit 2007-04-24 12:59:18 -04:00
Soren Sandmann Pedersen 077a5d4555 Add functions fbCompositeSrcSrc_nxn() and fbCompositeTrans_0565xnx0565
from xserver via pixman. Add READ/WRITE and fbFinishAccess as
appropriate.
2007-04-24 12:57:55 -04:00
Soren Sandmann Pedersen 84838268b3 Gradient fixes
* Port fix for bug 7685 from pixman. Patch by Carl Worth

* Add projective version of radial gradient code.

* Make sure that all Pict*Gradient types have PictGradient as prefix,
  since code in various places relies on that.
2007-04-23 13:19:54 -04:00
Aaron Plattner ca784df84e Fix unbalanced fbGetDrawable added in commit 0a9239ec. 2007-04-22 16:26:01 -07:00
Soren Sandmann Pedersen 55bd8668e7 Remove #if 0'ed leftovers from merge 2007-04-21 17:10:54 -04:00
Soren Sandmann Pedersen 41dd7ab067 Fix gradient walker to not reset needlessly
Previously the gradient walker was doing excessive resets, (such
    as on every pixel in constant-colored regions or outside the
    gradient with CAIRO_EXTEND_NONE). Don't do that.

    Carl Worth, from pixman
2007-04-21 17:10:54 -04:00
Soren Sandmann Pedersen c1b73f0f2a Fixing gradient repeat mode computations in previous patch. From David
Turner.
2007-04-21 17:10:54 -04:00
Soren Sandmann Pedersen 38f718799c Remove a few memory references in fbFetchTransformed 2007-04-21 17:10:54 -04:00
Soren Sandmann Pedersen 9c4b14d4f6 Integrate David Turner's gradient optimizations from pixman 2007-04-21 17:10:54 -04:00
Soren Sandmann Pedersen 3daa5c1a99 Fix pixman bug 5777, patch by David Reveman 2007-04-20 09:44:25 -04:00
Soren Sandmann Pedersen 0a9239ec25 Merge David Reveman's gradient optimization patch from pixman 2007-04-19 18:19:34 -04:00
Eamon Walsh cf962a849d Merge branch 'master' into XACE-SELINUX
Conflicts:

	configure.ac
2007-04-05 14:41:39 -04:00
Eamon Walsh 5ad562565a devPrivates rework: properly free devPrivates on compatibility structures,
type pixmap.  Requires ddx'es to call the free function from DestroyPixmap.
2007-04-05 14:18:05 -04:00
Brian 0ee40c9357 s/intead/instead/ 2007-04-03 09:31:00 -06:00
Brian a240c039c4 Split the xserver/fb/fbcmap.c file into two files.
Now, fbcmap_mi.c contains the fb functions which just wrap mi functions.
Previously, these were in fbcmap.c and compiled when XFree86Server was defined.
Now, clients of fbcmap should either use fbcmap.c or fbcmap_mi.c and not worry
about setting the XFree86Server symbol.
2007-04-03 09:28:21 -06:00
Eamon Walsh a7cd53deb9 remove PIXPRIV checks as this flag is always set. 2007-03-06 17:05:03 -05:00
Soren Sandmann Pedersen 262b9b104a Use the new 8888x0565mmx function in fbpict.c 2007-02-06 17:30:22 -05:00
Soren Sandmann Pedersen 876b806ec0 Reapply patch to fix AMD CPU detection 2007-02-06 17:16:23 -05:00