Commit Graph

14448 Commits

Author SHA1 Message Date
Adam Jackson
86ce626297 mi: Fold micursor.c into mipointer.c
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:29 -04:00
Adam Jackson
3b63900e90 mi: Fold mipolyutil.c into mipoly.c
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:28 -04:00
Adam Jackson
21b041ef48 mi: Fold mipoly{con,gen}.c into mipoly.c
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:26 -04:00
Adam Jackson
7679afd4da mi: Fold mifpolycon.c into miarc.c
Also put mifpoly.h on a diet, and stop including it from places that
don't need it.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:24 -04:00
Adam Jackson
f307ef10f4 mi: Fold mispans.c into miwideline.c
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:22 -04:00
Adam Jackson
707965407a mi: Unexport arc fill implementation details
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:21 -04:00
Adam Jackson
ce8fff5cd6 mi: Unexport subpixel polygon implementation details
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:19 -04:00
Adam Jackson
a085ba82bd mi: Unexport span group implementation details
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:18 -04:00
Adam Jackson
c15c886ee7 mi: Unexport polygon edge table implementation details
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:16 -04:00
Adam Jackson
9bdc9b0113 mi: Unexport wide line details
XAA wanted these, once upon a time, but that's gone now.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:01 -04:00
Keith Packard
d181e52ceb glamor: Free converted bits in _glamor_upload_bits_to_pixmap_texture fast path
When uploading bits to a texture which need reformatting to match a
supported GL format, a temporary buffer is allocated to hold the
reformatted bits. This gets freed in the general path, but is not
freed in the fast path because that includes an early return before
the call to free.

This patch removes the early return and places the general case under
an 'else' block, so that both paths reach the call to free.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-10-26 17:00:17 -07:00
Andreas Hartmetz
55b27ed70c glamor: Don't free memory we are going to use.
glamor_color_convert_to_bits() returns its second argument on
success, NULL on error, and need_free_bits already makes sure that
"bits" aliasing converted_bits is freed in the success case.
Looks like the memory leak that was supposed to be fixed in
6e50bfa706 only occurred in the error
case.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-26 17:00:17 -07:00
Alan Coopersmith
16a32c53f6 If fork fails in System(), don't fallthrough to exec()
In the unlikely event of a failure in creating processes, signal
masks will fall from the panels above you.  Secure your mask before
telling your child what to do, since it won't exist, and you will
instead cause the server itself to be replaced by a shell running
the target program.

Found by Coverity #53397: Missing break in switch
Execution falls through to the next case statement or default;
 this might indicate a common typo.
In System: Missing break statement between cases in switch statement (CWE-484)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-23 17:32:14 -07:00
Alan Coopersmith
7e5bc49d1e Allocate enough room for both reset & flags attributes
ctx_attribs had room for 3 pairs of attributes, but if both flags & reset
attributes were being returned it was storing 4 pairs in the array.

Found by Coverity #53442:  Out-of-bounds write
This could cause an immediate crash or incorrect computations.
In create_driver_context: Out-of-bounds write to a buffer (CWE-119)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-23 17:31:59 -07:00
Adam Jackson
cffd4e4a4e mi: Mark the span blit routines as _X_COLD
On gcc, __attribute__((cold)) means:

- consider calls to the function to be unlikely for branch prediction
- optimize the function for size
- emit the function in a dedicated cold text section

It's not worth deleting these routines even though there are no longer
in-tree consumers, but we can at least keep them out of i$ at runtime.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-23 17:30:32 -07:00
Keith Packard
de55aafa8f Merge remote-tracking branch 'ajax/xwin' 2014-10-23 17:28:24 -07:00
Adam Jackson
462bf87c4d render: Always store client clip as a region
This does have one semantic change.  FixesCreateRegionFromPicture used to
throw BadImplementation if you tried to create a region from a picture
with no client clip.  I changed that to BadMatch here since that more
honestly describes what's going on.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-23 14:35:49 -07:00
Adam Jackson
3f4edd2e3f xinerama: Fix access mode in GetImage's drawable lookup
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-23 14:29:49 -07:00
William ML Leslie
942e18e17e Xephyr: option to disable grabbing the host
This patch makes it possible to use C-S key combinations
within Xephyr without losing access to the host window manager's
commands.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-10-22 14:16:16 -07:00
Keith Packard
61a292adf4 glx: check return from __glXGetAnswerBuffer
This function can return NULL; make sure every caller tests for that.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-09 15:30:52 +02:00
Keith Packard
d634ecdf82 Merge remote-tracking branch 'ajax/dead-code' 2014-10-09 15:08:31 +02:00
Keith Packard
6622f0cb17 Merge remote-tracking branch 'ajax/mi-cleanup' 2014-10-09 15:05:26 +02:00
Keith Packard
f12e7f4980 Merge remote-tracking branch 'anholt/modesetting-glamor' 2014-10-09 14:21:19 +02:00
Alan Coopersmith
da887726ee Use unique display name for each xi2 test program [v3]
make -j 8 check was sporadically failing in different xi2 tests.
After adding the asserts in the previous commit to catch xkb failure
it became easier to catch the failures and see that multiple tests
were running at once trying to write to /tmp/server-(null).xkm and
then delete it, and interfering with each other.

