>
>
> We quite literally cast MirRenderSurface* to EGLNativeWindowSurface in the
> current WIP:
> http://bazaar.launchpad.net/%7Ecemil-azizoglu/mir/mir-
> render-surface-v3/view/head:/playground/eglflash_render_surface.c#L112
>

​Perhaps, I should point out that our EGLNativeWindowType is not (and
cannot be) 'MirRenderSurface'. It's void*.​ This is because we (have to)
pretend to be other platforms (Android). That's what the cast is for. So if
we get technical, our EGLNativeWindowType is 'void*'. We are not painting
ourselves in a corner with a type that is not universal enough. So if Mir
appeared in an EGL header, it would have 'void*' not 'MirRenderSurface*' as
its native window type.


>
> This is why I'd much rather create an EGLNativeWindowType for the user
> than try to tell all the drivers out there that they have to adopt
> MirRenderSurface as their windowing type.
>

I disagree. ​A platform absolutely has to define its own type, and the
drivers must adopt it. (Modulo the fact that we don't impose the
MirRenderSurface type as that because of the need to support Android.)


> Its mesa-specific thinking to think that we can define the window
> interface for every
>

​There is nothing Mesa-specific here. A platform defines the type and the
driver implementer adds support for it around that type. This is what every
platform has to do. (Except, for platforms that we pretend to be...like
Android).

As you see I'm having to add 'except' to the statements above, because
Android is the exception, not Mesa.

If we want to redefine our mesa interface, that's alright by me, and its
> even fine to define our mesa interface to /be/ the mir client interface.
> The problem is that we're trying to define our windowing type for platforms
> where we cannot define the windowing type.
>

​We absolutely can and should....except again for Android.​



> It *does* have implications for how we implement MirRenderSurface on
>> Android; specifically, it means that MirRenderSurface needs to be a
>> SurfaceFlinger window. But even this doesn't tie Mir to EGL here - if
>> MirRenderSurface can masquerade as a SurfaceFlinger window it should also
>> work for Android Vulcan, which expects a SurfaceFlinger window, and *does*
>> also work for the HW video encoding, which expects a SurfaceFlinger window.
>>
>> 2) Its not obvious how to use this. The casting to an EGLNativeWindowType
>>> has to be pointed out in comment-headers, or gleaned from reading example
>>> code.
>>>
>>
Mir native window type is not in EGL headers yet. This "non-obvious-ness"
can easily be fixed when we add it in
https://www.khronos.org/registry/egl/api/EGL/eglplatform.h
 as a platform.​



> 3) It puts MirPresentationChain and MirBufferStream as second-class
>>> citizens. Having to
>>>
>>
​Who says that they should be first-class citizens? They are specific
implementations that are prone to change and deprecation. That said, the
fact that you can't use a MirRenderSurface without a backing of BS or PC
would still make them a "first class citizen" anyways.

​Regards,​

​Cemil​
-- 
Mir-devel mailing list
Mir-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/mir-devel

Reply via email to