From cd67b74fe548c59161df9f3e1e04139fac272123 Mon Sep 17 00:00:00 2001 From: Marcus Fritzsch Date: Tue, 19 Aug 2014 14:31:04 +0200 Subject: ilmControl: issue send_stats request on getPropertiesOfSurface In order to have a current set of statistics in surface properties, request submission of stats prior to retrieval of actual properties. Also, if display_roundtrip_queue() fails in this one we assume something is really broken and don't bother returning properties w/o stats but simply error out. Signed-off-by: Marcus Fritzsch --- .../ilmControl/src/ilm_control_wayland_platform.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c index 73568d7..f09a307 100644 --- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c +++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c @@ -2535,9 +2535,19 @@ ilm_getPropertiesOfSurface(t_ilm_uint surfaceID, ctx_surf = get_surface_context(&ctx->wl, (uint32_t)surfaceID); if (ctx_surf != NULL) { - - *pSurfaceProperties = ctx_surf->prop; - returnValue = ILM_SUCCESS; + // request statistics for surface + ivi_controller_surface_send_stats(ctx_surf->controller); + // force submission + int ret = display_roundtrip_queue(ctx->wl.display, ctx->wl.queue); + + // If we got an error here, there is really no sense + // in returning the properties as something is fundamentally + // broken. + if (ret != -1) + { + *pSurfaceProperties = ctx_surf->prop; + returnValue = ILM_SUCCESS; + } } } -- cgit v1.2.1