summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus.fritzsch@xse.de>2014-08-19 14:31:04 +0200
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>2014-09-01 15:55:44 +0900
commitcd67b74fe548c59161df9f3e1e04139fac272123 (patch)
tree40e563ed697d69c99ecae777f23db7166978ae4b
parent777793acee6b2ff6606aa9d1828f9ed447b5c331 (diff)
downloadwayland-ivi-extension-cd67b74fe548c59161df9f3e1e04139fac272123.tar.gz
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 <marcus.fritzsch@xse.de>
-rw-r--r--ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c16
1 files 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;
+ }
}
}