summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus.fritzsch@xse.de>2014-08-12 13:26:47 +0200
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>2014-09-01 15:55:43 +0900
commitb885bbc068386d31009f6f8a667d12ddf7e49da2 (patch)
tree61537e073d9bc2fd0fc64d828efbe60c48c326f3
parentcddc793779561ef704521f951faa39890ef062f5 (diff)
downloadwayland-ivi-extension-b885bbc068386d31009f6f8a667d12ddf7e49da2.tar.gz
ilmControl: use wl_output userdata pointer
And remove now unneeded get_screen_context_by_output() Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
-rw-r--r--ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c30
1 files changed, 1 insertions, 29 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 41f2555..ed0a234 100644
--- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
+++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
@@ -294,28 +294,6 @@ static struct wl_output_listener output_listener = {
};
static struct screen_context*
-get_screen_context_by_output(struct wayland_context *ctx,
- struct wl_output *output)
-{
- struct screen_context *ctx_scrn = NULL;
- struct wl_proxy *pxy_out = NULL;
- struct wl_proxy *pxy_out_in_scrn = NULL;
- uint32_t pxy_id = 0;
- uint32_t pxy_id_in_scrn = 0;
-
- wl_list_for_each(ctx_scrn, &ctx->list_screen, link) {
- pxy_out = (struct wl_proxy*)output;
- pxy_out_in_scrn = (struct wl_proxy*)ctx_scrn->output;
- pxy_id = wl_proxy_get_id(pxy_out);
- pxy_id_in_scrn = wl_proxy_get_id(pxy_out_in_scrn);
- if (pxy_id == pxy_id_in_scrn) {
- return ctx_scrn;
- }
- }
- return NULL;
-}
-
-static struct screen_context*
get_screen_context_by_serverid(struct wayland_context *ctx,
uint32_t id_screen)
{
@@ -333,13 +311,7 @@ static void
add_orderlayer_to_screen(struct layer_context *ctx_layer,
struct wl_output* output)
{
- struct screen_context *ctx_scrn = NULL;
-
- ctx_scrn = get_screen_context_by_output(ctx_layer->ctx, output);
- if (ctx_scrn == NULL) {
- fprintf(stderr, "failed to add_orderlayer_to_screen\n");
- return;
- }
+ struct screen_context *ctx_scrn = wl_output_get_user_data(output);
int found = 0;
struct layer_context *layer_link;