Commit Graph

243 Commits

Author SHA1 Message Date
Dave Airlie
336df75f12 EXA: avoid copy operations if no boxes in use
Simple fix for now, I'm sure damage shouldn't be calling us with nbox = 0.
(cherry picked from commit 8f8a9c19ad)
2008-12-16 14:06:25 -05:00
Adam Jackson
5d14e34541 exa: Add exaDrawableIsOffscreen() to the driver API.
(cherry picked from commit 3891dd8924)
2008-11-05 13:02:46 -05:00
Michel Dänzer
f4c33e2e64 EXA: Avoid excessive syncing in PutImage
(cherry picked from commit 2188582e5e)
2008-11-05 13:01:35 -05:00
Julien Cristau
ce6424853c exa: disable shared pixmaps
They got re-enabled in ee7c684f21
("Reimplement ShmPutImage.")
(cherry picked from commit b4762c0245)
2008-09-23 10:36:02 -04:00
Adam Jackson
4652c51e92 Reimplement ShmPutImage.
There's no reason to not just dispatch this straight into the GC.  As a
bonus, if you do so, damage wraps correctly, and thus swcursor works.
The side effect is it's no longer possible to override ShmPutImage with
ShmRegisterFuncs().

Also remove the (broken) damage tracking for same from EXA, since it didn't
work right, and is now superfluous.

(cherry picked from commit ee7c684f21)
2008-08-29 14:36:43 -04:00
Maarten Maathuis
c662381a14 exa: fix assert logic thinko from 361a9eb953
- I guess failing PrepareAccess is rare, since this a 3 year old bug.
2008-08-17 23:20:45 +02:00
Alan Hourihane
8081eda696 Set driverPriv immediately on CreatePixmap.
If it's NULL anyway, we bail, if not, it lets
ModifyPixmapHeader know about the private.
(cherry picked from commit 528b4e36ad)
2008-07-02 11:27:26 -04:00
Keith Packard
795d293d76 Wrap AddTraps in exa and damage.
This fine (and unused) function wasn't ever wrapped which made it not work
under exa.
(cherry picked from commit 06e7e1d048)
2008-06-30 13:50:57 -04:00
Michel Dänzer
facf271b05 EXA: Fix exaGetPixmapFirstPixel() crash if the driver has a CreatePixmap hook.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16243
(cherry picked from commit 6b96281100)
2008-06-09 14:11:46 -04:00
Michel Dänzer
1667ed6e24 EXA: Don't migrate twice in exaImageGlyphBlt.
exaPrepareAccess already handles migration.
(cherry picked from commit f6d61d3d86)
2008-06-09 14:04:21 -04:00
Michel Dänzer
6dee3fdf18 EXA: Don't suggest exaCopyDirty be inlined.
Leave the decision to the compiler toolchain.
(cherry picked from commit d733043982)
2008-06-09 14:04:01 -04:00
Michel Dänzer
3943a3a567 EXA: Specify region used for source pixmap migration in exaCopyNtoN.
Avoids excessive migration overhead in some pathological cases. See
http://bugs.freedesktop.org/show_bug.cgi?id=15845 .
(cherry picked from commit 3baf3b42e0)
2008-06-09 14:03:36 -04:00
Tilman Sauerbeck
200d676be2 EXA: Set pixmap->accel_blocked on the screen pixmap, too.
(cherry picked from commit 3f081b4de5)
2008-06-09 13:44:37 -04:00
Tilman Sauerbeck
2df83b491e EXA: Update sys_pitch/fb_pitch in exaModifyPixmapHeader.
exaModifyPixmapHeader now also only evaluates arguments that have a
meaningful value.
(cherry picked from commit 26c1801a27)
2008-06-09 13:44:32 -04:00
Michel Dänzer
0fba91a532 EXA: Offscreen memory eviction improvements.
* Make sure available areas are considered to have no eviction cost. This seems
  to help for https://bugs.freedesktop.org/show_bug.cgi?id=15513 but I'm afraid
  that may just be coincidence.
