summaryrefslogtreecommitdiff
path: root/render
AgeCommit message (Collapse)AuthorFilesLines
2009-10-06render: Fix clip region translation in miClipPictureSrc().Kim Woelders1-4/+4
Signed-off-by: Kim Woelders <kim@woelders.dk> Reviewed-by: Soren Sandmann Pedersen <sandmann@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-01render: Fix crash in RenderAddGlyphs (#23645)Peter Hutterer1-1/+5
This patch fixes two bugs: size is calculated as glyph height * padded_width. If the client submits garbage, this may get above INT_MAX, resulting in a negative size if size is unsigned. The sanity checks don't trigger for negative sizes and the server goes and writes into random memory locations. If the client submits glyphs with a width or height 0, the destination pixmap is NULL, causing a null-pointer dereference. Since there's nothing to composite if the width/height is 0, we might as well skip the whole thing anyway. Tested with Xvfb, Xephyr and Xorg. X.Org Bug 23645 <http://bugs.freedesktop.org/show_bug.cgi?id=23645> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2009-10-01render: set the glyph picture to NULL by default.Peter Hutterer1-26/+31
In a follow-up patch we may have glyphs with a NULL picture. To cope with that, always set the pictures for glyphs to NULL at creation time and cope with cleaning up such glyphs. Also, since compositing a NULL source doesn't do a lot anyway, skip trying to do so. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2009-09-28render: Plug a memory leak in AddGlyph. (#23286)Peter Hutterer1-21/+21
AddGlyph was missing the FreePicture() call that DeleteGlyph used, resulting in a memory leak when more than one Glyph was added in a RenderAddGlyphs request. Since the code in AddGlyph and DeleteGlyph is identical, move into a static function to avoid such mistakes in the future. X.Org Bug 23286 <http://bugs.freedesktop.org/show_bug.cgi?id=23286>
2009-09-23render: Don't add b8g8r8x8 format for depth 24.Michel Dänzer1-4/+1
The components are required to be packed in the bottom of the pixel, so this format can't fit in depth 24. Also fix up a comment for the addition of BGRA formats.
2009-09-21input: define server-supported protocol versions in one single file.Peter Hutterer1-3/+4
include/protocol-versions.h specifies each extension version as supported by the server and sent back on the wire to the client. This fixes up several issues with the server potentially reporting a higher version of the protocol if recompiled against a newer version of the protocol. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Rémi Cardona <remi@gentoo.org> Acked-by: Julien Cristau <jcristau@debian.org>
2009-09-21render: reply with the server or client version, whichever is lower.Peter Hutterer1-2/+12
Protocol requires that the lower of [server version, client version] is returned to the client. The other part of the issue discussed in reply to [1] remains. [1] http://lists.freedesktop.org/archives/xorg-devel/2009-September/001990.html Reported-by: Julien Cristau Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-28render: delete unused headers declarationTiago Vignatti1-11/+0
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-08-28render: AnimCurInit and AnimCursorCreate shouldn't be _X_EXPORTTiago Vignatti1-2/+2
Pointed by Peter Hutterer on xorg-devel ml. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-08-13Add 4 missing 10bpc picture formats to the server format list.Pierre-Loup A. Griffais2-0/+16
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2009-08-04Add support for RENDER BGRA formats.Michel Dänzer2-1/+38
2009-07-15Render: Add support for the PDF blend mode operators.Fredrik Höglund1-0/+2
2009-07-14render: switch to byte counting functionsPeter Hutterer1-8/+8
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18Fix miComputeCompositeRegion() to follow new clip rules.Søren Sandmann Pedersen1-24/+16
Ignore the hierarchy clip, and always apply any client clip after transformation and repeating.
2009-05-27Fix alpha map computation in miComputeCompositeRegion()Søren Sandmann Pedersen1-4/+4
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-10Make compositing with transformed windows work again.Søren Sandmann Pedersen1-2/+2
The coordinate translation was broken in pretty much every way imaginable.
2009-05-04Fix typo in ProcRenderCreateAnimCursor.Michel Dänzer1-1/+1
2009-04-29Fix most remaining deprecated resource lookups.Eamon Walsh3-115/+69
Callsites updated to use dixLookupResourceBy{Type,Class}. TODO: Audit access modes to make sure they reflect the usage.
2009-03-16render: replace a wrong inputInfo.pointer with pDevPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-09Replace dixLookupResource by dixLookupResourceBy{Type,Class}Keith Packard2-6/+6
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-02-16xserver: Avoid sending uninitialized padding data over the networkPeter Åstrand1-1/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03render: rename SetBit to RenderSetBit.Peter Hutterer1-5/+5
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>
2008-12-12Remove #define NEED_EVENTS and NEED_REPLIESPeter Hutterer1-2/+0
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-07Use libtool convenience libraries and better "symbol" table.Paulo Cesar Pereira de Andrade1-0/+2
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-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade17-221/+221
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-11-30Remove declarations of symbols that are never defined.Paulo Cesar Pereira de Andrade2-18/+0
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-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade9-90/+90
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-25Move matrix operations from X server to pixman 0.13.2Keith Packard3-665/+14
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-24Handle transform failure when computing shadow damage area.Keith Packard2-4/+5
PictureTransformBounds can fail, when this happens, damage the entire screen so that the shadow gets repainted correctly.
2008-11-24Avoid overflow in PictureTransformPoint. Fix PictureTransformIsIdentity.Keith Packard2-41/+22
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-24Handle RandR transform matrices in floating point.Keith Packard2-72/+315
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-24When converting from double to fixed, round carefully.Keith Packard1-3/+4
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-24Add matrix inversion function (uses doubles)Keith Packard2-0/+83
The obvious matrix inversion function, coded using doubles to avoid fiddling with fixed point precision adventures.
2008-11-24Correct bilinear filter kernel size (should be 2x2)Keith Packard1-1/+1
2008-11-24Add kernel size to Render filters.Keith Packard2-9/+26
This width/height value lets filter users know how far the filter spreads into the source image.
2008-11-24[render] Split out filter finding from filter setting.Keith Packard2-19/+47
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-24Add funcs to convert between protocol and pixman matricesKeith Packard2-4/+43
2008-11-24Export a bunch of matrix operations from render.Keith Packard4-72/+415
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-10-31Move MAX_DEVICES to misc.h, rename to MAXDEVICES for consistency.Peter Hutterer1-2/+2
2008-10-06Build fix.Adam Jackson1-2/+2
2008-10-06xalloc+memset(0) -> xcallocAdam Jackson2-4/+2
2008-10-06xalloc+bzero -> xcallocAdam Jackson2-6/+3
2008-09-23Revert "Render: Use built-in SHA1 library"Keith Packard4-240/+28
This reverts commit d3bd31fddff7894f89ba80a3cdddff49aff08db8. X.org should not be providing a custom SHA1 implementation.
2008-09-23Render: Use built-in SHA1 libraryJohn Tapsell4-28/+240
Getting an external library for SHA1 is a mess, so just use our own, regrettably. Public domain implementation.
2008-08-28Prepare for array-index based devPrivates.Tomas Carnecky3-4/+9
TODO: static indices can be made just an int; some indices can be combined.
2008-08-27Remove unused GetGlyphPrivatesForScreen.Eamon Walsh2-11/+0
2008-08-20Centralize declaration of ConnectionInfo.Adam Jackson1-2/+0
2008-07-24Remove all empty extension reset hooks, replace with NULL.Adam Jackson1-9/+1
2008-07-22Don't return BadAlloc when trying to set a PictureFilter with no parameters ↵Pierre-Loup A. Griffais1-1/+1
when a filter with parameters was previously set. Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2008-06-24Bug #15369: Don't reduce Over to Src for transform + RepeatNone.Owen Taylor1-2/+14
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.