[haiku-development] Re: Cario and Skia

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 24 Feb 2012 13:55:30 +0100

Hi,

Am 23.02.2012 22:38, schrieb Adrien Destugues:
A valid option would be to extend the BeAPI to add what it lacks as far
as drawing commands goes. It is not too much work as AGG should provide
the code for most of them already. So it could go that way :
Webcore > Skia wrapper sending commands to BeAPI > app_server > AGG.

That solves the problem of getting out of sync with webcore, and allows
to use the same architecture as other apps, as a nice side effect you
may get to add useful things to the BeAPI for other apps to enjoy.

That is actually what I had planned for making the WebCore Haiku rendering backend more complete. Support for transformations, clipping paths, line dashes and more gradient stuff, compositing modes... all already contained in AGG, of course.

The main motivation would be that it benefits all Haiku applications if those missing things got implemented in the API.

You need to share things between processes at some point, sharing the
drawing commands through the app_server link seems simpler to me than
doing all the drawing yourself then sharing the whole bitmap.

This isn't a problem. You just create a BBitmap on the client side, then have Skia or Cairo render in that, wrapped as a block of memory, then when you want to render the "surface" to the screen, you just use BView->DrawBitmap() and the app_server already has the identical block of memory in its own address space.

Best regards,
-Stephan

Other related posts: