Commit Graph

13981 Commits

Author SHA1 Message Date
Keith Packard
15e4d14dfa glamor: Replace fallback preparation code
These offer a simpler and more efficient means for temporarily
transitioning to CPU-accessible memory for fallback implementations.

v2: Do not attempt fallbacks with GLAMOR_DRM_ONLY pixmaps

    glamor cannot transfer pixels for GLAMOR_DRM_ONLY pixmaps using
    glReadPixels and glTexSubImage2D, and so there's no way to perform
    fallback operations with these pixmaps.

v3: Clear ->pbo field when deleting the PBO.  Otherwise, we'd reuse
    the old name next time we fall back on the pixmap, which would
    potentially conflict with some other pixmap that genned a new
    name, or just do a lazy allocation of the name (compat GL context,
    like we currently use) or error out (core GL context, like we hope
    to use some day).  Also, style fixes.  Changes by anholt, acked by
    keithp.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-15 22:02:40 +01:00
Keith Packard
3ac481c9da mi: Draw multiple lines in one FillSpans call in miZeroLine
miZeroLine allocates enough space to draw a line spanning the entire
width/height of the target drawable. When drawing multiple shorter
lines, this leaves most of the space in that buffer unfilled. Let
multiple lines be drawn into the buffer if there is plenty of space.

Speeds up glamor fallback zero-width lines:

Before
    6000000 trep @   0.0020 msec (508000.0/sec): 1-pixel line
    6000000 trep @   0.0020 msec (492000.0/sec): 10-pixel line
    6000000 trep @   0.0023 msec (427000.0/sec): 100-pixel line
    4000000 trep @   0.0035 msec (282000.0/sec): 500-pixel line

After:
  600000000 trep @   0.0000 msec (43400000.0/sec): 1-pixel line
  140000000 trep @   0.0001 msec (13000000.0/sec): 10-pixel line
   16000000 trep @   0.0008 msec (1300000.0/sec): 100-pixel line
    4000000 trep @   0.0038 msec (261000.0/sec): 500-pixel line

(500 pixel lines do not change in performance because the buffer can
only one one of them.)

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-15 22:02:40 +01:00
Keith Packard
ea678a73c5 mi: Fill spans for multiple arcs in miPolyFillArc
This allocates span data for multiple arcs and draws the
whole set in one call, rather than doing them one at a time. For
modern hardware, this is a significant performance improvement.

v2: Limit the number of spans per buffer to 4M to avoid
    integer overflow in computing the malloc size.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-12 22:52:51 -07:00
Keith Packard
a7fce36aff mi: Make miPolyArc draw fast zero-width when possible
Instead of forcing drivers to figure out when to call miZeroPolyArc,
have miPolyArc call that when possible.

This involved renaming the existing miPolyArc call to miWideArc and
creating a new miPolyArc wrapper function as miZeroPolyArc falls back
to miWideArc when the arc is too large to be drawn with the zero-width
code (ellipses larger than 800x800).

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-12 22:52:49 -07:00
Keith Packard
bf1429b203 mi: Create miPolylines as a general-purpose line drawing function
Instead of requiring all drivers to figure out which mi function to
call for each of the four cases, create a single wrapper in mi that
handles them correctly. Now drivers can simply use miPolylines in all
cases.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-12 22:52:47 -07:00
Keith Packard
14d82a2bc3 ephyr: Deal with non-root visual for window
glx will sometimes select a non-root visual, deal with that by
creating a suitable colormap and using that instead of attempting to
use the default colormap.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-12 22:52:36 -07:00
Jeremy Huddleston Sequoia
e27a839bf0 mi: Build fix: mieqProcessDeviceEvent returns void
mieq.c:520:9: error: void function 'mieqProcessDeviceEvent' should not return a value [-Wreturn-type,Semantic Issue]
        return 0;
        ^      ~
1 error generated.

