summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86Debug.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2010-03-12 16:53:30 +0100
committerKeith Packard <keithp@keithp.com>2010-03-15 08:37:53 -0700
commit67a8c659f25218904bae64aac6e98e326c90330b (patch)
treea0ef10771dc7f6669f0ee38e2e9870f52d1fb26e /hw/xfree86/common/xf86Debug.c
parent75efb46a14fe45ffe73faff637b1fa6d017e1e52 (diff)
hw/xfree86: move reference counting out of the UseHWCursor[ARGB] functionsHEADmaster
The problem is that the xf86_use_hw_cursor(_argb) functions may get this correctly now, some drivers will replace these generic versions with their own functions. It is pretty insane to expect them to do reference counting of the cursor (as an example, look at driver/xf86-video-vmware to see how that looks like as a workaround). There are even places in xserver itself which replace these two functions. The segfaults if no reference counting is done are caused because the reference count of the cursor reached zero, hence the cursor was freed, however xf86CursorEnableDisableFBAccess() brought it back to life from the dead (from the SavedCursor). This patch hence adds reference counting in xf86CursorSetCursor. As per Michel Daenzer's suggestion, also free the cursor upon xf86CursorCloseScreen. In theory with this it should be possible to remove the reference counting in the UseHwCursor functions I think, though it should also be safe to keep them. Signed-off-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xfree86/common/xf86Debug.c')
0 files changed, 0 insertions, 0 deletions