Commit Graph

123 Commits

Author SHA1 Message Date
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
Ville Syrjala
a5266dcb3a composite: Update borderClip in compAllocPixmap()
Previously the parent constrained borderClip was copied over
when compRedirectWindow() is called. That is insufficient eg. in
case the window was already redirected, but not yet realized. So
copy the borderClip over in compAllocPixmap() instead.

Example:
Window 1 is below an automatically redirect window 2. Window 2 is
unmapped and moved outside the extents of window 1. Window 2 is
then mapped again, and MarkOverlappedWindows() uses the up to
date borderSize of window 2 to mark windows, which leaves
window 1 unmarked. Then exposures are calculated using the stale
borderClip of window 2, which causes the window below window 2,
to be exposed through an apparent hole in window 1.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=22566

Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-19 17:24:23 -07:00
Matt Turner
2c7c520cfe Use internal temp variable for swap macros
Also, fix whitespace, mainly around
	swaps(&rep.sequenceNumber)

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:12:04 -04:00
Ville Syrjälä
9504caf1c3 composite: Inhibit window background paint with manual subwindow redirection
The composite extension spec says that window background painting
should be inhibited when the subwindow redirection mode is set to
manual.

This eliminates the ugly flashing effect when compiz unredirects a
fullscreen window.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Owen Taylor <otaylor@fishsoup.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-08-03 20:46:36 -07:00
Pierre-Loup A. Griffais
f1d75f3b74 Revert "composite: Don't backfill non-MapWindow allocations"
This reverts commit db8840600e.

It was an optimization for the resize case, but 193ecc8b45 made
it so that no backfilling takes place on resize if left in.

Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>

Conflicts:

	composite/compalloc.c
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-08-03 20:40:17 -07:00
Ville Syrjälä
eac37f32b8 composite: Recompute clipping when changing between manual and automatic redirection
Call compMarkWindows() when changing between manual and automatic
redirection modes. Otherwise the window clipping won't be recomputed
correctly.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
2011-05-04 19:01:01 +03:00
Ville Syrjälä
f2001b0f6d composite: Fix pWin->redirectDraw when changing between manual and automatic redirection
compAllowPixmap() is not called when changing between manual and
automatic redirection modes. That means pWin->redirectDraw is left
with an incorrect value, and miComputeClips() gets confused whether
the window is supposed to be treated as transparent or not. Fix
the issue by updating pWin->redirectDraw in compCheckRedirect()
even when not calling compAllocPixmap().

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
2011-05-04 19:01:01 +03:00
Ville Syrjälä
74663e6152 composite: Copy the window contents back from the pixmap
Since extra expose events are no longer generated during window
unredirection, the window contents must be preserved by the server.
So copy the window contents back from the pixmap. The copy can only
be done after the clips have been recomputed, so delay the copy and
the pixmap destruction until ValidateTree is done. Window borders are
restored by HandleExposures and thus don't need to be copied back.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-05-04 19:01:01 +03:00
Ville Syrjälä
193ecc8b45 composite: Get rid of the internal UnmapWindow+MapWindow cycle
Eliminate the internal MapWindow+UnmapWindow cycle around window
redirection changes. Instead do the work in a single pass by marking
the afected windows and calling ValidateTree and HandleExposures
directly. This gets rid of unnecessary expose events, and invalid
ClipNotify calls during rediredction changes. Now ClipNotify will only
get called with the final clip values, and expose events are only sent
to areas that actually got exposed.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-05-04 19:01:01 +03:00
Ville Syrjälä
a6ae917462 composite: Initialize borderClip with current values
ValidateTree needs a valid borderClip so initialize the parent
constrained border clip with the window's current borderClip
in compRedirectWindow.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-05-04 19:01:01 +03:00
Ville Syrjälä
ce9eff9e4c composite: Call ValidateGC after ChangeGC
ChangeGC changes the GC, so ValidateGC should be called after it, not
before.

Also pass NullClient instead of serverClient to ChangeGC() since we
know the changed values to be valid, and setting
serverClient->errorValue seems pointless anyway.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-05-04 19:01:01 +03:00
Adam Jackson
dc0cf75967 Revert "composite: Don't backfill non-bg-None windows"
This reverts commit 6dd775f57d.

Bugzilla: https://bugs.freedesktop.org/34427

Acked-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-04-15 12:55:48 -04:00
Dave Airlie
5a94934487 panoramiX: consolidate common id assignment code.
This adds a new FOR_NSCREENS_FORWARD_SKIP, which skips the first
element and is a common idiom throughout panoramiX code.

It then adds a new inline function to hide id assignment to a
panoramiX resource and cleans up lots of common repeated code.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-03-10 11:00:48 +10:00
Ville Syrjälä
f3480286ae composite: Support updating an arbitrary subtree
Rename compUpdateWindow to compPaintWindowToParent and split the child
walk to compPaintChildrenToWindow. Calling compPaintChildrenToWindow
allows an arbitrary subtree to be updated, instead of having to update
all the windows. This will be used to make sure all the descendants are
copied to the parent when the parent window contents need to be accessed
in IncludeInferios sub-window mode.

WindowRec has a new member 'damagedDescendants' that is used to keep
track of which subtrees need updating. When a window is damaged,
'damagedDescendants' will be set for all the ancestors, and when a
subtree is updated, the tree walk can be stopped early if no damaged
descendants are present.

CompScreenRec no longer needs the 'damaged' member since the root
window's 'damagedDescendants' provides the same information.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-05 11:57:31 -08:00
Ville Syrjälä
b89e6dbdfb composite: Add SourceValidate wrapper
When SourceValidate is performed on a window with IncludeInferiors
sub-window mode, force an immediate update of all the automatically
redirected windows, so that the current window contents will be up
to date.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-05 11:57:25 -08:00
Ville Syrjälä
84154954db composite: Add GetImage wrapper
When GetImage is performed on a window, force an immediate update of
all the automatically redirected windows, so that the current window
contents will be up to date.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-05 11:57:04 -08:00
Ville Syrjälä
a5dc3531e1 Revert "composite: Convert compWindowUpdate to use TraverseTree"
TraverseTree visits the parent before the children. When performing
the automatic redirection updates, the children must be visited before
the parent.

If there are automatically redirected windows on multiple levels of the
tree, updating the parents before the children would cause the parent
updates to use stale data for areas covered by the children. Also
updating the damaged children would re-damage the parent, which would
cause additional walks over the tree.

In the worst case with an unbroken chain of automatically redirected
subwindows, all of which are damaged, only the leaf window would be
properly updated on the first round. Then it's parent would be properly
updated on the second round, and so on. And on every round all of the
ancestor windows would be updated as well, but with stale data.
So with N damaged windows you would end up with (N^2+N)/2 updates,
instead of the expected N.

This reverts commit 648c8871c9.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-05 11:56:56 -08:00
Pauli Nieminen
ed8db09b4b composite: Remove unnecessary variable.
We know that there is damage if the dynamic block handler is registered.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:52:51 +00:00
Pauli Nieminen
c038b8b28e composite: Only register the block handler when it is required
Even calling block handler that doesn't do much is costly in arm. It
takes a few microseconds each time which adds up to relative high CPU
time because it is done 500+ times per second.

Simple optimization is to register the block handler only when it is
required.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:52:51 +00:00
Alan Coopersmith
2db6951763 Sun's copyrights now belong to Oracle
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
David Reveman
84a14fab8f composite: add panoramix support
Taken from:
50d2d8c896
dbffd0d44a
9b5b102163
75f9b98af3
07fba8b1f7

With minor style fixes, ported to dixLookupResourceByType, and ported
away from client->noClientException and xalloc/xfree.

v2: Fix a memory leak in PanoramiXCompositeNameWindowPixmap, spotted by
James Jones.
v3: Fix a buglet in PanoramiXCompositeUnredirectSubwindows, spotted by
Dave Airlie.
v4: Fix a style issue with resource lookup noted by Jamey Sharp.

Reviewed-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:47:42 -05:00
Eric Anholt
f36153e3ef Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter.
In all these cases, any rendering implied by this damage has already
occurred, and we want to get the damage out to the client.  Some of
the DamageRegionAppend calls were explicitly telling damage to flush
the reportAfter damage out, but not all.

Bug #30260. Fixes the compiz wallpaper plugin with client damage
changed to reportAfter.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-11-10 15:51:03 -08:00
Adam Jackson
d6d90a4fcc composite: Move the backfill comment to a more appropriate indent level
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18 17:38:23 -04:00
Adam Jackson
db8840600e composite: Don't backfill non-MapWindow allocations
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18 17:38:18 -04:00
Adam Jackson
6dd775f57d composite: Don't backfill non-bg-None windows
If there's a defined background then backfilling is a waste of effort,
since exposure processing will paint that in for us.  But note that we
have to backfill if any children are bg=None to preserve semantics with
non-composited servers.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18 17:37:10 -04:00
Adam Jackson
648c8871c9 composite: Convert compWindowUpdate to use TraverseTree
v2: Use != RedirectDrawNone, since we aren't called for manual windows.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-10 11:56:57 -07:00
Dave Airlie
82d41ada99 composite: fix freeing of old pixmap until after move/resize/cbw (bug 28345)
The fixes for the composite reallocation failure, were freeing the oldpixmap
straight after reallocating the new one, however this led to some wierd
effects in e16 compositing, and I think in a few other places. This patch
moves the freeing of the pixmap into the post wrapped stage. I'm not sure if
we are actually better off breaking ABI and adding another callback from the
ConfigureWindow to composite to make sure the old pixmap is always freed,
but this should be satisfactory as we should always hit one of the freeing
paths or else its a bug in the DIX.

bug: https://bugs.freedesktop.org/show_bug.cgi?id=28435

Reported-by: Andrew Randrianasulu <randrik@mail.ru>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22 11:41:20 -07:00
Keith Packard
faeebead7b Change the devPrivates API to require dixRegisterPrivateKey
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-06-05 19:23:03 -07:00
Keith Packard
2dc138922b Rename region macros to eliminate screen argument
This is a combination of a huge mechanical patch and a few small
fixups required to finish the job. They were reviewed separately, but
because the server does not build without both pieces, I've merged
them together at this time.

The mechanical changes were performed by running the included
'fix-region' script over the whole tree:

$ git ls-files | grep -v '^fix-' | xargs ./fix-region

And then, the white space errors in the resulting patch were fixed
using the provided fix-patch-whitespace script.

$ sh ./fix-patch-whitespace

Thanks to Jamey Sharp for the mighty fine sed-generating sed script.

The hand-done changes involve removing functions from dix/region.c
that duplicate inline functions in include/regionstr.h, along with
their declarations in regionstr.h, mi.h and mispans.h.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-05 18:59:00 -07:00
Dave Airlie
959a1eaf1c composite: use config notify hook to do pixmap resize.
Since reallocating the backing pixmap can fail, we need to try and do
it before any other side effects of reconfiguring the window happen.

This changes the ConfigNotify hook to return status, and moves the
composite window reconfiguration wrappers to ConfigNotify. They all
basically did the same thing, so we can drop the MoveWindow,
ResizeWindow, ChangeBorderWidth wrappers, and allow ConfigNotify to do
all the work. If reallocation fails we fail before we send any
confiureNotify events, or enter the area we can't recover from.

The only place we now enforce 32k limits are in EXA/UXA/fb, so drivers
that don't use this should probably deal with it in their pixmap
allocate if they don't already.

This also breaks ABI, so we need an alternate fix for older servers,
working on the X server makes me realise why I'm a kernel hacker.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-03 21:26:24 -07:00
Jamey Sharp
e7fae9ecc4 Move each screen's root-window pointer into ScreenRec.
Many references to the WindowTable array already had the corresponding
screen pointer handy, which meant they usually looked like
"WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of
keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.

Since dix uses this data, a screen private entry isn't appropriate.

xf86-video-dummy currently uses WindowTable, so it needs to be updated
to reflect this change.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03 14:03:23 -07:00
Jamey Sharp
80b5d3a326 Move each screen's screensaver data into ScreenRec.
Most references to the savedScreenInfo array already had the
corresponding screen pointer handy, which meant they usually looked like
"savedScreenInfo[pScreen->myNum]". Adding a field to ScreenRec instead
of keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.

Since dix uses this data, a screen private entry isn't appropriate.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03 14:03:22 -07:00
Dave Airlie
91a6359caf composite: initialise pOldPixmap to NullPixmap at alloc time.
We just never initialised the malloced value.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-02 21:01:09 -07:00
Jamey Sharp
e291c56182 Return an appropriately-typed error from dixLookupResourceByType.
Rather than always returning BadValue, associate an error status like
BadWindow with a resource type like RT_WINDOW, and return the
appropriate one for the requested type.

This patch only touches the core protocol resource types. Others still
return BadValue and need to be mapped appropriately.

dixLookupResourceByType can now return BadImplementation, if the caller
asked for a resource type that has not been allocated in the server.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 12:32:48 -07:00
Jamey Sharp
92ed75ac59 Eliminate boilerplate around client->noClientException.
Just let Dispatch() check for a noClientException, rather than making
every single dispatch procedure take care of it.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-05-13 17:14:07 -07:00
Jamey Sharp
6a84cd9434 Replace dixChangeGC with calls directly to the right variant.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13 17:14:07 -07:00
Jamey Sharp
e2929db7b7 dixChangeGC callers: Use ChangeGCVal instead of XID almost everywhere.
The exceptions are ProcChangeGC and CreateGC.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13 17:13:48 -07:00
Mikhail Gusarov
3f3ff971ec Replace X-allocation functions with their C89 counterparts
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-05-13 00:22:37 +07:00
Rami Ylimaki
5b9a52be7e os: Prevent core dump from being truncated.
The problem fixed by this patch can be reproduced on Linux with the
following steps.
- Access NULL pointer intentionally in ProcessOtherEvent on key press.
- Instead of saving core dump to a file, write it into a pipe.
  echo "|/usr/sbin/my-core-dumper" > /proc/sys/kernel/core_pattern