Regression-from: 9fb08310b5
Found-by: Tinderbox

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-06-06 01:04:03 -07:00
Keith Packard
08820f0376 Update to version 1.15.99.903
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04 22:35:38 -07:00
Peter Hutterer
9fb08310b5 mi: don't process events from disabled devices (#77884)
Once a device is disabled, it doesn't have a sprite pointer anymore. If an
event is still in the queue and processed after DisableDevice finished, a
dereference causes a crash. Example backtrace (crash forced by injecting an
event at the right time):

(EE) 0: /opt/xorg/bin/Xorg (OsSigHandler+0x3c) [0x48d334]
(EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x37fcc0f74f]
(EE) 2: /opt/xorg/bin/Xorg (mieqMoveToNewScreen+0x38) [0x609240]
(EE) 3: /opt/xorg/bin/Xorg (mieqProcessDeviceEvent+0xd4) [0x609389]
(EE) 4: /opt/xorg/bin/Xorg (mieqProcessInputEvents+0x206) [0x609720]
(EE) 5: /opt/xorg/bin/Xorg (ProcessInputEvents+0xd) [0x4aeb58]
(EE) 6: /opt/xorg/bin/Xorg (xf86VTSwitch+0x1a6) [0x4af457]
(EE) 7: /opt/xorg/bin/Xorg (xf86Wakeup+0x2bf) [0x4af0a7]
(EE) 8: /opt/xorg/bin/Xorg (WakeupHandler+0x83) [0x4445cb]
(EE) 9: /opt/xorg/bin/Xorg (WaitForSomething+0x3fe) [0x491bf6]
(EE) 10: /opt/xorg/bin/Xorg (Dispatch+0x97) [0x435748]
(EE) 11: /opt/xorg/bin/Xorg (dix_main+0x61d) [0x4438a9]
(EE) 12: /opt/xorg/bin/Xorg (main+0x28) [0x49ba28]
(EE) 13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x37fc821d65]
(EE) 14: /opt/xorg/bin/Xorg (_start+0x29) [0x425e69]
(EE) 15: ? (?+0x29) [0x29]

xf86VTSwitch() calls ProcessInputEvents() before disabling a device, and
DisableDevice() calls mieqProcessInputEvents() again when flushing touches and
button events. Between that and disabling the device (which causes new events
to be refused) there is a window where events may be triggered and enqueued.
On the next call to PIE that event is processed on a now defunct device,
causing the crash.

The simplest fix to this is to discard events from disabled devices. We flush
the queue often enough before disabling that when we get here, we really don't
care about the events from this device.

X.Org Bug 77884 <http://bugs.freedesktop.org/show_bug.cgi?id=77884>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Tested-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04 22:16:28 -07:00
Keith Packard
e6f5d9d7b7 present: Queue flips for later execution
When a flip (or unflip) is pending and a flip request comes in, leave
it queued until the pending flip completes and then execute it.

This fixes a bug where an application submitting back-to-back
present_pixmap requests for sequential frames would alternate between
flipping and copying as the pending flip would cause the new
present_pixmap request to not use a flip.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Frank Binns <frank.binns@imgtec.com>
2014-06-04 22:03:35 -07:00
Frank Binns
2f5cf9ff9a xfixes: disable cursor on X server reset
The initial state of the cursor is set to disabled but this was
never be re-disabled during X server reset. This meant any
application run after an X server reset would have the cursor
displayed even if it hadn't requested this to be the case.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04 21:32:42 -07:00
Brendan King
b92d86a982 dix: fix pixmap leak on server reset
The server is leaking a pixmap (created by CreateDefaultStipple()) on
reset. The leak is caused by some X Server graphics contexts not being
freed on reset by the machine independent cursor code in the server,
which in turn is caused by the cursor cleanup code
(miSpriteDeviceCursorCleanup()) not being called.

