Commit Graph

46 Commits

Author SHA1 Message Date
Peter Hutterer bf3a591fdc fb: remove some superfluous empty lines
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-29 13:52:55 +10:00
Adam Jackson 266cd552bd fb: Hide glyph implementation details
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:48 -04:00
Keith Packard 3c2c59eed3 fb: Publish fbGlyphs and fbUnrealizeGlyph
This lets other code jump directly into the fb code for fallbacks

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-04-03 13:07:51 -07:00
Keith Packard 9838b7032e Introduce a consistent coding style
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>
2012-03-21 13:54:42 -07:00
Søren Sandmann Pedersen 566f1931ee Move miTriangles to fb as fbTriangles()
The fb version simply calls the new pixman_composite_triangles(). This
allows us to get rid of miCreateAlphaPicture().

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Søren Sandmann <ssp@redhat.com>
2011-02-26 13:58:54 -05:00
Søren Sandmann Pedersen 788ccb9a8b Move miTrapezoids() into fb as fbTrapezoids()
The main consumer of trapezoids, cairo, is using the Trapezoids
request, which is currently implemented in the miTrapezoids()
function. That function splits the request into smaller bits and calls
lower level functions such as AddTrap.

By moving the implementation of the whole request into fb, we can
instead call pixman_composite_trapezoids() to do the whole request in
one step.

There are no callers of miTrapezoids in any of the open source
drivers, although exa and uxa have their own copies of the function.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Søren Sandmann <ssp@redhat.com>
2011-02-26 13:58:53 -05:00
Søren Sandmann Pedersen 3dc3aefb88 fb: Delete a bunch more left-overs
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-02 03:36:45 -04:00
Søren Sandmann Pedersen 0dae479e16 fb: Delete fbCompositeGeneral()
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-02 03:36:45 -04:00
Søren Sandmann Pedersen 74bc2d8c6b render: Delete renderedge.[ch]
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-01 22:54:18 -04:00
Søren Sandmann Pedersen 6118346d64 Delete unused fbWalkCompositeRegion()
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-11-01 22:04:49 -04:00
Michel Dänzer 842373104d Add support for RENDER BGRA formats. 2009-08-04 23:23:21 +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
Soren Sandmann Pedersen 9d87ef4e0d - Make image_from_pict() non-static
- Delete fbedge.c and fbedgeimp.h
- Use pixman_rasterize_edges() in fbtrap.c
2007-05-23 15:50:25 -04:00
Soren Sandmann Pedersen 56fd927155 Remove fast path code from fbpict.c
Remove the various fast path functions from fbpict, and instead use
pixman_image_composite().
2007-05-21 20:00:25 -04:00
Soren Sandmann Pedersen d2f813f7db New fbWalkCompositeRegion() function
This new function walks the composite region and calls a rectangle
compositing function on each compositing rectangle. Previously there
were buggy duplicates of this code in fbcompose.c and
miext/rootles/safealpha/safeAlphaPicture.c.
2007-05-03 12:17:24 -04:00
Soren Sandmann Pedersen e0959adcd8 Add fbCompositeRect() as another special case in the switch of doom in fbpict.c
This is phase one of getting the two region walkers in fbcompose.c and
fbpict.c merged together.
2007-05-03 12:17:24 -04:00
Soren Sandmann Pedersen 2d9a7a7687 From pixman (Jeff Muizelaar)
Fix up the fast-path compositing operators; those are useful for
    sources without alpha, but can't be used for sources with
    alpha. Also, replaced fbCompositeSrcSrc_nxn with call to fbBlt as
    this function must handle 1, 4, 8, 16, 24, 32 bpp objects. Would
    be nice to optimize fbBlt for common cases involving 8, 16, 24 and
    32bpp.

    From Keith Packard.
2007-04-24 14:46:59 -04:00
Soren Sandmann Pedersen 077a5d4555 Add functions fbCompositeSrcSrc_nxn() and fbCompositeTrans_0565xnx0565
from xserver via pixman. Add READ/WRITE and fbFinishAccess as
appropriate.
2007-04-24 12:57:55 -04:00
Eric Anholt 2dc866252c Really fix optimized render cases being hit when they shouldn't.
I don't know how this define slipped in there.  Fixes
6fdfd9dad9.
2007-01-22 08:41:50 +08:00
Eric Anholt 6fdfd9dad9 Fix several cases where optimized paths were hit when they shouldn't be.
This fixes a number of rendercheck cases.
2006-11-01 14:41:12 -08:00
Aaron Plattner ee02e64788 Wrap libwfb memory access.
Use the READ and WRITE macros to wrap memory accesses that could be in video
memory.  Add MEMCPY_WRAPPED and MEMSET_WRAPPED macros to wrap memcpy and
memset, respectively.
2006-08-01 13:45:43 -07:00
Aaron Plattner a4005c15fb Add framebuffer access wrapper infrastructure.
Create fbPrepareAccess macros to call into the driver to set up the
wfbReadMemory and wfbWriteWemory pointers.  Call these from fbGetDrawable and
fbGetStipDrawable.

Add the READ and WRITE macros, which expand to simple memory accesses for fb,
and calls through the function pointers for wfb.

