[haiku-development] Hardware cursor support, BDirectWindow and radeon_hd

  • From: Julian Harnath <julian.harnath@xxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 18 Nov 2012 19:38:41 +0100

Hello!

Now that I can render into a BDirectWindow I found another issue, the 
lack of hardware cursor support, at least in the radeon_hd driver, and 
the fact that BDirectWindow doesn't check it.
According to the BeBook, BDirectWindow::SupportsWindowMode() should 
return false if the graphics driver does not have hardware cursor 
support... but in Haiku's implementation it only checks for 
B_PARALLEL_ACCESS (I opened bugticket for this, see [1]).

When using the BDirectWindow without hardware cursor, drawing into the 
window draws even over the cursor, making it invisible. This can easily 
be tested with for example Chart from the demo applications... Set it 
to "Slow rotation" and DirectWindow as display mode. Now place the 
cursor into the drawing area in a place where stars are moving and do 
not move the cursor anymore -- you can see the stars that pass over the 
cursor partially erase it, leaving holes in the cursor. When you have 
an application redrawing the entire window every frame, the cursor is 
completely invisible, only leaving a flickering rectangle when moving 
the mouse.

I wonder if it makes sense to use BDirectWindow at all if the radeon_hd 
accelerant doesn't support hardware cursors currently. Oddly enough, by 
the way, radeon_hd does report that it supports it, it uses the default 
flags from create_display_modes.cpp which include B_HARDWARE_CURSOR. Is 
this a bug and should I open a ticket for it too?

Since I know only little about how modern radeon cards work... can it 
be expected that hardware cursor support will be integrated anytime 
soon or is it a bigger effort?

I'm asking because, in the latter case, I'd rather stay with my 
alternate (already working) solution for the near future, i.e. drawing 
into a BBitmap and bringing it to screen via BView::DrawBitmap()... 
it's many times slower than BDirectWindow, but it would work on more 
machines then.

[1] https://dev.haiku-os.org/ticket/9185

--
So long, Julian

Other related posts: