summaryrefslogtreecommitdiff
path: root/fb
AgeCommit message (Collapse)AuthorFilesLines
2010-11-02fb: Delete a bunch more left-oversfbdeleteSøren Sandmann Pedersen2-381/+0
All of these definitions were unused since compositing moved to pixman. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Søren Sandmann <ssp@redhat.com>
2010-11-02wfb: Delete unused renamingsSøren Sandmann Pedersen1-15/+0
These functions haven't existed in a while. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Søren Sandmann <ssp@redhat.com>
2010-11-02fb: Delete fbCompositeGeneral()Søren Sandmann Pedersen2-35/+0
This function was an unused and trivial wrapper around fbComposite(). Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Søren Sandmann <ssp@redhat.com>
2010-11-01render: Delete renderedge.[ch]Søren Sandmann Pedersen2-4/+0
The functions in these files have not been used since trap rasterization was moved to pixman. They survived until now to preserve the server abi. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Søren Sandmann <ssp@redhat.com>
2010-11-01Delete unused fbWalkCompositeRegion()Søren Sandmann Pedersen3-124/+0
This function has not been used since most of the compositing was moved to pixman. The only reason it has survived until now is that it was part of the server ABI. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Søren Sandmann <ssp@redhat.com>
2010-10-13Remove leftover fbSaveAreas & fbRestoreAreas defines from wfbrename.hAlan Coopersmith1-2/+0
The fb functions they try to rename were deleted in 2007 by commit ae7f71a8b3d6756161e55d998d6eec37d2695c98 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-13Delete redundant GC initializations.Jamey Sharp1-7/+1
When a GC is allocated, it is zeroed, including all storage requested with dixRegisterPrivateKey. So CreateGC hooks don't need to initialize anything to zero. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-09-13Delete unused lastWinOrg field from GCs.Jamey Sharp1-3/+0
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-13fb: Delete unused oneRect private field.Jamey Sharp2-2/+0
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-08-20fb: make isClipped always reject negative coordinates (bug 11503)Keith Packard1-1/+1
A window with either dimension > 32767 can be positioned such that coordinates > 32767 are visible on the screen. Attempts to draw to those pixels will generate coordinates wrapped around to negative values. The optimized clipping macro, 'isClipped', in fbbits.h, computes clipping in window space rather than screen space using int16 values, and so it too has coordinates wrapped around to negative values and hence ends up accepting the wrapped drawing coordinates. Two possible fixes for this problem 1) Detect wrapped region coordinates and clip those to 32767. 2) Detect negative incoming coordinates and reject those This patch takes the second approach as it is much shorter, simply detecting when either X or Y incoming coordinate is negative, which can never be 'within' any drawable. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-08-10Don't let alpha maps recurse in fb. Bug 23581.Keith Packard1-6/+18
Recursive alpha maps (where one picture's alpha map is set to a picture with an external alpha map) would be all fine and dandy, except for the case where the client constructs a loop. Detecting this case when setting the alpha map values would be difficult as any time an alpha map is set, the server would have to check for the looping case. Instead, a far simpler fix is to simply disallow recursive alpha maps in the rendering code, the Render spec is ambiguous in this area and allows us to to ignore the recursive case. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-06-10Record some additional library dependencies in xf86 modulesAlan Coopersmith1-0/+2
Helps with symbol resolution when building with -z defs Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-06-10Remove unnecessary parentheses around return values in functionsMikhail Gusarov3-4/+4
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-05Clean up after removal of screen parameters from region macros.Jamey Sharp3-21/+12
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-06-05Change the devPrivates API to require dixRegisterPrivateKeyKeith Packard7-50/+40
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-06-05Rename region macros to eliminate screen argumentKeith Packard19-67/+67
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-05Change region implementation names to eliminate the 'mi' prefixKeith Packard1-2/+2
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-03Move each screen's root-window pointer into ScreenRec.Jamey Sharp1-1/+1
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-05-13Replace dixChangeGC with calls directly to the right variant.Jamey Sharp1-1/+1
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13dixChangeGC callers: Use ChangeGCVal instead of XID almost everywhere.Jamey Sharp1-1/+3
The exceptions are ProcChangeGC and CreateGC. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-12Kill DoChangeGC in favor of dixChangeGC.Jamey Sharp1-1/+1
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-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov6-20/+20
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-04-23fb: track screens' installed colormaps as screen privates.Jamey Sharp1-8/+8
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-19unifdef -B -DRENDER to always include RENDER codeKeith Packard3-15/+0
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-03-21fb: fbFinishScreenInit: leaked_storage: Variable "(visuals|depths)" goes out ↵Oliver McFadden1-0/+4
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-01-27Fix source pictures getting random transforms after 2d6a8f668342a5190cdf43b5.Pierre-Loup A. Griffais1-0/+1
*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>
2009-12-16Update Sun license notices to current X.Org standard formAlan Coopersmith2-58/+44
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-11fb: Adjust transform or composite coordinates for pixman operationsKeith Packard3-26/+58
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-11Split fbGetDrawable into fbGetDrawablePixmap and fbGetPixmapBitsDataKeith Packard1-30/+33
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-11Revert "Fix clipping when windows are used as sources"Keith Packard3-101/+23
This reverts commit e9aa61e9f0d663d5b34a397b943b4d1df44e873d. Conflicts: fb/fbpict.c Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11Revert "Use IncludeInferiors when copying windows before compositing."Keith Packard1-4/+3
This reverts commit 7c7f0c2c6a04f7044d5ce69e97a615735e5831f1. Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11Revert "Reserve space for two GC values in copy_drawable()."Keith Packard1-1/+1
This reverts commit 08df24555cb432eb0d90a3f63275e9485e777c4c. Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-12-11Revert "fb: Don't crash if copy_drawable() returns NULL."Keith Packard1-4/+2
This reverts commit 66a9616d645f5a23225251d197e00b94c79274f6. Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Soeren Sandmann <sandmann@daimi.au.dk>
2009-11-30fb: Don't crash if copy_drawable() returns NULL.Michel Dänzer1-2/+4
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-09-14Add xoff and yoff to drawable->x and drawable->y in create_bits_picture().Soeren Sandmann1-1/+3
These are 0, except when the drawable is a redirected window. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-07Fix "warning: left-hand operand of comma expression has no effect"Eamon Walsh3-18/+30
Signed-off-by: Eamon Walsh <efw@eamonwalsh.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-04Add support for RENDER BGRA formats.Michel Dänzer1-0/+2
2009-07-09Reserve space for two GC values in copy_drawable().Soren Sandmann Pedersen1-1/+1
Pointed out by Pierre Willenbrock.
2009-07-06Use IncludeInferiors when copying windows before compositing.Søren Sandmann Pedersen1-3/+4
Part of bug 22484.
2009-06-18Fix clipping when windows are used as sourcesSøren Sandmann Pedersen3-24/+101
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-05-10Make compositing with transformed windows work again.Søren Sandmann Pedersen1-16/+8
The coordinate translation was broken in pretty much every way imaginable.
2009-04-29Fix most remaining deprecated resource lookups.Eamon Walsh1-2/+4
Callsites updated to use dixLookupResourceBy{Type,Class}. TODO: Audit access modes to make sure they reflect the usage.
2009-02-11fb: add fbDoCopy and fbCopyRegion compatibility wrappers.Maarten Maathuis2-0/+73
2009-02-06fb: move some code to miMaarten Maathuis5-367/+7
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 Andrade36-338/+339
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-02Add visibility flags to XSERVER_CFLAGS.Paulo Cesar Pereira de Andrade2-8/+8
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-11-30Remove declarations of symbols that are never defined.Paulo Cesar Pereira de Andrade2-24/+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 Andrade30-159/+159
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-28Make visible symbols required by xorg modules.Paulo Cesar Pereira de Andrade2-2/+2
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.