ivi-shell: bugfix, add ref_count to ivi_layout_layer
if a controller calls ivi_layout_layer_create_with_demenstion with a ID
which is already created before, the API returns exist ivi_layer.
However addtionally, it shall count up ref count to destroy ivi_layer
when ref count is 0. The previous code will destroy ivi_layer
immediately even if the other code still refers ivi_layer.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/ivi-shell/ivi-layout-private.h b/ivi-shell/ivi-layout-private.h
index 8b61963..cf2db7d 100644
--- a/ivi-shell/ivi-layout-private.h
+++ b/ivi-shell/ivi-layout-private.h
@@ -88,6 +88,8 @@
struct wl_list surface_list;
struct wl_list link;
} order;
+
+ int32_t ref_count;
};
struct ivi_layout {