Commit Graph

318 Commits

Author SHA1 Message Date
Peter Hutterer
cb95642dc8 Remove #define NEED_EVENTS and NEED_REPLIES
A grep on xorg/* revealed there's no consumer of this define.

Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.

Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-12-12 11:43:32 +10: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
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
Keith Packard
9ffc671939 Move matrix operations from X server to pixman 0.13.2
pixman 0.13.2 now holds all of the matrix operations. This leaves
the protocol conversion routines and some ABI stubs in place

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-11-25 22:17:58 -08:00
Keith Packard
c4b9ab6bf5 Handle transform failure when computing shadow damage area.
PictureTransformBounds can fail, when this happens, damage the entire screen
so that the shadow gets repainted correctly.
2008-11-24 13:24:41 -08:00
Keith Packard
fa6a1df209 Avoid overflow in PictureTransformPoint. Fix PictureTransformIsIdentity.
PictureTransformPoint computes homogeneous coordinates internally, but fails
to handle intermediate values larger than 16.16. Use 64 bit intermediate
values while computing the final result at 16.16 and only complain if that
result is too large.

PictureTransformIsIdentity was completely wrong -- it was not checking for
identity transforms at all.
2008-11-24 13:24:40 -08:00
Keith Packard
49db14e4ac Handle RandR transform matrices in floating point.
RandR matrix computations lose too much precision in fixed point;
computations using the inverted matrix can be as much as 10 pixels off.
Convert them to double precision values and pass those around. These API
changes are fairly heavyweight; the official Render interface remains fixed
point, so the fixed point matrix comes along for the ride everywhere.
2008-11-24 13:24:40 -08:00
Keith Packard
97ab0c6eff When converting from double to fixed, round carefully.
This reduces the matrix representation error after inverting a
transformation matrix (although it doesn't eliminate it entirely).

Perhaps we should extend Render to include 64-bit floating point transforms...
2008-11-24 13:24:39 -08:00
Keith Packard
160252d94f Add matrix inversion function (uses doubles)
The obvious matrix inversion function, coded using doubles to avoid fiddling
with fixed point precision adventures.
2008-11-24 13:24:38 -08:00
Keith Packard
3fdb963f6e Correct bilinear filter kernel size (should be 2x2) 2008-11-24 13:24:37 -08:00
Keith Packard
1df02d7ddd Add kernel size to Render filters.
This width/height value lets filter users know how far the filter spreads
into the source image.
2008-11-24 13:24:37 -08:00
Keith Packard
acda790e43 [render] Split out filter finding from filter setting.
To prepare for RandR using filters in transforms, split out
code paths so that the RandR code can validate the filter name and
parameters during the transform set operation so that use of the filter
later will not have unreportable errors.
2008-11-24 13:24:36 -08:00
Keith Packard
ff9d1cd843 Add funcs to convert between protocol and pixman matrices 2008-11-24 13:24:36 -08:00
Keith Packard
f547650328 Export a bunch of matrix operations from render.
The render extension uses many matrix operations internally, this change
exposes those functions to other parts of the server, drivers and
extensions. The change is motivated by the 'transform' additions to the
RandR extension but will likely be useful elsewhere.
2008-11-24 13:24:36 -08:00
Peter Hutterer
f781a752e6 Move MAX_DEVICES to misc.h, rename to MAXDEVICES for consistency. 2008-10-31 17:09:13 +10:30
Adam Jackson
60cfaa45a5 Build fix. 2008-10-06 18:47:06 -04:00
Adam Jackson
8a5b89e8e1 xalloc+memset(0) -> xcalloc 2008-10-06 15:36:51 -04:00
Adam Jackson
0b7b89fbac xalloc+bzero -> xcalloc 2008-10-06 14:19:30 -04:00
Keith Packard
a39377cbcb Revert "Render: Use built-in SHA1 library"
This reverts commit d3bd31fddf.

X.org should not be providing a custom SHA1 implementation.
2008-09-23 09:22:07 -07:00
John Tapsell
d3bd31fddf Render: Use built-in SHA1 library
Getting an external library for SHA1 is a mess, so just use our own,
regrettably.  Public domain implementation.
2008-09-23 18:56:32 +03: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
8689849149 Remove unused GetGlyphPrivatesForScreen. 2008-08-27 19:17:15 -04:00
Adam Jackson
64ef7ed072 Centralize declaration of ConnectionInfo. 2008-08-20 13:14:34 -04:00
Adam Jackson
9757106bba Remove all empty extension reset hooks, replace with NULL. 2008-07-24 15:46:08 -04:00
Pierre-Loup A. Griffais
bc3c03a3f3 Don't return BadAlloc when trying to set a PictureFilter with no parameters when a filter with parameters was previously set.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2008-07-22 17:38:57 -07:00
Owen Taylor
574c62e305 Bug #15369: Don't reduce Over to Src for transform + RepeatNone.
Only do no-src-alpha optimizations for a RepeatNone source if we can
easily probe that we won't sample outside the edges of the source.
2008-06-24 12:40:47 -04:00
Matthieu Herrb
9171206db3 CVE-2008-2362 - RENDER Extension memory corruption
Integer overflows can occur in the code validating the parameters for
the SProcRenderCreateLinearGradient, SProcRenderCreateRadialGradient
and SProcRenderCreateConicalGradient functions, leading to memory
corruption by swapping bytes outside of the intended request
parameters.
2008-06-11 08:06:10 -06:00
Matthieu Herrb
5257a0f83d CVE-2008-2361 - RENDER Extension crash
An integer overflow may occur in the computation of the size of the
glyph to be allocated by the ProcRenderCreateCursor() function which
will cause less memory to be allocated than expected, leading later to
dereferencing un-mapped memory, causing a crash of the X server.
2008-06-11 08:06:10 -06:00
Matthieu Herrb
c5f69b297b CVE-2008-2360 - RENDER Extension heap buffer overflow
An integer overflow may occur in the computation of the size of the
glyph to be allocated by the AllocateGlyph() function which will cause
less memory to be allocated than expected, leading to later heap
overflow.
2008-06-11 08:06:09 -06:00
Aaron Plattner
607b0d09ea CreateColormap returns Success on success, not TRUE.
Fixes a problem where enabling color index overlays disables the RENDER
extension.
2008-06-09 09:54:25 -07:00
Peter Hutterer
99d28c3ef3 Merge branch 'master' into mpx
Conflicts:

	Xext/xprint.c (removed in master)
	config/hal.c
	dix/main.c
	hw/kdrive/ati/ati_cursor.c (removed in master)
	hw/kdrive/i810/i810_cursor.c (removed in master)
	hw/xprint/ddxInit.c (removed in master)
	xkb/ddxLoad.c
2008-05-20 10:20:14 +09:30
Peter Hutterer
248a1df634 render: don't dereference cursor if cursor is NULL. 2008-05-13 11:17:02 +09:30
Alan Coopersmith
b6a0c6d486 Allow using libmd instead of libcrypto for SHA1 hashing in render/glyph.c
Builders can force one or the other by passing SHA1_LIB & SHA1_CFLAGS
to configure
2008-05-06 17:06:34 -07:00
Peter Hutterer
fd06e8f8c1 Merge branch 'master' into dcdc_rework
Conflicts:

	Xext/xevie.c
	dix/dispatch.c
2008-04-07 07:56:41 +09:30
Chris Wilson
8f0a4282f0 Bug #10463: Always initialize reference pixel before AllocColor() 2008-02-29 16:39:29 -05:00
Peter Hutterer
8da83836b6 Merge branch 'master' into mpx
Conflicts:

	XTrap/xtrapddmi.c
	Xext/security.c
	Xext/xprint.c
	Xext/xtest.c
	Xext/xvdisp.c
	Xi/exevents.c
	Xi/grabdevb.c
	Xi/grabdevk.c
	Xi/opendev.c
	Xi/ungrdev.c
	Xi/ungrdevb.c
	Xi/ungrdevk.c
	dix/cursor.c
	dix/devices.c
	dix/dixutils.c
	dix/events.c
	dix/getevents.c
	dix/main.c
	dix/window.c
	hw/xfree86/ramdac/xf86Cursor.c
	include/dix.h
	include/input.h
	include/inputstr.h
	mi/midispcur.c
	mi/miinitext.c
	mi/misprite.c
	render/animcur.c
	xfixes/cursor.c
	xkb/xkbAccessX.c
2008-01-03 17:04:54 +10:30
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
5aff37d1d6 Revert "registry: Register RENDER extension protocol names."
This reverts commit 8964c6d8e1.

Moving all the names into dix/registry.c
2007-11-20 17:57:06 -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
8d0cd1cd2c Fix a really dumb typo. 2007-11-15 12:21:25 -08:00
Peter Hutterer
0b729051c0 Merge branch 'master' into mpx
Conflicts:

	Xi/extinit.c
	Xi/grabdev.c
	Xi/setmode.c
	Xi/ungrdev.c
	dix/devices.c
	dix/events.c
	dix/getevents.c
	include/dix.h
	mi/midispcur.c
	mi/misprite.c
	xkb/xkbActions.c
	xkb/xkbEvents.c
	xkb/xkbPrKeyEv.c
2007-11-07 15:37:23 +10:30
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
e0491f470e Render: Remove usage of alloca
Replace it with heap-based allocations.
2007-11-05 14:34:41 +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
Aaron Plattner
2251572062 Restore the CompositeGlyphs -> ps->Glyphs -> miGlyphs callchain to allow acceleration architectures to wrap above miGlyphs. 2007-10-26 15:14:03 -07:00
Bernardo Innocenti
0e749ceab4 Include stddef.h for size_t.
This is required by a buggy version of the openssl/sha.h header
which is distributed with Fedora 7.
2007-10-26 10:55:48 -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
Matthias Hopf
a8a148919b Superfluous ','. 2007-10-23 16:23:28 +02: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
fe97f7c54a registry: Add some missing #include's. 2007-10-15 22:46:08 -04:00
Eamon Walsh
8964c6d8e1 registry: Register RENDER extension protocol names. 2007-10-15 19:10:51 -04:00
Eamon Walsh
526f40434c NULL is not a valid argument to CreatePicture, please use serverClient
as the client argument if no real client is creating the object.
2007-10-12 18:19:44 -04:00
Eamon Walsh
6adeba1730 dix: Add a new "registry" mechanism for registering string names of things.
Supports protocol requests, events, and errors, and resource names.
Modify XRES extension to use it.
2007-10-11 14:18:59 -04:00
Eric Anholt
439edc768e Merge branch 'glyph-pixmaps'
Conflicts:

	configure.ac
	exa/exa_render.c
2007-10-02 12:14:04 -07:00
Eamon Walsh
082c0f7fb3 devPrivates rework: move devPrivates field in drawable structure types
to just below the DrawableRec.  Wish there were a better way to do this
but it has to be in the same place for all drawable types.
2007-09-19 13:59:35 -04: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
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
Eric Anholt
07630d897e Bug #7364: Require renderproto 0.9.3 on 64-bit, and fix build with it. 2007-08-31 15:16:01 -07:00
Eamon Walsh
fd04b983db xace: add hooks + new access codes: Render extension 2007-08-31 09:55:27 -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
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
6f44a2c8a8 Refactor PictureInitIndexedFormats.
The plural version is now static, which is fine since it was only ever called
from within picture post-init anyway.  The body of the work is now done with
a one-shot (public) function that operates on a single format at a time.
2007-08-25 15:13:46 -04:00
Carl Worth
93ae6fe18c Avoid leaking a Pixmap for every glyph 2007-08-23 16:33:05 -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
Eamon Walsh
dc84bb3418 xace: add hooks + new access codes: core protocol cursor requests 2007-08-15 14:13:53 -04:00
Peter Hutterer
f367285fd5 Merge branch 'master' into mpx
Conflicts:

	Xi/exevents.c
	dix/devices.c
	dix/getevents.c
	include/dix.h
	mi/mieq.c
2007-08-12 15:31:10 +09:30
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
Carl Worth
0a71e1542a Create a Picture as well as a Pixmap at the time of AllocateGlyph
This avoids some inefficiency in creating a temporary Picture
for every glyph at rendering time. My measurements with an i965
showed the previous patch causing a 10-15% slowdown for NoAccel
and XAA cases, (while providing an 18% speedup for EXA).

With this change, the NoAccel and XAA performance regression is
eliminated, and the overall EXA speedup, (before any of the
glyphs-as-pixmaps work), is now 32%.
2007-08-02 22:49:56 -07:00
Carl Worth
a2af34d5a8 Use per-screen Pixmaps for glyphs
Instead of system-memory data which prevents accelerated
compositing of glyphs, (at least without forcing an upload
of the glyph data before compositing).
2007-08-02 22:49:56 -07:00
Carl Worth
19b3b1fd8f Use strong hash (SHA1) for glyphs
Using a cryptographically strong hash means that comparing the
hash alone is sufficient for determining glyph equality (no need
to compare the glyph bits directly). This will allow us to replace
system-memory copies of the glyph bits, (which we've only been
holding onto for comparisons), with Pixmaps.
2007-08-02 22:49:56 -07:00
Carl Worth
516b96387b ProcRenderAddGlyphs: Avoid allocating a glyph just to find it cached
This is a cleanup without any real savings (yet). Previously, the
implementation would allocate a new glyph, then (often) find it in
the cache, and immediately discard the allocated object. This
re-organization first uses a new FindGlyphByHash function and only
allocates the glyph if nothing is found.

This isn't a real savings yet, since FindGlyphByHash currently still
does a temporary glyph allocation, but this is expected to be replaced
immediately as we switch to an alternate hashing mechanism (SHA1).
2007-08-02 22:49:56 -07:00
Carl Worth
4c6abe1c7c Split HashGlyph functionality out into HashGlyphInfoAndBits
This is in preparation for a future change that will take advantage
of being able to compute a hash for a separate xGlyphInfo and chunk
of bits without a combined Glyph object.
2007-08-02 22:49:56 -07:00
Carl Worth
363d764ea3 ProcRenderAddGlyphs: Take advantage of the for loops to simplify the code a bit 2007-08-02 22:49:56 -07:00
Carl Worth
dc8a528cd6 ProcRenderAddGlyphs: Convert while loops to for loops where more natural 2007-08-02 22:49:56 -07:00
Adam Jackson
57b5b97a07 ReduceCompositeOp returns a Render op, not a boolean. 2007-07-29 11:02:47 -04:00
Adam Jackson
4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Peter Hutterer
1f97a76476 Merge branch 'master' into mpx
Conflicts:

	dix/devices.c
	hw/xfree86/common/xf86Xinput.c
	hw/xfree86/loader/xf86sym.c
	mi/mieq.c
2007-06-19 17:20:52 +09:30
Matthieu Herrb
42c2e14b25 swap xOrigin and yOrigin in SProcRenderSetPictureClipRectangles.
Fixes Xrender clipping rectangles when X server and client are of
different endianness, shown by xterm 225 among others.
2007-06-15 00:14:02 +02:00
Søren Sandmann Pedersen
54e023cec0 Don't pass regions to pixman_image_composite() anymore. 2007-06-11 09:43:15 -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
Soren Sandmann Pedersen
2a960c442b Port renderedge.c to pixman 2007-05-23 13:08:26 -04:00
Soren Sandmann Pedersen
0fcd17c918 Use pixman short formats, revert the gradient_stop change 2007-05-15 17:59:13 -04:00
Soren Sandmann Pedersen
f4c1d5fc28 Use pixman types for transforms and vectors 2007-05-15 17:12:22 -04:00
Soren Sandmann Pedersen
f2e30e7d0a Use the pixman fixed point types and macros 2007-05-15 16:51:21 -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
Peter Hutterer
f28eea0647 Merge branch 'master' into mpx
Conflicts:

	dix/devices.c
	dix/events.c
2007-04-27 16:34:36 +09:30
Soren Sandmann Pedersen
b5e1f7869b Remove #if 0'ed merge leftovers 2007-04-23 14:16:30 -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
Soren Sandmann Pedersen
0a9239ec25 Merge David Reveman's gradient optimization patch from pixman 2007-04-19 18:19:34 -04:00
Peter Hutterer
d4dad6f84f Merge branch 'master' into mpx
Conflicts:

	configure.ac
	dix/events.c
	hw/xfree86/common/xf86Xinput.c
2007-04-12 11:11:03 +09:30
Stefan Huehner
1f6741db19 Bug #10560: Code-Cleanup: function declarations () -> (void)
X.Org Bugzilla #10560: <https://bugs.freedesktop.org/show_bug.cgi?id=10560>
Patch #9511 <https://bugs.freedesktop.org/attachment.cgi?id=9511>
2007-04-09 14:33:15 -07:00
Peter Hutterer
7f36ba5706 Allow for multiple animated cursors. 2007-04-04 17:38:10 +09:30
Peter Hutterer
e8777a91f3 Merge branch 'master' into mpx
Conflicts:

	Xi/closedev.c
	Xi/exevents.c
	Xi/extinit.c
	Xi/listdev.c
	dix/window.c
	hw/xfree86/common/xf86Xinput.c
	include/extinit.h
	mi/mipointer.c
2007-04-02 15:36:26 +09:30
Adam Jackson
9a0f25de7c Static cleanups, dead code deletion. 2007-03-25 12:27:01 -04:00
Peter Hutterer
15a81b6325 Merge branch 'master' 2007-01-28 17:18:57 +10:30
Matthieu Herrb
e3aa6ad201 Multiple integer overflows in dbe and render extensions
CVE IDs: CVE-2006-6101 CVE-2006-6102 CVE-2006-6103
2007-01-09 14:14:19 +01:00
Peter Hutterer
2d0a63126b Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver 2006-12-19 10:31:40 +10:30
Eamon Walsh
51b69ff499 Remove instances of macro SECURITY_VERIFY_DRAWABLE. 2006-12-14 17:53:43 -05:00
Eamon Walsh
6c46645cfc Naming change: Security*Access -> Dix*Access 2006-12-14 14:45:42 -05:00
Peter Hutterer
1c7568b8a1 mi: closing memory leak, miPointer is freed in miPointerCloseScreen
bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX
	adding DeviceIntPtr parameter to ScreenRec's cursor functions.
	cleanup of miPointer code to use same scheme in each function

dix:	MPHasCursor() function determines checking whether to invoke
	cursor rendering.

animcur: adding DeviceIntPtr parameter to cursor functions but animcur relies
	 on the core pointer right now.

xfixes: adding DeviceIntPtr parameter to cursor functions but xfixes relies on
	the core pointer right now.

rac:	adding DeviceIntPtr parameter to cursor functions but RAC relies on
	the core pointer right now.

ramdac:	adding DeviceIntPtr parameter to cursor functions but ramdac relies on
	the core pointer right now.
2006-11-23 17:15:14 +10:30
Tilman Sauerbeck
594d4019c6 transformIsIdentity() now doesn't accept a zero matrix as the identity.
Added a non-zero test for one of the diagonal values.
2006-09-12 01:15:40 +02:00
Tilman Sauerbeck
fc30370d14 Bug #8226: Fixed SetPictureTransform()'s handling of the argument matrix.
It now recognizes scaled variants of the identity matrix, too.
2006-09-11 19:43:09 +02:00
Adam Jackson
0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04: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
25d871d984 Fix source picture filter check for multiple screens.
Now, we only check for filter commonality if we're operating on a source
picture, and we compare the id (screen-independent index of the filter name)
rather than the pointer to the filter (per-screen state).
2006-07-03 19:22:26 +02:00
Eric Anholt
f5e92542a1 Bug #7366: Fix crashes when setting filters on source pictures.
Now, filters may only be set on source pictures when the filter is common to
all screens.  Also, like SetPictureTransform, ChangePictureFilter is now not
called on source pictures.
2006-07-03 16:40:59 +02:00
Eric Anholt
6ef4579139 Bug #7366: Fix two crashes in operations on source pictures.
A screen's ChangePictureTransform now isn't called when changing the transform,
as source pictures aren't associated with screens.  Also, attempting to set
an AlphaMap to a source picture will fail with BadMatch just like a Window
would, preventing another crash.
2006-07-03 16:40:11 +02:00
Eric Anholt
c7ac485a59 Remove the default case from fbcompose.c switches which should cover all cases.
Instead, stick the NULL return default case afterwards, so that the compiler can
warn us when we've got unimplemented cases.  Removes some unimplemented and
unused 8bpp, depth 4 picture format names.
2006-06-23 13:56:20 -07:00
Eric Anholt
e1672a12eb Convert PICT_* names from #defines to an enum to aid in debugging. 2006-06-19 15:11:55 -07:00
Adam Jackson
ab1a0249ba Bug #6867: Yet another Render crash fix. (Michel Dänzer) 2006-05-09 22:36:01 +00:00
Matthieu Herrb
b9a9cf6185 Typo in ALLLOCATE_LOCAL() arguments, causing mis-computation of the buffer.
Bugzilla #6642.
2006-05-02 14:09:30 +00:00
Keith Packard
b37c515320 Add support for x4a4 format (depth 4 at 8bpp). Bug #6325. 2006-04-19 21:56:13 +00:00
Adam Jackson
7deaaa797c Big old pile of warning fixes. 2006-03-28 01:21:00 +00:00
Lars Knoll
65aa33f917 render/picture.c Initialize the format of a source picture to
PICT_a8r8g8b8. Fixes a failure in the gradients test of rendercheck. In
    the long term we could do better by setting the format to something
    without alpha whenever the gradient doesn't contain colors with alpha.
    This triggers a reduction of the over operation to a pure source
    operation.
2006-03-08 06:19:37 +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
f105b8da11 Mark everything in dixsym.c as _X_EXPORT. 2006-02-15 20:44:13 +00:00
Adam Jackson
3fe482c77e Mark everything in misym.c as _X_EXPORT. 2006-02-15 19:05:55 +00:00
Adam Jackson
83dd6241c8 Reverted, did nothing anyway, I'm not smart today. 2006-02-13 18:55:44 +00:00
Adam Jackson
4a7f6f53ca Further op reduction when both src and dst alpha are absent. 2006-02-13 18:09:51 +00:00
Eric Anholt
34d0b9228f Simplify ops that would use the alpha channel when an alpha channel is
always 1.0, and short circuit PictOpDst for good measure.
2006-02-12 20:53:35 +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
Dave Airlie
506eca5f57 Wrap sdk_HEADERS in if XORG as otherwise installing non-xorg servers
breaks.
2006-01-18 06:56:52 +00:00
Eric Anholt
b6b88d2f62 Correct rounding in divide-by-255 code. Obtained from xserver. 2006-01-04 00:05:16 +00:00
Eric Anholt
601ab861b4 Add glyph privates for Xgl, which uses them to implement a glyph cache. EXA
would probably also like to do this. This breaks module ABI for EXA and
    XAA, and likely breaks proprietary drivers as well.
2006-01-03 22:06:23 +00:00
Eric Anholt
08708f7d61 Merge from xserver: Make the existing ChangePictureFilter and
ChangePictureTransform screen hooks get called at appropriate times.
2005-12-28 11:48:14 +00:00
Adam Jackson
62f3ef930a Bug #5258: Restore binary compatibility with 6.8.2's PictureRec. (Aaron
Plattner)
2005-12-09 18:35:21 +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
Benjamin Herrenschmidt
5f30a7b102 Bug #4689: Treat DirectColor as TrueColor in Render. It fixes some crashes
with xcompmgr when using apps that use a DirectColor visual for their
    windows
2005-10-06 08:08:04 +00:00
Adam Jackson
20813d3af0 Bug #3974: Fix unaligned memory access on LP64. (Matthieu Herrb) 2005-08-28 19:47:39 +00:00
Daniel Stone
825a95a1fa Remove use of dix-config and xorg-config.h from public headers. 2005-08-24 11:18:35 +00:00
Torrey Lyons
1dc3e96e40 Fix compilation where uint is not defined. 2005-07-13 16:30:53 +00:00
Alexander Gottwald
4ef813961d provide the uint datatype on WIN32 2005-07-04 09:01:43 +00:00
Daniel Stone
0bb669638f Change <X11/misc.h> and <X11/os.h> to "misc.h" and "os.h". 2005-07-03 08:53:54 +00:00
Daniel Stone
46b64bd5c6 Fix more include paths; add dix-config.h to XKB code. 2005-07-03 07:37:35 +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
9b1debcdb6 Change all misc.h and os.h references to <X11/foo.h>. 2005-07-01 22:43:43 +00:00
Daniel Stone
ded56b1a74 Adding initial build system. 2005-07-01 20:29:53 +00:00
Lars Knoll
b5b2a0522e Add support for gradients and solid fills to Render.
Changed the semantics of the Convolution filter a bit. It now doesn't try
    to normalize the filter values but leaves this to the client. This
    gives more reasonable behaviour in the limit where the filter
    parameters sum up to 0.
2005-07-01 10:05:43 +00:00
Lars Knoll
c6166ee741 Fix projective transformations in fbcompose.c Bugfix for convolution
filters
2005-06-15 14:51:12 +00:00
Lars Knoll
49476ca73c add the convolution filter from xserver to xorg 2005-06-13 14:40:25 +00:00
Adam Jackson
eca5dff173 Render performance improvements. (Lars Knoll, Zack Rusin) 2005-05-09 12:46:53 +00:00
Daniel Stone
292c4cff26 Fix includes right throughout the Xserver tree:
change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h;
change "foo.h", "extensions/foo.h" and "X11/foo.h" to
    <X11/extensions/foo.h> for extension headers, e.g. Xv.h;
change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.
2005-04-20 12:25:48 +00:00
Markus Kuhn
44f4713a05 Encoding of numerous files changed to UTF-8 2004-12-04 00:43:13 +00:00
Alexander Gottwald
9826b83826 Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 Added
mingw (Win32) port
2004-11-15 15:06:51 +00:00
Kevin E Martin
9223baf985 Fix AIX build problems (Bugs #1020, 1102, 1103, Dan McNichol).
Remove old config files (Bug #1123, Jim Gettys).
Remove old log message (Bug #1123, Jim Gettys).
2004-08-18 18:41:41 +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
a29bfbd3d0 Empty damage object when freeing pixmap.
Wrap InstallColormap so that the DDX doesn't see colormaps from our ARGB
    visual (avoids lovely green tint to screen). Also, set visual->nplanes
    of ARGB visual to all used (including alpha) planes so DIX can set
    pixel values correctly.
Translate automatic update regions correctly to account for borders
When nplanes == 32 (ARGB visuals), mask in all ones for alpha values to
    allocated pixel values.
Remove redundant fbAddTraps declaration
Fix fbCopyWindow to work on non-screen pixmaps (not needed yet)
Replace broken clipping code with that from modular tree.
Respect subWindowMode.
2004-08-13 08:16:14 +00:00
Eric Anholt
24bed5cff9 Fix copy'n'paste-os of x/y in CopyPicture for AlphaXOrigin and ClipXOrigin. 2004-08-13 07:47:21 +00:00
Eric Anholt
56520ecd5c In CopyPicture, add missing call to ChangePicture to notify about the
changes that CopyPicture has done.
2004-08-11 22:13:01 +00:00
Keith Packard
196aafb19a Add RenderAddTraps. Rewrite trapezoid rendering code. 2004-08-06 23:42:10 +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
Kevin E Martin
813d75f9d3 Use LibraryTargetName when not building a loadable server
Move extern function declarations to window.h
Cleaned up code since client's saveSet is no longer defined as a pointer*
Added externs back in
Change #if to #ifdef to fix compiler warning
Add function declarations that were inadvertently removed by previous check
    in
Disable extensions that are not (yet) supported by DMX
2004-07-29 23:43:40 +00:00
Stuart Kreitman
d4a101d4ef Integration of DAMAGE-XFIXES branch to trunk
https://freedesktop.org/bugzilla/show_bug.cgi?id=859
These RENDER changes come from the experimental freedesktop tree formerly
    known as "Xserver". Partly motivated by compatibility with DAMAGE as
    pulled from that tree, also some of the code just is better
    implemented.
Modified Files: filter.c picture.c picture.h picturestr.h
2004-07-29 18:37:54 +00:00
Matthieu Herrb
2a7b137d41 remove extra ';' (Alan Hourihane, Keith Packard). 2004-07-26 22:41:47 +00:00
Kevin E Martin
7976ee51af Add Distributed Multihead X (DMX) support 2004-06-30 20:06:56 +00:00
Egbert Eich
2fb5886200 Merging XORG-CURRENT into trunk 2004-04-23 19:54:30 +00:00
Egbert Eich
dae90c3af9 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:34:49 +00:00
Egbert Eich
867451f1ab Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 2004-03-03 12:12:50 +00:00
Egbert Eich
df0313d35b readding XFree86's cvs IDs 2004-02-26 13:36:15 +00:00
Egbert Eich
147aae87fd Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 2004-02-26 09:23:53 +00:00
Kaleb Keithley
adc7f9a4eb XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks 2003-11-25 19:29:01 +00:00
Kaleb Keithley
9508a382f8 Initial revision 2003-11-14 16:48:57 +00:00