e_eom: use _e_eom_output_get_by_id to send the output information 26/210726/3
authorSooChan Lim <sc1.lim@samsung.com>
Wed, 24 Jul 2019 05:45:18 +0000 (14:45 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 24 Jul 2019 10:18:44 +0000 (10:18 +0000)
Change-Id: I903a0bdf39d69c162ae4825bd3a191ece8e95e25

src/bin/e_eom.c
src/bin/e_eom.h

index df6605c39d661ba00e1e3c61ef4d31f7dcacccf7..eca144f1d7c9ed3b97354e6fcc44a4aac229721a 100644 (file)
@@ -1780,19 +1780,16 @@ _e_eom_cb_wl_request_get_output_info(struct wl_client *client, struct wl_resourc
 
    EOINF("get output info:%d", NULL, output_id);
 
-   EINA_LIST_FOREACH(g_eom->eom_outputs, l, eom_output)
-     {
-        if (!eom_output) continue;
-        if (eom_output->id != output_id) continue;
+   eom_output = _e_eom_output_get_by_id(output_id);
+   EINA_SAFETY_ON_FALSE_RETURN(eom_output);
 
-        wl_eom_send_output_info(resource, eom_output->id, eom_output->type, eom_output->mode, eom_output->width, eom_output->height,
-                                eom_output->phys_width, eom_output->phys_height, eom_output->connection,
-                                1, 0, 0, 0);
+   wl_eom_send_output_info(resource, eom_output->id, eom_output->type, eom_output->mode, eom_output->width, eom_output->height,
+                           eom_output->phys_width, eom_output->phys_height, eom_output->connection,
+                           1, 0, 0, 0);
 
-        EOINF("send - id : %d, type : %d, mode : %d, w : %d, h : %d, w_mm : %d, h_mm : %d, conn : %d", NULL,
-              eom_output->id, eom_output->type, eom_output->mode, eom_output->width, eom_output->height,
-              eom_output->phys_width, eom_output->phys_height, eom_output->connection_status);
-     }
+   EOINF("send - id : %d, type : %d, mode : %d, w : %d, h : %d, w_mm : %d, h_mm : %d, conn : %d", NULL,
+         eom_output->id, eom_output->type, eom_output->mode, eom_output->width, eom_output->height,
+         eom_output->phys_width, eom_output->phys_height, eom_output->connection_status);
 }
 
 static const struct wl_eom_interface _e_eom_wl_implementation =
@@ -2168,20 +2165,6 @@ e_eom_is_ec_external(E_Client *ec)
    return EINA_TRUE;
 }
 
-EINTERN tdm_output*
-e_eom_tdm_output_by_ec_get(E_Client *ec)
-{
-   E_EomOutputPtr eom_output;
-
-   if (!g_eom) return NULL;
-
-   eom_output = _e_eom_output_by_ec_child_get(ec);
-   if (!eom_output)
-     return NULL;
-
-   return eom_output->output;
-}
-
 EINTERN Eina_Bool
 e_eom_connect(E_Output *output)
 {
index cf8ac23df7c241c38dd1c57db7d0d09e8800a0e1..9226487b0a48c05855de302e0b4290355ea9651e 100644 (file)
@@ -9,7 +9,6 @@
 EINTERN int e_eom_init(void);
 EINTERN int e_eom_shutdown(void);
 E_API   Eina_Bool e_eom_is_ec_external(E_Client *ec);
-EINTERN tdm_output* e_eom_tdm_output_by_ec_get(E_Client *ec);
 EINTERN Eina_Bool e_eom_connect(E_Output *output);
 EINTERN Eina_Bool e_eom_disconnect(E_Output *output);
 EINTERN Eina_Bool e_eom_create(E_Output *output, Eina_Bool added);