Commit Graph

331 Commits

Author SHA1 Message Date
Maarten Maathuis
12aeddf5ad exa: Accept scratch pixmaps with offscreen memory as such. 2009-03-19 20:40:03 +01:00
Maarten Maathuis
a635bb5357 exa: round of fb_pitch to the next byte 2009-03-18 19:36:18 +01:00
Maarten Maathuis
ec32878359 exa: check if the pixmap is pinned for unsupported AUX indices. 2009-03-18 19:36:18 +01:00
Maarten Maathuis
89d7b88f32 exa: allow exaModifyPixmapHeader to set sys_ptr for EXA_HANDLES_PIXMAPS
- exaModifyPixmapHeader would save sys_ptr if needed, but it would be NULL'ed afterwards.
- This is needed to support pixmaps that are not offscreen.
2009-03-13 00:44:48 +01:00
Maarten Maathuis
ce6e1771be exa: fix a serious issue in exaChangeWindowAttributes (and some more related things)
- fbChangeWindowAttributes can create pixmaps (and access them) without use preparing access.
- Also handle the destroyed pixmaps by finishing them first.
- Switch to DEST indices again in exaCreatePixmapWithPrepare, because they are obviously being rendered to.
- Also avoid calling FinishAccess on pixmaps that are destroyed (and their memory potentially invalid).
2009-03-04 16:51:10 +01:00
Maarten Maathuis
7fb68e8b31 exa: remove a few pExaPixmap checks.
- And make some fatal for a debug build.
2009-03-04 16:51:10 +01:00
Maarten Maathuis
bd2f35ef0d exa: fix unwrapping of ModifyPixmapHeader upon CloseScreen.
- Cleanup wrapping too.
2009-03-04 16:51:10 +01:00
Maarten Maathuis
da8ea41a54 exa: increase/rework safety checks in Prepare/FinishAccess. 2009-03-04 16:51:09 +01:00
Maarten Maathuis
3ea3d505e8 exa: avoid a potential Prepare/FinishAccess inbalance. 2009-03-04 16:51:09 +01:00
Maarten Maathuis
10334cf7e6 exa: simplify exaPixmapIsOffscreen
- This includes properly handling the framebuffer.
2009-03-04 16:51:09 +01:00
Maarten Maathuis
7bfad37f77 exa: fixup aux indices and ensure that the indices are used as they should be.
- In a previous patch i forgot to add a FALSE somewhere it seems.
- Rename AUX indices so the driver (think of driver managed pixmaps) can do optimisations based upon them.
- Fix one abuse of DEST index now that we have the AUX indices (same reason as above).
2009-02-27 22:26:52 +01:00
Maarten Maathuis
f028b14876 exa: whitespace 2009-02-27 17:11:47 +01:00
Maarten Maathuis
ed00515ec5 exa: fixup exaAssertNotDirty.
- Do the right thing based on prepare access.
2009-02-27 17:11:35 +01:00
Maarten Maathuis
2e88b6004f exa: minor glyphs cleanup.
- This should fix subtle coordinate bugs and make the code a bit cleaner to read.
2009-02-27 16:58:30 +01:00
Michel Dänzer
265d20068a EXA: Fix check for whether the glyph we're evicting from the cache is in use.
Since commit f07f18231a ('EXA: Allow using
exaCompositeRects also when we can't use a mask in exaGlyphs.') we were
checking the wrong set of coordinates in the buffer where glyphs to be rendered
are accumulated when no mask is used in exaGlyphs.

This fixes occasional glyph corruption which can be corrected with redraws, in
particular with Qt4.

Thanks to Maarten Maathuis for asking the right question: 'where do we protect
against evicting glyphs that are still needed?'

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-02-27 16:41:39 +01:00
Michel Dänzer
9d5141f7bc EXA: No longer use the driver UploadToScratch hook.
See http://bugs.freedesktop.org/show_bug.cgi?id=20213 .

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-02-27 16:37:28 +01:00
Michel Dänzer
4cfb36f6ad EXA: Handle separate alpha maps properly in Composite fallback, take two.
Preserve the EXA ABI by introducing a new driver flag EXA_SUPPORTS_PREPARE_AUX.
If the driver doesn't set this flag, we have to assume any Prepare/FinishAccess
driver hooks can't handle the EXA_PREPARE_AUX* indices, so we move out such
pixmaps at PrepareAccess time.

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

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-02-27 16:37:28 +01:00
Michel Dänzer
de022f8e63 Revert "EXA: Handle separate alpha maps properly in Composite fallback."
This reverts commit 170cf1270d.

Conflicts:

	exa/exa_render.c
2009-02-27 16:37:27 +01:00
Michel Dänzer
f07f18231a EXA: Allow using exaCompositeRects also when we can't use a mask in exaGlyphs.
This should give the full benefits of the glyph cache even when we can't use a
mask.

