[haiku-development] Re: Cario and Skia

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

Am 23.02.2012 19:20, schrieb Simon Taylor:
I'm planning on keeping the abstraction very low level - just wrap some
memory as a surface, and not support concurrent BeAPI drawing access.
There will be some investigation required as to the quickest way to get
those surfaces into the app_server, but hopefully if there is any work
required there it could be shared between Cairo and Skia and any other
client-side rendering libraries.

This is definitely the way to go. Just initialize a Cairo surface with the memory pointer and bytes per row information of a BBitmap and you have attached Cairo to a block of memory. Then the default software renderer included with Cairo should provide a feature complete rendering backend. I had once done this work and provided a patch, memory is failing me. It may be attached to a HaikuPorts ticket, or maybe I have only sent it to the HaikuPorts mailing list. I did the changes in the code, but then failed getting the build system of Cairo to compile and run the tests. I just couldn't figure out how to link in the C++ libs since Cairo is C-only... So I have no idea if what I coded actually works.

Best regards,
-Stephan


Other related posts: