summaryrefslogtreecommitdiff
path: root/render/glyph.c
AgeCommit message (Collapse)AuthorFilesLines
2014-11-12Drop trailing whitespacesPeter Hutterer1-1/+1
sed -i "s/[ ]\+$//g" **/*.(c|h) happy reviewing... git diff -w is an empty diff. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-12Replace 'pointer' type with 'void *'Keith Packard1-4/+4
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-07-10Render: Remove unused glyphDepthsDaniel Stone1-2/+0
No-one has used this since 0a71e154. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-06dix: introduce gpu screens. (v5)Dave Airlie1-0/+2
This patch introduces gpu screens into screenInfo. It adds interfaces for adding and removing gpu screens, along with adding private fixup, block handler support, and scratch pixmap init. GPU screens have a myNum that is offset by GPU_SCREEN_OFFSET (256), this is used for logging etc. RemoveGPUScreen isn't used until "xfree86: add platform bus hotplug support". v2: no glyph pictures for GPU screens for now. v3: introduce MAXGPUSCREENS, fix return value check v4: fixup myNum when renumbering screens (ajax) v5: drop cursor privates for now. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21render/exa: use glyph picture accessorsDave Airlie1-10/+10
use the glyph picture accessors in the X server, render and EXA code. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21render: add GetGlyphPicture accessor.Dave Airlie1-0/+10
This is a new API to stop the drivers directly looking up the glyph pictures in a global array. It provides a define GLYPH_HAS_GLYPH_PICTURE_ACCESSOR for drivers to work in a compat way. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-21Introduce a consistent coding styleKeith Packard1-478/+416
This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-06Place glyph privates at correct location within the allocate storageKeith Packard1-5/+5
A glyph allocation consists of : GlyphRec numScreens * PicturePtr glyph privates Tell the dix private bits to start past the picture pointers. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-05Change the devPrivates API to require dixRegisterPrivateKeyKeith Packard1-21/+15
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-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov1-11/+11
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-30Delete loop with no effect from GlyphUninitKeith Packard1-9/+0
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-03-24Fix crash when all glyphs of a given depth are freed, but not all glyphsetsPeter Harris1-0/+3
This is how the crash can be triggered with only two clients on the system: Client A: (already running) Client B: Connect Client B: CreateGlyphSet(depthN) Client A: Disconnect Server: free globalGlyphs(depthN) Client B: AddGlyphs(depthN) Server: SEGV This crash was introduced with the FindGlyphsByHash function in 516b96387b0e57b524a37a96da22dbeeeb041712. Before that revision, ResizeGlyphSet was always called before FindGlyphRef, which would re-create globalGlyphs(depthN) if necessary. X.Org Bug 20718 <http://bugs.freedesktop.org/show_bug.cgi?id=20718> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Harris <pharris@opentext.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-15Move SHA1 computation from render/glyph.c to os/Julien Cristau1-27/+9
Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Rémi Cardona <remi@gentoo.org>
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>
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade1-19/+19
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-17/+17
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-10-06xalloc+memset(0) -> xcallocAdam Jackson1-2/+1
2008-10-06xalloc+bzero -> xcallocAdam Jackson1-2/+1
2008-09-23Revert "Render: Use built-in SHA1 library"Keith Packard1-1/+28
This reverts commit d3bd31fddff7894f89ba80a3cdddff49aff08db8. X.org should not be providing a custom SHA1 implementation.
2008-09-23Render: Use built-in SHA1 libraryJohn Tapsell1-28/+1
Getting an external library for SHA1 is a mess, so just use our own, regrettably. Public domain implementation.
2008-08-27Remove unused GetGlyphPrivatesForScreen.Eamon Walsh1-8/+0
2008-05-06Allow using libmd instead of libcrypto for SHA1 hashing in render/glyph.cAlan Coopersmith1-2/+15
Builders can force one or the other by passing SHA1_LIB & SHA1_CFLAGS to configure
2007-11-05Merge branch 'master' into XACE-SELINUXEamon Walsh1-26/+26
Conflicts: dix/dispatch.c dix/property.c hw/xfree86/common/xf86VidMode.c include/xkbsrv.h render/glyph.c xkb/xkbActions.c
2007-11-04Add CreatePixmap allocation hints.Aaron Plattner1-1/+2
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-10-26Restore the CompositeGlyphs -> ps->Glyphs -> miGlyphs callchain to allow ↵Aaron Plattner1-24/+23
acceleration architectures to wrap above miGlyphs.
2007-10-26Include stddef.h for size_t.Bernardo Innocenti1-0/+1
This is required by a buggy version of the openssl/sha.h header which is distributed with Fedora 7.
2007-10-25Merge branch 'master' into XACE-SELINUXEamon Walsh1-37/+295
Conflicts: GL/glx/glxscreens.c hw/xnest/Screen.c render/glyph.c render/glyphstr.h render/render.c
2007-10-19Replace calls to Glyphs screen hook with CompositeGlyphs and remove dead code.Eric Anholt1-0/+213
Not all of the DDX/miext Glyphs hook implementations have been removed, but they should be.
2007-08-28devPrivates rework: since API is already broken, switch everythingEamon Walsh1-306/+15
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-02Create a Picture as well as a Pixmap at the time of AllocateGlyphCarl Worth1-16/+7
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-02Use per-screen Pixmaps for glyphsCarl Worth1-20/+35
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-02Use strong hash (SHA1) for glyphsCarl Worth1-44/+40
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-02ProcRenderAddGlyphs: Avoid allocating a glyph just to find it cachedCarl Worth1-2/+27
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-02Split HashGlyph functionality out into HashGlyphInfoAndBitsCarl Worth1-3/+20
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-04-09Bug #10560: Code-Cleanup: function declarations () -> (void)Stefan Huehner1-2/+2
X.Org Bugzilla #10560: <https://bugs.freedesktop.org/show_bug.cgi?id=10560> Patch #9511 <https://bugs.freedesktop.org/attachment.cgi?id=9511>
2007-03-25Static cleanups, dead code deletion.Adam Jackson1-3/+3
2006-07-21Remove RCS tags. Fix Xprint makefile braindamage.Adam Jackson1-1/+0
2006-01-03Add glyph privates for Xgl, which uses them to implement a glyph cache. EXAEric Anholt1-11/+337
would probably also like to do this. This breaks module ABI for EXA and XAA, and likely breaks proprietary drivers as well.
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-2/+2
2004-12-04Encoding of numerous files changed to UTF-8Markus Kuhn1-1/+1
2004-06-30Add Distributed Multihead X (DMX) supportKevin E Martin1-1/+59
2004-04-23Merging XORG-CURRENT into trunkEgbert Eich1-1/+1
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004Egbert Eich1-1/+1
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004Egbert Eich1-1/+1
2004-02-26readding XFree86's cvs IDsEgbert 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-14Initial revisionKaleb Keithley1-0/+416