Commit Graph

26 Commits

Author SHA1 Message Date
Adam Jackson 70b402be26 render: Hide/unexport some implementation details
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:40:57 -04:00
Peter Hutterer 732fd7e571 Drop trailing whitespaces
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-11-12 10:25:00 +10:00
Keith Packard 60014a4a98 Replace 'pointer' type with 'void *'
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>
2014-01-12 10:24:11 -08: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
Chris Wilson 525d4172b2 render: export TriStrip and TriFan to the drivers
Rather than perform an intermediate copy and expand the strip and the
fan into a triangle list (thereby tripling the number of edges that the
driver needs to process), allow the backend to hook directly into the
appropriate Composite function.

In order to extend the PictureScreen, without needlessly bumping the
ABI, we move the existing copy implementations to mipict.c and assign
those by default. To notify the ddx that the new entry points are
available, we introduce PICTURE_SCREEN_VERSION.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2011-10-18 12:04:47 -07:00
Søren Sandmann Pedersen d7f8011418 Remove TriStrip and TriFan from the picture screen
These functions no longer go through the screen vtable, so remove
them and fix up the various wrappers.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Soren Sandmann <ssp@redhat.com>
2011-03-14 14:09:07 -04:00
Søren Sandmann Pedersen 57b35adaed Remove geometry arguments from miSourceValidate()
The only user of the geometry coordinates is the software sprite code,
which uses them to remove the pointer whenever the window beneath is
being used as a source. However, using Window pictures as a source is
extremely rare (let alone *partial* windows), so there is no harm done
in just validating all of the drawable.

Additionally, the miSourceValidate() function was buggy in at least
three respects:

(a) It added drawable->{x,y} before calling down, which is wrong since
    the misprite code already adds them in its check. (Alternatively,
    the misprite code is wrong, but there are actual users who would
    notice if that code was broken).

(b) It didn't account for the width of the interpolation filter, so if
    the Picture had a bilinear or convolution filter, the edges
    surrounding the source area would not be validated.

(c) It didn't validate alpha maps.

Finally, computing the bounding box of the transform on every
composite request was a real performance issue in pixman, so
presumably it could be one here as well.

This patch changes miSourceValidate() to simply validate all of the
underlying drawable.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Soren Sandmann <ssp@redhat.com>
2011-03-14 13:57:42 -04: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
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
Paulo Cesar Pereira de Andrade fb22d4d928 Remove declarations of symbols that are never defined.
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-30 01:33:20 -02:00
Eric Anholt 4b14c9a9cd Replace calls to Glyphs screen hook with CompositeGlyphs and remove dead code.
Not all of the DDX/miext Glyphs hook implementations have been removed, but
they should be.
2007-10-19 16:34:54 -07:00
Søren Sandmann Pedersen 54e023cec0 Don't pass regions to pixman_image_composite() anymore. 2007-06-11 09:43:15 -04:00
Adam Jackson 0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Eric Anholt 601ab861b4 Add glyph privates for Xgl, which uses them to implement a glyph cache. EXA
would probably also like to do this. This breaks module ABI for EXA and
    XAA, and likely breaks proprietary drivers as well.
2006-01-03 22:06:23 +00:00
Eric Anholt 08708f7d61 Merge from xserver: Make the existing ChangePictureFilter and
ChangePictureTransform screen hooks get called at appropriate times.
2005-12-28 11:48:14 +00:00
Daniel Stone 825a95a1fa Remove use of dix-config and xorg-config.h from public headers. 2005-08-24 11:18:35 +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
Markus Kuhn 44f4713a05 Encoding of numerous files changed to UTF-8 2004-12-04 00:43:13 +00:00
Keith Packard 196aafb19a Add RenderAddTraps. Rewrite trapezoid rendering code. 2004-08-06 23:42:10 +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