Ensures the DeviceCursorCleanup() function is called when the associated
input device is closed on server reset.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04 21:32:30 -07:00
Brendan King
a99c061aaf dix: reference the cursor just once in InitializeSprite()
The new current cursor was being referenced twice, resulting in a
memory leak when the current server generation ended.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04 21:32:14 -07:00
Brendan King
444a1f7a88 fb: fix screen pixmap leak on server reset
Call FreePixmap() instead of free() to destroy the screen pixmap in
fbCloseScreen().

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04 21:31:54 -07:00
Chris Wilson
7ca458493a xfree86: Report Present as a built-in module
This is so that drivers can do a runtime check that Present is available,
similar to existing runtime checks performed by the drivers for DRI.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02 13:11:18 -07:00
Chris Wilson
746be5a03e xfree86: Report DRI3 as a built-in module
This is so that drivers can do a runtime check that DRI3 is available,
similar to existing runtime checks performed by the drivers for DRI and
DRI2.

v2: Only add DRI3 to the list if the module was actually built into the
server (Mark Kettenis).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02 13:11:15 -07:00
Keith Packard
b5526141f7 Merge remote-tracking branch 'jturney/master' 2014-06-02 13:08:23 -07:00
Max Filippov
dc8d068847 xtensa: add support for xtensa architecture
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02 13:05:40 -07:00
Keith Packard
a6ffdc69c4 Merge remote-tracking branch 'jeremyhu/master' 2014-06-02 11:30:24 -07:00
Søren Sandmann
63c48de63b xfree86: Add "modesetting" to list of fallback drivers
To make X -configure work properly, the output of fixup_video_driver_list()
should be in order of preference. Otherwise, the config file may use
the incorrect driver for some devices.

In particular, the drivers that work for all (or many) devices need to be
last in the list. Since the modesetting driver works for many devices,
it needs to be considered a fallback driver.

