From 35dedd93e686c9a3d8eca5a4ff54d627326f6746 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Wed, 11 Mar 2020 08:05:39 +0900 Subject: [PATCH] e_comp_wl: remove the information of configured_resolution at E_Comp_Wl_Output Change-Id: Idca8a2bb96b7ab5fa2e5283025c9719197dfaa2e --- src/bin/e_comp_wl.c | 24 ++++++++---------------- src/bin/e_comp_wl.h | 6 ------ 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index c9208f415e..ff593f26c6 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -3759,35 +3759,26 @@ _e_comp_wl_output_info_send(E_Comp_Wl_Output *output, struct wl_resource *resour int phys_w, phys_h; int ratio_w, ratio_h; + phys_w = output->phys_width; + phys_h = output->phys_height; + if (e_config->configured_output_resolution.use) { - // change the configured output resolution and the configured physical size(mm) of the output - if (output->configured_resolution_w != res_w) + // change the configured physical size(mm) of the output + if (output->w != res_w) { ratio_w = res_w / output->w; phys_w = (int)((float)output->phys_width * (float)ratio_w); - output->configured_physical_w = phys_w; - output->configured_resolution_w = res_w; } - if (output->configured_resolution_h != res_h) + if (output->h != res_h) { ratio_h = res_h / output->h; phys_h = (int)((float)output->phys_height * (float)ratio_h); - output->configured_physical_h = phys_h; - output->configured_resolution_h = res_h; } - phys_w = output->configured_physical_w; - phys_h = output->configured_physical_h; - ELOGF("COMP_WL", "\tSend Configured Output (pid:%d)", NULL, pid); } - else - { - phys_w = output->phys_width; - phys_h = output->phys_height; - } ELOGF("COMP_WL", "\t Output Resolution: res(%d, %d) phy_size(%d, %d) (pid:%d).", NULL, res_w, res_h, phys_w, phys_h, pid); @@ -5950,6 +5941,8 @@ e_comp_wl_pid_output_configured_resolution_send(pid_t pid, int w, int h) Eina_List *l = NULL, *l2 = NULL; struct wl_resource *resource = NULL; + if (!e_config->configured_output_resolution.use) return EINA_TRUE; + EINA_SAFETY_ON_TRUE_RETURN_VAL(pid <= 0, EINA_FALSE); EINA_SAFETY_ON_TRUE_RETURN_VAL(w < 0, EINA_FALSE); EINA_SAFETY_ON_TRUE_RETURN_VAL(h < 0, EINA_FALSE); @@ -5961,7 +5954,6 @@ e_comp_wl_pid_output_configured_resolution_send(pid_t pid, int w, int h) { wl_client_get_credentials(wl_resource_get_client(resource), &output_pid, NULL, NULL); if (output_pid != pid) continue; - if (output->configured_resolution_w == w && output->configured_resolution_h == h) continue; ELOGF("COMP_WL", "\tSend Configured Output AGAIN ~!!!!! (pid:%d)", NULL, pid); diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 269b93d31c..3b113815cc 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -520,12 +520,6 @@ struct _E_Comp_Wl_Output struct wl_output *wl_output; struct wl_buffer *buffer; void *data; - - /* configured_screen_resolution */ - int configured_physical_w; - int configured_physical_h; - int configured_resolution_w; - int configured_resolution_h; }; struct _E_Comp_Wl_Hook -- 2.34.1