mir on mir questions :)

Eleni Maria Stea elenimaria.stea at canonical.com
Wed Jun 12 08:30:30 UTC 2013

Hello everyone!
I started working on a nested mir a couple of days ago and I have some
questions for you after today's meeting. Actually, I am looking for a
starting point because there are many things to be done and I am not
sure what's a priority and what not...

It seems that we need to:

1- Create a mir server platform
2- Create a mir buffer allocator
3- Create a mir display
4- (Maybe) create a mir client library (we shouldn't need to)

For the 1, I guess that I only have to link to the libmirclient and add
some code that connects to an existing server during the platform
initialization. That looks easy enough for the moment unless I am
missing something important! :)

My main concerns are the buffer allocation and the display.

Let's start from the display:
- It was discussed that we need to separate the display from the buffer
mechanism and Chris has done some work on that already. Do you think
that this separation is something really necessary that I should do
before things become more complicated or I could leave it as it is since
that change doesn't add/remove functionalities?
- It was also said that there are some EGL functions I will need in the
display that are not implemented in our Mir backend for EGL (correct me
if I am wrong here) So, I guess we have to implement them, before we
proceed with the display? Is there something I could do here?

Buffer allocation:
I have to use the existing buffer mechanism for each platform. If mir is
runninng nested on gbm it will use gbm buffers and if we are using
android we ll need android buffers. So there will be a small part on mir
that won't be "mir". But there won't be any obvious problems with that
decision isn't it?

Also another question: Can I create surfaces with the current Mir
backend for EGL? Will I need to do this in the display?

For the client part:
We shouldn't need any client normally, but I remember that when I was
doing the Mir on X display I finally had to create a dummy X client that
was inheriting the gbm platform to be able to use the platform_type()
function. But maybe this shouldn't be necessary in this case.

But if I leave the gbm and android platforms as they are as some people
suggested in the meeting, then I'll have a problem with CMake that won't
compile the right client when the platform is mir.
Some solutions could be:
- use a different server and client platform in cmake (instead of
- use a dummy mir platform that inherits from gbm_platform when we are
on pc and from android_platform when on mobile and just change the
platform_type() function
But maybe there's a better way...

Those are my first questions. I still haven't done much on this task to
have some more specific and interesting ones but I'd like to hear your
thoughts on these to get a starting point (and make sure I won't make
any changes on parts that we ll have to modify anyway for example to the

Thanks a lot in advance,

More information about the Mir-devel mailing list