* Only calculate eviction cost of each area once for each eviction pass.
  Safeguard against potential (though unlikely) division by zero.
* Cosmetic enhancements: Name eviction cost related variables 'cost' instead of
  'score' to emphasize that smaller values are better, update Doxygen file
  comment to the way eviction works now.
(cherry picked from commit 6c95fae1e9)
2008-06-09 13:44:26 -04:00
Tilman Sauerbeck
46b74e8450 EXA: Update pixmaps' accel_blocked field in ModifyPixmapHeader.
(cherry picked from commit f133d85778)
2008-04-15 11:48:28 +10:00
Tilman Sauerbeck
4161c9781b EXA: Teach exaCompositeFallbackPictDesc() about x8r8g8b8.
(cherry picked from commit bb8868540f)
2008-04-15 11:48:23 +10:00
Fredrik Höglund
841aa08ea4 EXA: Optimize the eviction scanning loop in exaOffscreenAlloc.
Reduce the cost of the inner loop, by keeping a set of pointers to the
first and the last areas in the series, subtracting the cost of the first
area from the score, and adding the cost of the last area while walking
the list.  This commit also moves the scanning loop from exaOffscreenAlloc
into a separate function.

Idea by Michel Dänzer.
(cherry picked from commit 8074676d2d)
2008-04-07 10:29:00 -04:00
Fredrik Höglund
2e4b72dd84 EXA: Improve the algorithm used for tracking offscreen pixmap use.
Replace the current score keeping algorithm with a rolling counter that's
incremented in ExaOffscreenMarkUsed, with the previous value being stored
in the area.  exaOffscreenAlloc uses the difference between the counter
value and the value in the area when deciding which area to evict.
It now also takes the size of the areas into account, and favors evicting
smaller areas.

The credit for these ideas goes to Michel Dänzer.
(cherry picked from commit 93d876891d)
2008-04-07 10:28:54 -04:00
Owen W. Taylor
685a04c2bf EXA: Fix TS origin computation when implementing RenderComposite with tiling.
(cherry picked from commit 6b1a27023e)
2008-04-07 11:15:19 +02:00
Maarten Maathuis
f6d51797a5 EXA: Let the driver decide what repeat/extend types are supported. 2008-02-27 23:44:39 +01:00
Eric Anholt
5cb9e15562 EXA: Fix Render acceleration in copy and tiling cases.
Code shuffling in a634c9b034 broke this by
leaving pSrcPixmap = NULL.
2008-02-20 10:36:06 -08:00
Bernardo Innocenti
e6ea3147bf exa: make the prototype for exaGetPixmapFirstPixel() public
This fixes a warning in amd_drv which is using it.

Signed-off-by: Bernardo Innocenti <bernie@codewiz.org>
2008-01-14 13:09:13 -05:00
Alan Hourihane
57468a696e Fix Line drawing with CapNotLast set in PolySegment. 2008-01-04 12:37:55 +00:00
Eamon Walsh
2d17f47cc7 Merge branch 'master' into XACE-SELINUX
Conflicts:

	hw/xnest/Pixmap.c
	include/dix.h
2007-11-19 18:10:46 -05:00
Ben Skeggs
c89b543198 exa: set driverPriv to NULL before it might get used later with garbage 2007-11-17 18:20:49 +10:00
Eamon Walsh
1603130236 Merge branch 'master' into XACE-SELINUX
Conflicts:

	Xext/xace.c
	Xext/xace.h
2007-11-14 13:35:50 -05:00
Michel Dänzer
9bee1c6912 EXA: Disable problematic optimization of dest pixmap migration by default.
Also add some code comments about these optimizations.
2007-11-07 19:01:24 +01:00
Eamon Walsh
a52c9b2a59 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/dispatch.c
	dix/property.c
	hw/xfree86/common/xf86VidMode.c
	include/xkbsrv.h
	render/glyph.c
	xkb/xkbActions.c