Signed-off-by: Søren Sandmann <ssp@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02 11:26:35 -07:00
Keith Packard
ab47ec9636 Merge remote-tracking branch 'whot/for-keith' 2014-06-02 11:22:48 -07:00
Robert Ancell
0df871cf34 Fix overflow checking extension versions
The easiest way to check for the version of an extension is to send the maximum
possible version numbers in the QueryVersion request. The X server overflows on
these as it assumes you will send a reasonable version number.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02 11:19:49 -07:00
Adam Jackson
4cbd3fabaa configure: Require sufficiently new wayland-client for xwayland ddx
The explicit release requests were added in 1.3.0, don't try to build
against older.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02 11:16:09 -07:00
Jon TURNEY
a205ec3ab7 configure: Restore DEFAULT_LOGDIR to xwin-config.h, it is used
Commit f37a469134 removed this from
xwin-config.h.in for some reason, but it is used.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-06-02 13:07:46 +01:00
Jon TURNEY
aaaa413456 hw/xwin: Update for __glXLastContext -> lastGLContext
Update for __glXLastContext -> lastGLContext.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-06-02 13:07:17 +01:00
Jeremy Huddleston Sequoia
1c10b37380 XQuartz: Update logic to account for title bar on every display in Mavericks
<rdar://problem/14205847>
http://xquartz.macosforge.org/trac/ticket/832

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-31 17:48:29 -07:00
Jeremy Huddleston Sequoia
ad0ff649c6 XQuartz: Dead code removal (ENABLE_DEBUG_LOG)
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-31 17:48:19 -07:00
Jeremy Huddleston Sequoia
e281288d5a XQuartz: Bump to 2.7.7
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-31 17:47:40 -07:00
Peter Hutterer
cfaf2abbac man: drop specific mention of DontZap in -retro (#71113)
DontZap off is the default anyway, don't mention it specifically to avoid
confusion

X.Org Bug 71113 <http://bugs.freedesktop.org/show_bug.cgi?id=71113>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-05-24 20:05:53 +10:00
Peter Hutterer
e48a132b6d xfree86: fix wrong DontZap documentation (#71113)
X.Org Bug 71113 <http://bugs.freedesktop.org/show_bug.cgi?id=71113>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-05-24 20:02:56 +10:00
Robert Ancell
548fc937b2 Fix overflow checking extension versions
The easiest way to check for the version of an extension is to send the maximum
possible version numbers in the QueryVersion request. The X server overflows on
these as it assumes you will send a reasonable version number.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-05-23 14:38:59 +10:00
Adam Jackson
db2e708f31 glx: Require at least one True/DirectColor visual
Mesa no longer supports rendering to anything less.  GLX 1.2 requires
that the server advertise at least one GLX visual.  GLX 1.3 and 1.4 are
more subtle: they require at least one fbconfig capable of window
rendering, and _also_ require that window-capable fbconfigs have a
non-zero value for the GLX_VISUAL_ID.  In either case we should refuse
to init GLX if there's not at least one GL-capable visual on at least
one screen.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22 18:08:20 -07:00
Steven McDonald
d7a2df0a74 Xi: block SIGIOs while copying device classes around
I've been seeing sporadic (anywhere from once every few days to 3-4
times a day) crashes and freezes in X. The problematic behaviour isn't
always the same, but I chose a particular incident to debug, and found
that X was segfaulting in updateMotionHistory, on line 575 of
dix/getevents.c.

After some further investigation, I found that the bug was being
triggered when a SIGIO was received in DeepCopyPointerClasses, between
the AllocValuatorClass call (line 540) and updating the to->valuator
pointer (line 545). AllocValuatorClass calls realloc() on to->valuator,
so between these lines, it's not guaranteed to point to allocated
memory.

It seems the SIGIO handler is calling updateMotionHistory, which is
reading the memory pointed to by to->valuator and getting a wrong value
for last_motion, which updates buff to point to wildly the wrong place
and thus generates a segfault when a memcpy() is done into buff.

I am attaching a patch which I've been running on that machine for the
past three days, and haven't yet observed any more crashing or freezing
behaviour. The patch simply calls OsBlockSIGIO while
DeepCopyDeviceClasses is in progress, as the state of the X server's
device data structures is not guaranteed to be in a consistent state
during that time.

Debian bug#744303 <https://bugs.debian.org/744303>

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-05-23 11:08:17 +10:00
Peter Hutterer
d3a3ee7a0e os: automatically switch to sigsafe logging when needed
If we're smart enough to warn, we should be smart enough to just pass it
through to the right function. Worst case we lose some formatting specifiers
which pnprintf will complain about anyway. And in most cases it won't matter.

This requires renaming pnprintf to vpnprintf and changing the size_t to int to
be compatible with Xvscnprintf. pnprintf is internal only, the others are
exported API so we can't change them as easily.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-05-23 11:08:13 +10:00
Adam Jackson
6d684f916b shadowfb: Fix initialization
This has to run at initial CreateWindow time, at CreateScreenResources
the root window doesn't actually exist yet.

Tested-by: Michael Thayer <michael.thayer@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Michael Thayer <michael.thayer@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22 17:56:24 -07:00
Adam Jackson
d9e99edd4d glxproxy: Fix memory leak on error path in CreateGLXPixmap (#50281) (v2)
v2: Fix another path spotted by keithp

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22 17:13:59 -07:00
Adam Jackson
dff1f5e1a9 dmx: Fix memory leak in dmxBELoadFont (#50281)
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22 17:13:34 -07:00
Michal Srb
3dba171f5e dri2: Fix detection of wrong prime_id in GetScreenPrime.
Checking the iterating variable ("slave") against null can not detect if the
xorg_list_for_each_entry finished without break being invoked - slave variable
will be always non-null. This caused segfault whenever someone tried to use
DRI_PRIME with incorrect id while having at least one render offloading slave
configured.

Restructurize the GetScreenPrime to work as expected.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22 16:27:44 -07:00
Alexey Brodkin
c08d2b8ccb ARC: Add support for ARC architecture
Xorg server could be built for and run on Synopsys DesignWare ARC cores.
These changes are required for successful building and execution of the server.

Both little-endian and big-endian flavors of ARC cores are supported.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Egbert Eich <eich@freedesktop.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22 16:15:21 -07:00
Peter Hutterer
d5587cf3ac config: revert quirk for the Evoluent Vertical Mouse
This quick makes the mouse behaviour more obvious (LMR buttons generate LMR
events) but goes against the manufacturer's intended defaults:

    Top button - left click.
    Wheel button - .middle click (e.g., for pan and rotate in CAD programs).
    Middle button - right click.
    Bottom button - back.
    Thumb button - forward.

from http://www.evoluent.com/vm3.html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-05-15 12:56:54 +10:00
Dave Airlie
01e18af17f rrcrtc: brackets are hard, lets go shopping.
Slaving two outputs on a secondary GPU to a primary GPU testing
picked this up, in that we'd try to resize to the totally the
wrong thing, then as usual segfault in the rotation code.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2014-05-12 14:55:04 -07:00
Eric Anholt
6dd86f3cba glamor: Don't forget to check whether we can fall back in polysegment.
Part of the _nf contract is that glamor will only return FALSE if
glamor has checked that UXA can actually map the pixmaps (UXA only
allocates the BO itself in the screen pixmap and DRI2 cases, and can't
map it otherwise).  Fixes server segfaults zooming in and out of
libreoffice spreadsheets.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-12 14:47:06 -07:00
Laércio de Sousa
fb24ac0a2c xfree86: fix warnings after MatchSeat patch
This patch fixes some compile warnings that arise after
commit 7070ebeeba
(xfree86: add new key MatchSeat to xorg.conf sections "Device", "Screen", and "ServerLayout")
available at git repository
git://people.freedesktop.org/~whot/xserver for-keith

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-12 14:14:28 -07:00
Eric Anholt
bbfed454b2 glamor: Stop disabling asserts by default.
Disabling asserts is something the user gets to manage.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-12 14:12:26 -07:00
Peter Hutterer
8e2fefe3ef Xi: don't copy a DeviceEvent into an InternalEvent
==26141== Invalid read of size 8
==26141==    at 0x58FAEA: DeliverEmulatedMotionEvent (exevents.c:1484)

An InternalEvent is bigger than a DeviceEvent, thus copying one to the other
reads past the allocated boundary. Shouldn't have any real effect since we
shouldn't access anything past the DeviceEvent boundary if the event type is
correct.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-05-08 12:59:43 -07:00
Peter Hutterer
d7ac9aff06 mi: start calculating the sprite trace from the first child of root
Introduced in
73698d41e4 "Make XYToWindow a screen function"

Moving the code into miwindow.c changed the start of the loop from
RootWindow()->firstChild to DeepestSpriteWindow(). This function is only
supposed to be called from miXYToWindow which resets spriteTraceGood to 1,
thus DeepestSpriteWindow() is always the root window anyway.
What got dropped was the firstChild as the first window to handle, so we may
end up with the root window twice in the sprite trace.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-05-08 12:59:19 -07:00
Keith Packard
d60724b752 Merge commit 'who/for-keith'
Skipping two unreviewed patches; will mark them reviewed and cherry pick
2014-05-08 12:58:41 -07:00
Keith Packard
a5b9757142 glamor: Publish change_window_attributes and copy_window
Because uxa doesn't just use glamor directly, it keeps these two
functions from being wrapped so that they get called
automatically. Publishing these will allow uxa to call them directly.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-05-05 13:18:22 -07:00
Keith Packard
4711182033 glamor: Work around libXfont when it fails to use defaultChar
GetGlyphs is supposed to always return the full list of characters
when there is a default character available. However, if an
application opens a 16-bit two dimensional font and then draws with
8-bit requests, the bitmapGetGlyphs function in libXfont versions up
through 1.4.7 will return zero glyphs if there is no 0th row.

While this is a bug in libXfont and should be fixed there, it's easy
to protect glamor from it by simply falling through to the case that
handles GetGlyphs failures for fonts without a default character.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-05-05 13:18:22 -07:00
Keith Packard
91767a3287 glamor: Fix uxa-entry point for ImageText16
Was interpreting the incoming chars as 8-bits instead of 16-bits,
resulting in the wrong characters being drawn.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-05-05 13:18:22 -07:00