When will I recive surfaceAddNotification through ivi-extension?

zhangyang zhangyang-0206 at 163.com
Thu Mar 22 04:51:08 EDT 2018


Hi Emre:

Thanks for your answer. And I found in ivi sample code, it usually follow this logic:
in registerNotification callback: 
if (created)
{
    ilm_getPropertiesOfSurface(id, &sp);
                    if ((sp.origSourceWidth != 0) && (sp.origSourceHeight !=0))
                {   // surface is already configured
                    configure_ilm_surface(id, sp.origSourceWidth, sp.origSourceHeight);
                } else {
                    // wait for configured event
                    ilm_surfaceAddNotification(id,&surfaceCallbackFunction);
                    ilm_commitChanges();
                }
}

I have 2 questions:
1.  Why we need the surface have origSourceWidth and origSourceHeight , after they are not 0 then configure the surface?  can we do configure directly?
2. In EGL, the buffer we have created very early, why ivi-extension can get surfaceAddNotification only after eglSwapBuffers?



At 2018-03-22 15:29:46, "Ucan, Emre (ADITG/ESB)" <eucan at de.adit-jv.com> wrote:
>Hi,
>
>You have to commit a buffer. If you use EGL, you should call eglSwapBuffers.
>
>Best regards
>
>Emre Ucan
>Engineering Software Base (ADITG/ESB)
>
>Tel. +49 5121 49 6937
>
>> -----Original Message-----
>> From: genivi-ivi-layer-management [mailto:genivi-ivi-layer-management-
>> bounces at lists.genivi.org] On Behalf Of zhangyang
>> Sent: Donnerstag, 22. März 2018 08:07
>> To: genivi-layer
>> Subject: When will I recive surfaceAddNotification through ivi-extension?
>> 
>> 
>> Hi team:
>> I have a simple opengl app, and a layer manager app to manage all app's
>> surface. The opengl app do init steps like this:
>> wl_display_connect
>> wl_display_get_registry
>> wl_registry_add_listener
>> wl_display_dispatch
>> wl_compositor_create_surface
>> wl_shell_get_shell_surface
>> wl_shell_surface_add_listener
>> wl_shell_surface_set_toplevel
>> ...
>> after all the wl init over, I call ilm_surfaceCreate.
>> 
>> In my layer manager app, I call ilm_registerNotification, I got this opengl
>> surface created, but sp.orignSourceWidth and sp.orignSourceHeight is 0, So I
>> call ilm_surfaceAddNotification to watch this surface. But I can't get any
>> surfaceAdd callback anymore.  Is this opengl app need to do something?
>> When will I recive surfaceAddNotification?   In LayerManagerControl get
>> surface I can see this surface, but some data are 0.  please help, thank you.
>> 
>> 
>> 
>> _______________________________________________
>> genivi-ivi-layer-management mailing list
>> genivi-ivi-layer-management at lists.genivi.org
>> https://lists.genivi.org/mailman/listinfo/genivi-ivi-layer-management


More information about the genivi-ivi-layer-management mailing list