- Dump the core by pressing a key.

While the core is being dumped into the pipe, the smart schedule timer
will cause a pending SIGALRM. Linux kernel stops writing data to the
pipe when there are pending signals. This causes the core dump to be
truncated. On my system I'm expecting a 6 MB dump but the size will be
60 kB instead. The problem is solved if we block the SIGALRM caused by
expired smart schedule timer.

I haven't been able to reproduce this problem in the following cases.
- Save core dump to a file instead of a pipe.
- kill -SEGV `pidof Xorg`
- Press a key to dump core while gdb is attached to Xorg.
- Give option -dumbSched to Xorg.

Also note that the fix works only when NoTrapSignals has the default
value FALSE. The problem can still be reproduced if error signals
aren't trapped. In addition to pending SIGALRM, there is a similar
problem with pending SIGIO from the keyboard driver during core dump.

Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-17 23:20:52 -08:00
Alan Coopersmith
895f40792a Add type name argument to CreateNewResourceType
Convert all calls of CreateNewResourceType to pass name argument

Breaks DIX ABI.

ABI versions bumped:

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18 17:44:12 -08:00
Alan Coopersmith
a11c58fa0c Ensure all resource types created have names registered
Calls RegisterResourceName to record the type name for
use by X-Resource, XACE/SELinux/XTsol, and DTrace.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-18 16:51:45 -08:00
Alan Coopersmith
c9726bbe31 Update Sun license notices to current X.Org standard form
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-16 17:11:35 -08:00
Michel Dänzer
b375be9285 composite: Revert changes from adding support for BGRA picture formats.
They were aimed towards a since abandoned approach for making radeon KMS work
on big endian machines, and Aaron Plattner pointed out that they break the
Composite extension when the X server runs in 16bpp.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Tested-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-09 16:04:52 -07:00
Jamey Sharp
b0dd6be2c8 Cast small-int values through intptr_t when passed as pointers
On 64-bit systems, int and pointers don't have the same size, so GCC gives
warnings about casts between int and pointer types. However, in the cases
covered by this patch, it's always a value that fits in int being stored
temporarily as a pointer and then converted back later, which is safe.
Casting through the pointer-sized integer type intptr_t convinces the
compiler that this is OK.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-10-08 13:38:44 +11:00
Dave Airlie
6ffda5aae7 dix/glx/composite: consolidate visual resize in one place.
The previous code was copied and in both cases incorrectly fixed
up the colormaps after resizing the visuals, this patch consolidates
the visual resize + colormaps fixups in one place. This version
also consolidates the vid allocation for the DepthPtr inside the
function.

I'm not 100% sure colormap.[ch] is the correct place for this but
visuals are mostly created in fb and I know thats not the place to
be resizing them.

Fixes fd.o bug #19470.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-30 10:00:07 +10:00
Peter Hutterer
55747d256d input: define server-supported protocol versions in one single file.
include/protocol-versions.h specifies each extension version as supported by
the server and sent back on the wire to the client.

This fixes up several issues with the server potentially reporting a higher
version of the protocol if recompiled against a newer version of the
protocol.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Rémi Cardona <remi@gentoo.org>
Acked-by: Julien Cristau <jcristau@debian.org>
2009-09-21 21:47:35 +10:00
Adam Jackson
9d8fc33cae composite: Move screen init before extension registration.
Otherwise, you'd still advertise the extension even if no screens
actually supported it, and the first Composite protocol request would
probably crash.
2009-08-20 17:11:57 -04:00
Michel Dänzer
842373104d Add support for RENDER BGRA formats. 2009-08-04 23:23:21 +02:00
Alan Coopersmith
8609a4e883 Correct some Sun license notices to Sun's standard X11 license format
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-05-15 11:24:15 -07:00
Aaron Plattner
a8cf63fd18 Export CompositeRegisterAlternateVisuals.
Drivers need this if they add visuals that require implicit redirection.  Add a
new SDK header, compositeext.h, to contain the prototype for this function.
2009-04-27 13:29:40 -07:00