Putting a unique string into the display variable let them each write
to their own file and not interfere with others.

v2: Fix Linux bits:

  Add #include <errno.h> to get a declaration of
  program_invocation_name on Linux.

  Use only the last portion of the pathname so that the resulting
  display name doesn't contain any slashes.

v3: use program_invocation_short_name on Linux

  This is the same as program_invocation_name, except is has
  stripped off any path prefix.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-09 14:15:45 +02:00
Adam Jackson
5ecd7866f7 misc: Fold together some redundant conditionals
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:19:06 +02:00
Adam Jackson
5b07f1db6d fb: fb{Map,Unmap}Window -> fb{Realize,Unrealize}Window
Make the function names match the screen slot name.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:53 +02:00
Adam Jackson
9ed83a694b mi: miSlideAndSizeWindow -> miResizeWindow
Make the function name match the screen slot name.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:53 +02:00
Adam Jackson
939ca767c7 dix: Remove an obfuscatory macro
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:53 +02:00
Adam Jackson
d138d9ccc6 dix: Remove some pointless casting of NULL
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:53 +02:00
Adam Jackson
277330075b dix: Remove an empty if
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:53 +02:00
Adam Jackson
81d76a835b dix: Lower backStorage to a bit instead of a pointer
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:53 +02:00
Adam Jackson
322ba42c23 dix: Remove DIXsaveUnder bit from the Window
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:53 +02:00
Adam Jackson
1e56b2dfc6 mi: Move pScreen->SendGraphicsExpose up to dix
No DDX is overriding this and it's fairly absurd to expose it as a
screen operation anyway.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:53 +02:00
Adam Jackson
5d3bd8a3dc mi: Drop plane argument from miHandleExposures
This existed to be passed to the bs recovery routine; since we back all
planes, we don't care.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:53 +02:00
Adam Jackson
7eddc80bc4 mi: Simplify composite border clip redirection interface
There's not really a good reason for mi to not just call the composite
code directly.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:53 +02:00
Adam Jackson
7b35dc9b15 mi: Deobfuscate miOverlayWindowExposures
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:52 +02:00
Adam Jackson
fb34f27348 mi: Deobfuscate miWindowExposures
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:52 +02:00
Adam Jackson
0d30d44a8c dix: Drop the third argument from WindowExposuresProcPtr
A careful read shows that it was always NULL.  It hasn't always been; as
the DDX spec indicates, it was the "occluded region that has backing
store", but since that backing store code is long gone, we can nuke it.

mi{,Overlay}WindowExposures get slightly simpler here, and will get even
simpler in just a moment.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:44 +02:00
Eric Anholt
aaf5e2d643 modesetting: Add support for rendering using glamor.
By default modesetting now tries to enable X acceleration using
glamor, but falls back to normal shadowfb if GL fails to initialize.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-10-09 09:48:51 +02:00
Eric Anholt
6d41bdb23c modesetting: Deduplicate some scrn setup.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-10-09 09:48:48 +02:00
Eric Anholt
20a3b48219 modesetting: Fix some weird formatting after x-indent-all.sh.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-10-09 09:48:45 +02:00
Eric Anholt
3119acdab9 modesetting: Run x-indent-all.sh.
As I was editing code, the top-level .dir-locals.el was making my new
stuff conflict with the existing style.  Make it consistently use the
xorg style, instead.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-10-09 09:48:42 +02:00
Adam Jackson
c79f824bf6 xwin: Remove primary DirectDraw engine
Again, as the documentation says, "unsupported, obsolete".

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 09:28:04 +02:00
Adam Jackson
8465ee788f xwin: Remove native GDI engine (v2)
As the man page says, "unsupported, experimental, and barely
functional".  The last even minor updates to any of this were back in
2004, presumably it's not getting better any time soon.

This is also the only GC ops implementation in the tree that actually
falls all the way down to the spans routines for everything, so that's
pretty nice to be rid of.

v2: Fix stray break statement (Jon)

Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 09:27:21 +02:00
Adam Jackson
e2a3e91a56 rootless: remove redundant RootlessShapedWindowIn
miShapedWindowIn is identical.  Which you would expect, since neither
one takes an actual WindowPtr argument, so they couldn't possibly make
reference to rootlessness.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-08 16:01:49 +02:00
Adam Jackson
7e8ac6dcd2 xquartz: Remove useless DRIWindowExposures
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-08 16:01:35 +02:00
Adam Jackson
a8c6fc46c0 kdrive: Remove vestigial reference to fbInitValidateTree
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-08 16:01:35 +02:00
Adam Jackson
7ebf480f5e xfree86: Remove some can't-happen printf from xf86CreateRootWindow
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-08 10:10:39 +02:00
Adam Jackson
3689be96ac vfb: Don't reimplement micmap so much
We know we're atop fb which is atop micmap, the only thing we need to
hook is InstallColormap to handle the xwd colormap change.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-08 10:10:39 +02:00
Adam Jackson
692676debb loader: Remove some baklava code
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-08 10:10:39 +02:00