Commit Graph

183 Commits

Author SHA1 Message Date
Tiago Vignatti
80ed8096f9 render: delete unused headers declaration
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-08-28 15:33:19 +03:00
Tiago Vignatti
f959b1e548 render: AnimCurInit and AnimCursorCreate shouldn't be _X_EXPORT
Pointed by Peter Hutterer on xorg-devel ml.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-08-28 15:30:21 +03:00
Pierre-Loup A. Griffais
a3e50b0574 Add 4 missing 10bpc picture formats to the server format list.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2009-08-13 12:04:33 -07:00
Michel Dänzer
842373104d Add support for RENDER BGRA formats. 2009-08-04 23:23:21 +02:00
Fredrik Höglund
0ce42adbf4 Render: Add support for the PDF blend mode operators. 2009-07-15 00:37:05 +02:00
Peter Hutterer
e216527107 render: switch to byte counting functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-14 10:14:01 +10:00
Søren Sandmann Pedersen
128cd03eec Fix miComputeCompositeRegion() to follow new clip rules.
Ignore the hierarchy clip, and always apply any client clip after
transformation and repeating.
2009-06-18 12:36:11 -04:00
Søren Sandmann Pedersen
6e69272473 Fix alpha map computation in miComputeCompositeRegion()
According to the RENDER spec, the origin of the alpha map is
interpreted relative to the origin of the drawable of the image, not
the origin of the drawable of the alpha map.

This commit fixes that and adds an alpha-test.c test program.

The only use of alpha maps I have been able to find is in Qt and they
don't use a non-zero alpha origin.
2009-05-27 15:51:19 -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
Michel Dänzer
7d85169c7a Fix typo in ProcRenderCreateAnimCursor. 2009-05-04 10:14:43 +02: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
Peter Hutterer
6ec49098f7 render: replace a wrong inputInfo.pointer with pDev
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-16 13:29:07 +10: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
ddb8d8945d xserver: Avoid sending uninitialized padding data over the network
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-16 13:28:38 +10:00
Peter Hutterer
8460425740 render: rename SetBit to RenderSetBit.
Avoiding namespace collision with the SetBit macro soon to be used in the
input code.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03 08:51:11 +10:00
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