This also means we no longer need to scan the glyphs to see if they overlap,
we can just use a mask or not as the client asks.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-02-26 10:35:44 +01:00
Michel Dänzer
b26c136ee9 EXA: Stop tracking damage for pixmaps subject to ModifyPixmapHeader.
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-02-26 10:35:44 +01:00
Michel Dänzer
170cf1270d EXA: Handle separate alpha maps properly in Composite fallback.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18710 .

As this can't work without new EXA_PREPARE_AUX* indices, this requires a major
version bump, so we can also drop the UploadToScratch driver hook and
ExaOffscreenSwap*(). So this also fixes
http://bugs.freedesktop.org/show_bug.cgi?id=20213 .

Moreover, introduce EXA_DRIVER_KNOWN_MAJOR to break compilation of drivers
which may not be able to handle EXA_PREPARE_AUX*, giving instructions how to
make them build again in the #error message.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-02-24 09:22:09 +01:00
Maarten Maathuis
b2ceea3635 Revert "exa: the extent of the valid region is probably much larger than that of the pending damage."
This reverts commit 97c1cbc702.

- Sorry for the thinko, pending damage is often not fragmentated.
- Should the dst region become fragmentated, you actually want to copy more to unfragmentate it.
2009-02-17 19:40:59 +01:00
Maarten Maathuis
3175646b10 exa: exaPixmapDirty should use official damage functions.
- Otherwise other users will not be notified of damage.
2009-02-17 19:25:35 +01:00
Maarten Maathuis
97c1cbc702 exa: the extent of the valid region is probably much larger than that of the pending damage.
- Since the default has been changed from nothing to everything.
2009-02-17 19:25:35 +01:00
Maarten Maathuis
caa5310e16 exa: reintroduce src rect optimisation, with a slightly higher threshold.
- I got some feedback on gtkperf line test regression.
- The increased threshold should ensure the destination optimisation is dominant.
2009-02-16 20:41:14 +01:00
Maarten Maathuis
46eeaf82e2 exa: fix performance regression from 736b6fbd2c
- The src optimisation is more aggressive and possibly harmful in light of the new initial state of pixmaps.
- There is now actually a performance improvement by almost always keeping the number of rects low.
2009-02-16 17:41:51 +01:00
Michel Dänzer
736b6fbd2c EXA: Try to prevent the valid regions from growing too many rects.
This helps contain region management overhead in some pathological cases, see
e.g. http://bugs.freedesktop.org/show_bug.cgi?id=16647 .

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-02-15 17:44:51 +01:00
Maarten Maathuis
1cb5afdf1e dix: always NULL pGC->tile.pixmap in Create{Scratch}GC. 2009-02-08 18:59:17 +01:00
Maarten Maathuis
6fd8fe9cb9 exa: fix exaValidateGC.
- use DEST in the createPixmap wrapper, because stipple already takes MASK (in case someone uses swappers).
- Anticipate some of the less common situations when fbValidateDrawable will access tile related pixmaps.
2009-02-08 18:43:15 +01:00
Maarten Maathuis
30daba6903 exa: All fallbacks should have a GC, remove some code.
- I did some testing with full fallbacks forced by the driver.
- I ran rendercheck, expedite and the (full) x11perf test suite.
- Thanks to ajax for pointing out this should be unneeded.
2009-02-08 02:08:13 +01:00
Maarten Maathuis
ffa72793e2 exa: Calling exaMarkSync after UTS is the drivers responsibility. 2009-02-07 21:58:17 +01:00
Maarten Maathuis
68665d78e7 exa: don't use fbCopyNtoN 2009-02-06 18:42:39 +01:00
Maarten Maathuis
2e76958d30 fb: move some code to mi 2009-02-06 18:42:39 +01:00
Maarten Maathuis
f06bde3d4b exa: create ExaCheckGetImage 2009-02-06 18:42:39 +01:00
Maarten Maathuis
258fc4b106 exa: wrap the remainder of exa_unaccel.c 2009-02-06 18:42:38 +01:00
Maarten Maathuis
6fabf24949 exa: use proper wrapping in exa.c 2009-02-06 18:42:38 +01:00
Maarten Maathuis
015c99a4ad exa: properly wrap GC functions 2009-02-06 18:42:38 +01:00
Maarten Maathuis
5e6a06fe69 exa: add GC private 2009-02-06 18:42:38 +01:00
Maarten Maathuis
5cc67ae94c exa: kill of exaImageGlyphBlt
- It serves no obvious purpose, yet it directly accesses many fb
symbols.
2009-02-06 18:42:38 +01:00
Maarten Maathuis
6483834200 exa: Remove one of the many calls directly into the fb layer. 2009-02-06 18:42:38 +01:00
Michel Dänzer
f112d6bf59 EXA: Try harder to keep current pixmap copy up to date in exaMigrateToward*.
This is probably required, but apparently not sufficient, for making migration
heuristics other than "always" work correctly again. Not that I really care
about them...
2009-02-06 18:30:43 +01:00
Michel Dänzer
3948b52389 EXA: Guard empty pending region warning by DEBUG_MIGRATE.
It isn't very useful yet while the damage layer calls us for empty operations,
mostly confuses users.
2009-02-06 11:37:53 +01:00
Michel Dänzer
639f289dcd EXA: Declare glyph cache picture as component-alpha when necessary.
Without this, rendering component-alpha glyphs may break without a mask.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=19233 .
2009-01-13 13:05:32 +01:00
Maarten Maathuis
3534a5e5d9 exa: Allow drivers to set non-NULL devPrivate.ptr for !offscreen pixmaps. 2008-12-26 16:38:27 +01:00
Maarten Maathuis
027b440d4f exa: preparing as source and finishing access as mask is a bad idea 2008-12-26 15:51:55 +01:00
Maarten Maathuis
1567b7243f exa: A more correct fix. 2008-12-21 00:08:56 +01:00
Maarten Maathuis
2db7b66863 exa: a few cleanups
- Some warnings silenced.
- Some whitespace cleanup.
2008-12-19 23:12:37 +01:00
Peter Hutterer
cb95642dc8 Remove #define NEED_EVENTS and NEED_REPLIES
A grep on xorg/* revealed there's no consumer of this define.

Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.

Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-12-12 11:43:32 +10: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
d6cbd4511e Export symbols defined in the sdk.
This is the biggest "visibility" patch. Instead of doing a "export"
symbol on demand, export everything in the sdk, so that if some module
fails due to an unresolved symbol, it is because it is using a symbol
not in the sdk.

  Most exported symbols shouldn't really be made visible, neither
advertised in the sdk, as they are only used by a single shared object.

  Symbols in the sdk (or referenced in sdk macros), but not defined
anywhere include:
XkbBuildCoreState()
XkbInitialMap
XkbXIUnsupported
XkbCheckActionVMods()
XkbSendCompatNotify()
XkbDDXFakePointerButton()
XkbDDXApplyConfig()
_XkbStrCaseCmp()
_XkbErrMessages[]
_XkbErrCode
_XkbErrLocation
_XkbErrData
XkbAccessXDetailText()
XkbNKNDetailMaskText()
XkbLookupGroupAndLevel()
XkbInitAtoms()
XkbGetOrderedDrawables()
XkbFreeOrderedDrawables()
XkbConvertXkbComponents()
XkbWriteXKBSemantics()
XkbWriteXKBLayout()
XkbWriteXKBKeymap()
XkbWriteXKBFile()
XkbWriteCFile()
XkbWriteXKMFile()
XkbWriteToServer()
XkbMergeFile()
XkmFindTOCEntry()
XkmReadFileSection()
XkmReadFileSectionName()
InitExtInput()
xf86CheckButton()
xf86SwitchCoreDevice()
RamDacSetGamma()
RamDacRestoreDACValues()
xf86Bpp
xf86ConfigPix24
xf86MouseCflags[]
xf86SupportedMouseTypes[]
xf86NumMouseTypes
xf86ChangeBusIndex()
xf86EntityEnter()
xf86EntityLeave()
xf86WrapperInit()
xf86RingBell()
xf86findOptionBoolean()
xf86debugListOptions()
LoadSubModuleLocal()
LoaderSymbolLocal()
getInt10Rec()
xf86CurrentScreen
xf86ReallocatePciResources()
xf86NewSerialNumber()
xf86RandRSetInitialMode()
fbCompositeSolidMask_nx1xn
fbCompositeSolidMask_nx8888x0565C
fbCompositeSolidMask_nx8888x8888C
fbCompositeSolidMask_nx8x0565
fbCompositeSolidMask_nx8x0888
fbCompositeSolidMask_nx8x8888
fbCompositeSrc_0565x0565
fbCompositeSrc_8888x0565
fbCompositeSrc_8888x0888
fbCompositeSrc_8888x8888
fbCompositeSrcAdd_1000x1000
fbCompositeSrcAdd_8000x8000
fbCompositeSrcAdd_8888x8888
fbGeneration
fbIn
fbOver
fbOver24
fbOverlayGeneration
fbRasterizeEdges
fbRestoreAreas
fbSaveAreas
composeFunctions
VBEBuildVbeModeList()
VBECalcVbeModeIndex()
TIramdac3030CalculateMNPForClock()
shadowBufPtr
shadowFindBuf()
miRRGetScreenInfo()
RRSetScreenConfig()
RRModePruneUnused()
PixmanImageFromPicture()
extern int miPointerGetMotionEvents()
miClipPicture()
miRasterizeTriangle()
fbPush1toN()
fbInitializeBackingStore()
ddxBeforeReset()
SetupSprite()
InitSprite()
DGADeliverEvent()

  SPECIAL CASES
o defined as _X_INTERNAL
	xf86NewInputDevice()
o defined as static
	fbGCPrivateKey
	fbOverlayScreenPrivateKey
	fbScreenPrivateKey
	fbWinPrivateKey
o defined in libXfont.so, but declared in xorg/dixfont.h
	GetGlyphs()
	QueryGlyphExtents()
	QueryTextExtents()
	ParseGlyphCachingMode()
	InitGlyphCaching()
	SetGlyphCachingMode()
2008-11-29 23:56:06 -02:00