2007-11-05 19:08:36 -05:00
Daniel Stone
1179ddea94 EXA: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:36:36 +00:00
Daniel Stone
3b77689266 EXA: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:43 +00:00
Aaron Plattner
f2e310132f Add CreatePixmap allocation hints.
These hints allow an acceleration architecture to optimize allocation of certain
types of pixmaps, such as pixmaps that will serve as backing pixmaps for
redirected windows.
2007-11-04 16:11:28 -08:00
Eamon Walsh
b633d54b94 Merge branch 'master' into XACE-SELINUX
Conflicts:

	GL/glx/glxscreens.c
	hw/xnest/Screen.c
	render/glyph.c
	render/glyphstr.h
	render/render.c
2007-10-25 12:19:30 -04:00
Pierre Willenbrock
d502521c36 EXA: Fix off-by-one in polyline drawing. 2007-10-23 16:45:13 +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
Eric Anholt
a3a95d3475 Merge branch 'master' into glyph-pixmaps
Conflicts:

	configure.ac
2007-10-19 15:44:17 -07:00
Michel Dänzer
ce50bfd336 EXA: Skip empty glyphs. 2007-10-18 17:44:48 +02:00
Michel Dänzer
5d74416740 EXA: Don't attempt to move in pixmaps that can't be accelerated.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12815 .
2007-10-18 17:44:14 +02:00
Eamon Walsh
c3f7b86255 Merge branch 'master' into XACE-SELINUX
Conflicts:

	os/access.c
2007-10-17 15:00:54 -04:00
Dodji Seketeli
6aab6a6e2a EXA: dude, don't validation driver hooks twice ! 2007-10-08 13:25:38 +02:00
Michel Dänzer
3549a12823 EXA: Disable 1x1 pixmap fill optimization for drivers that handle pixmaps.
This reverts commit 1365aeff54.

It defeated the optimization for drivers that don't provide a CreatePixmap
hook. The optimization makes no sense for drivers that do anyway, so disable
it for them completely.
2007-10-04 11:44:03 +02:00
Dodji Seketeli
604ebb5a6d Merge Xephyr-XV/GL stuff into master 2007-10-03 16:14:08 +02:00
Dave Airlie
1365aeff54 exa: direct access to the pixmap sys ptr is bad if the pixmap isn't mapped 2007-10-03 12:01:42 +10:00
Dave Airlie
566dd3b7d7 exa: add new flags to denote driver handles all pixmap migration/hiding 2007-10-03 12:01:37 +10:00
Dave Airlie
1df1fee82d exa: make sure we set fb_ptr to NULL 2007-10-03 11:56:04 +10:00
Eric Anholt
439edc768e Merge branch 'glyph-pixmaps'
Conflicts:

	configure.ac
	exa/exa_render.c
2007-10-02 12:14:04 -07:00
Dodji Seketeli
95fadbd402 Add basic Exa driver entry point validation.
In exaDriverInit(), quickly check if the programmer forgot to set some
mandadory driver hooks, in that case display a meaningful error message.
2007-10-02 16:45:01 +02:00
Dave Airlie
dc90d50008 exa: increase minor version number for pixmap allocation hooks 2007-10-02 14:05:07 +10:00
Kristian Høgsberg
f15af2ae60 exa: only setup offscreen allocator if driver doesn't provide CreatePixmap 2007-10-02 14:03:48 +10:00
Dave Airlie
ffb58f4fa8 exa: add hooks for drivers to take over pixmap allocation
This adds hooks for the driver to access Create/DestroyPixmap and ModifyPixmapHe
ader.

It allocates a 0 sized pixmap using fb and calls the driver routine to do
work of allocating the actual memory.

ModifyPixmapHeader is mainly required for hooking the screen pixmap which
isn't create by normal methods
2007-10-02 14:03:39 +10:00