summaryrefslogtreecommitdiff
path: root/dix/colormap.c
AgeCommit message (Collapse)AuthorFilesLines
2011-04-04dix: fix memory leak in AllocSharedTiago Vignatti1-0/+1
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
2011-04-04dix: fix memory leak in AllocPseudoTiago Vignatti1-0/+1
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
2010-06-10Remove unnecessary parentheses around return values in functionsMikhail Gusarov1-68/+68
This patch was generated by the following Perl code: perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-06Remove more superfluous if(p) checks around free(p)Mikhail Gusarov1-7/+5
This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ -if(E) { free(E); } +free(E); Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-06-06Replace deprecated bzero with memsetMikhail Gusarov1-6/+6
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Marcin BaczyƄski <marbacz@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-06-05Change the devPrivates API to require dixRegisterPrivateKeyKeith Packard1-6/+19
This patch only changes the API, not the implementation of the devPrivates infrastructure. This will permit a new devPrivates implementation to be layed into the server without requiring simultaneous changes in every devPrivates user. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-05-17Fix build without XACEJulien Cristau1-0/+1
dix/colormap.c and dix/gc.c now dereference a ClientPtr, so they need to include dixstruct.h. Regression introduced by commit 11c69880c7c48ef9e755c4e09fadef7a629d7bc7. Reported-by: Robert Hooker <sarvatt@ubuntu.com> Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-13Quit using clientErrorValue in dix/colormap.c.Jamey Sharp1-14/+12
And that's it! No more clientErrorValue kludge. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov1-64/+64
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>
2009-10-23dix: Fix up colormap fixup.Adam Jackson1-0/+3
FindClientResourcesByType() will walk all colormaps on all screens; we only want to fix up the current screen. Otherwise, screens > 0 will have the visual pointers for their colormaps pointing off into space. Signed-off-by: Adam Jackson <ajax@redhat.com>
2009-09-30dix/glx/composite: consolidate visual resize in one place.Dave Airlie1-0/+64
The previous code was copied and in both cases incorrectly fixed up the colormaps after resizing the visuals, this patch consolidates the visual resize + colormaps fixups in one place. This version also consolidates the vid allocation for the DepthPtr inside the function. I'm not 100% sure colormap.[ch] is the correct place for this but visuals are mostly created in fb and I know thats not the place to be resizing them. Fixes fd.o bug #19470. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-29Fix most remaining deprecated resource lookups.Eamon Walsh1-12/+14
Callsites updated to use dixLookupResourceBy{Type,Class}. TODO: Audit access modes to make sure they reflect the usage.
2009-01-22Remove a bunch of useless casts.Adam Jackson1-17/+15
We've had void * for twenty years now people let's try to act like we know how it works.
2008-12-12Remove #define NEED_EVENTS and NEED_REPLIESPeter Hutterer1-1/+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-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade1-16/+16
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-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade1-7/+7
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-02-29Bug #10464: Set pixel value to 0 before FindColor()Chris Wilson1-0/+1
2007-11-05Merge branch 'master' into XACE-SELINUXEamon Walsh1-20/+20
Conflicts: dix/dispatch.c dix/property.c hw/xfree86/common/xf86VidMode.c include/xkbsrv.h render/glyph.c xkb/xkbActions.c
2007-11-05DIX: Remove usage of allocaDaniel Stone1-20/+20
Replace with heap allocations.
2007-09-05xace: add new fields to resource access hook to allow parent resource objectsEamon Walsh1-1/+1
to be passed in at create time. Also added a missing devPrivates initializer.
2007-08-28devPrivates rework: since API is already broken, switch everythingEamon Walsh1-27/+7
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-06xace: add hooks + new access codes: core protocol colormap requestsEamon Walsh1-0/+11
2007-04-04devPrivates rework: properly free devPrivates on compatibility structures,Eamon Walsh1-0/+2
excluding pixmap.
2007-03-08dix: remove 'register' keyword for all variables.Peter Hutterer1-28/+28
2006-12-14Naming change: Security*Access -> Dix*AccessEamon Walsh1-2/+2
2006-07-21Remove RCS tags. Fix Xprint makefile braindamage.Adam Jackson1-3/+0
2006-07-18get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULEDaniel Stone1-0/+3
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-06-01Kill LBX, too.Daniel Stone1-102/+1
2006-05-22Bug #6924: Restore the ABI for DrawableRec and ColormapRec to the stateAdam Jackson1-1/+8
they were in prior to the fix for #6438. Based on a patch from Andy Ritger.
2006-02-15Mark everything in dixsym.c as _X_EXPORT.Adam Jackson1-10/+10
2005-09-05Initialise private arrays with calloc, rather than standard malloc.Daniel Stone1-3/+2
(Benjamin Herrenschmidt)
2005-07-03Change <X11/misc.h> and <X11/os.h> to "misc.h" and "os.h".Daniel Stone1-2/+2
2005-07-03Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.Daniel Stone1-0/+4
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-01Change all misc.h and os.h references to <X11/foo.h>.Daniel Stone1-3/+3
2005-04-20Fix includes right throughout the Xserver tree:Daniel Stone1-3/+3
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-03-07xc/programs/Xserver/dix/atom.cRoland Mainz1-159/+80
xc/programs/Xserver/dix/colormap.c xc/programs/Xserver/dix/cursor.c xc/programs/Xserver/dix/devices.c xc/programs/Xserver/dix/dispatch.c xc/programs/Xserver/dix/dixfonts.c xc/programs/Xserver/dix/dixutils.c xc/programs/Xserver/dix/events.c xc/programs/Xserver/dix/extension.c xc/programs/Xserver/dix/gc.c xc/programs/Xserver/dix/glyphcurs.c xc/programs/Xserver/dix/grabs.c xc/programs/Xserver/dix/main.c xc/programs/Xserver/dix/pixmap.c xc/programs/Xserver/dix/privates.c xc/programs/Xserver/dix/property.c xc/programs/Xserver/dix/resource.c xc/programs/Xserver/dix/swaprep.c xc/programs/Xserver/dix/swapreq.c //bugs.freedesktop.org/show_bug.cgi?id=2560) attachment #2037 (https://bugs.freedesktop.org/attachment.cgi?id=2037) ANSI-fy Xserver/dix code. The conversion preserves the comments which annotate variables. These have been moved into doxygen(esque?) "stubs" above each function. Patch by Mike Owens <etc@filespanker.com>.
2004-08-13Empty damage object when freeing pixmap.Keith Packard1-11/+7
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-07Remove alpha-related fields from visual structure to retain binaryKeith Packard1-13/+13
compatibilty. Applications using ARGB visuals will need to use Render or other mechanisms to compute pixel values instead of AllocColor
2004-07-31Integrate COMPOSITEWRAP branch including composite wrapper. This code stillEric Anholt1-2/+20
has several issues, including: - CopyWindow and PaintWindow wrappers missing (will be done soon) - Some segfaults seen in the Render wrappers. - Xprt server build breaks with Composite. - DDXs must be recompiled for Composite due to VisualRec size change. - Composite bugs pointed out by Deron Johnson in email. Also, reorder XFixes initialization according to comments by Keith which are also in xserver CVS.
2004-04-23Merging XORG-CURRENT into trunkEgbert Eich1-1/+2
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich1-1/+1
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0Egbert Eich1-1/+1
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich1-1/+1
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich1-1/+1
2003-11-25XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16Kaleb Keithley1-42/+2
2003-11-14XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1Kaleb Keithley1-8/+33
2003-11-14R6.6 is the Xorg base-lineXORG-MAINKaleb Keithley1-0/+2869