Add fbFinishAccess macro to give the driver an opportunity to clean up.  Add
calls to this in the appropriate places.
2006-07-26 15:48:51 -07:00
Adam Jackson 0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Eric Anholt 64ac7401ad Fix a copy'n'paste-o that would result in mis-rounding of the results of
several composite operators in A and G channels.
2005-12-28 10:43:02 +00:00
Eric Anholt ecaa46380e Bugzilla #4616:
- Merge various fb/ bits of COMPOSITE support from xserver, which weren't
    necessary before due to cw hiding the issues. Fixes offset calculations
    for a number of operations, and may pull some fixes that cairo has
    wanted for XAA as well.
- Add a new call, miDisableCompositeWrapper(), which a DDX can call to keep
    cw from getting initialized from the damage code. While it would be
    cleaner to have each DDX initialize it if it needs it, we don't have
    control over all of them (e.g. nvidia).
- Use the miDisableCompositeWrapper() to keep cw from getting set up for
    screens using EXA, because EXA is already aware of composite. Avoiding
    cw improved performance 0-35% on operations tested by ajax in x11perf.
2005-10-02 08:28:27 +00:00
Søren Sandmann Pedersen 1eed84f227 Fri Aug 12 14:45:54 2005 Søren Sandmann <sandmann@redhat.com>
Fix up multiplications based on patch by Billy Biggs. Part of bug 3945.
2005-08-12 18:47:17 +00:00
Lars Knoll 41002623f3 Add MMX Code paths for the basic composition operations in
fbComposeGeneral.
2005-07-12 10:02:10 +00:00
Lars Knoll a4df8ad755 Fix handling of "super luminescent" colors Fix off by one error in the
transformation handling.
2005-07-04 14:23:59 +00:00
Daniel Stone e03198972c Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
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-03 07:02:09 +00:00
Lars Knoll b5b2a0522e Add support for gradients and solid fills to Render.
Changed the semantics of the Convolution filter a bit. It now doesn't try
    to normalize the filter values but leaves this to the client. This
    gives more reasonable behaviour in the limit where the filter
    parameters sum up to 0.
2005-07-01 10:05:43 +00:00
Adam Jackson 0f7136191b Bug #3434: Don't define fbAddTraps twice. (Mike A. Harris) 2005-06-09 02:03:50 +00:00
Adam Jackson 2de24db63e Render performance improvements. (Lars Knoll, Zack Rusin) 2005-05-08 23:34:15 +00:00
Søren Sandmann Pedersen 59d7222b13 Sat Mar 26 19:00:30 2005 Søren Sandmann <sandmann@redhat.com>
Remove accidentally committed prototype.
2005-03-27 00:17:12 +00:00
Søren Sandmann Pedersen 476ae15640 Sat Mar 26 18:49:21 2005 Soeren Sandmann <sandmann@redhat.com>
programs/Xserver/fb/fbmmx.h
New function.
Hook it up here
2005-03-26 23:50:24 +00:00
Adam Jackson 79a7120983 Bug #1895: Fix fbComposeGetSolid for BGR. (David S. Miller) 2005-01-16 01:59:23 +00:00
Markus Kuhn 44f4713a05 Encoding of numerous files changed to UTF-8 2004-12-04 00:43:13 +00:00
Keith Packard a29bfbd3d0 Empty damage object when freeing pixmap.
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-13 08:16:14 +00:00
Keith Packard 196aafb19a Add RenderAddTraps. Rewrite trapezoid rendering code. 2004-08-06 23:42:10 +00:00
Søren Sandmann Pedersen cc3e0173d9 Thu Jul 22 20:03:11 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Call MMX solid fill routine when available.
Call MMX operations when available.
New HasGcc34 macro
New file with many operations implemented with MMX intrinsics, conditional
    on having GCC 3.4 on i386.
2004-07-22 19:24:50 +00:00
Eric Anholt 4078457919 Fix problems in render fb implementation found by rendercheck:
- fbCombineSaturate was pointed at fbCombineDisjointOver, instead of
    fbCombineDisjointOverReverse as it should. Instead, point
    fbCombineDisjointOverReverse at fbCombineSaturate (which is likely to
    be faster).
- fix previously-unused fbCombineSaturate implementation.
- fbCombineMaskAlphaC was just a copy of fbCombineMaskValueC. Make it do
    what it's supposed to (return a cs.alpha).
- fbCombineAtopC didn't invert the source alpha value.
- fix copy'n'paste errors in fbCombine(Dis/Con)jointGeneralC, also source
    alpha wasn't treated in a component fashion.
- fbCompositeSrc_8888* didn't handle when the source lacks an alpha
    channel. Rather than adding that and possilby slowing down the (normal)
    alpha case, don't let x8r8g8b8/x8b8g8r8 Pictures be used in
    fbCompositeSrc_8888* because Over with one of these is just Src.
2004-05-12 01:49:46 +00:00
Egbert Eich 2fb5886200 Merging XORG-CURRENT into trunk 2004-04-23 19:54:30 +00:00
Egbert Eich dae90c3af9 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:34:49 +00:00
Egbert Eich 867451f1ab Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 2004-03-03 12:12:50 +00:00
Egbert Eich df0313d35b readding XFree86's cvs IDs 2004-02-26 13:36:15 +00:00
Egbert Eich 147aae87fd Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 2004-02-26 09:23:53 +00:00
Kaleb Keithley 9508a382f8 Initial revision 2003-11-14 16:48:57 +00:00