From: Changyeon Lee Date: Thu, 27 Jan 2022 11:27:53 +0000 (+0900) Subject: e_hwc: set fake config to output before initialize ecore_evas X-Git-Tag: submit/tizen/20220218.025831~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e239814a60492972d14533ce1bf932eb4eb81c8;p=platform%2Fupstream%2Fenlightenment.git e_hwc: set fake config to output before initialize ecore_evas Change-Id: Ied469c2c8aa8402655e673face4c2482c8992612 --- diff --git a/src/bin/e_comp_screen.c b/src/bin/e_comp_screen.c index e1c4c94e22..719870d70a 100644 --- a/src/bin/e_comp_screen.c +++ b/src/bin/e_comp_screen.c @@ -673,18 +673,26 @@ _e_comp_screen_deinit_outputs(E_Comp_Screen *e_comp_screen) static Eina_Bool _e_comp_screen_fake_output_set(E_Comp_Screen *e_comp_screen) { - E_Output *output = NULL; + E_Output *primary_output = NULL; EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE); - output = e_output_find_by_index(0); + primary_output = e_comp_screen_primary_output_get(e_comp_screen); + EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE); - if (!e_output_hwc_setup(output)) + if (!e_output_hwc_setup(primary_output)) { ERR("fail to e_output_hwc_setup."); return EINA_FALSE; } + if (!e_output_fake_config_set(primary_output, 2, 1)) + { + e_error_message_show(_("Fail to set the fake output config!\n")); + e_hwc_ecore_evas_deinit(); + return EINA_FALSE; + } + return EINA_TRUE; } @@ -820,7 +828,6 @@ _e_comp_screen_init_outputs(E_Comp_Screen *e_comp_screen) } //TODO: if there is no output connected, make the fake output which is connected. - if (!connection_check) { if (!_e_comp_screen_fake_output_set(e_comp_screen)) diff --git a/src/bin/e_hwc.c b/src/bin/e_hwc.c index 5c340b9329..73fd21d54e 100644 --- a/src/bin/e_hwc.c +++ b/src/bin/e_hwc.c @@ -369,20 +369,6 @@ e_hwc_ecore_evas_init(void) /* get the size of the primary output */ e_output_size_get(primary_output, &scr_w, &scr_h); - /* if output is disconnected, set the default width, height */ - if (scr_w == 0 || scr_h == 0) - { - scr_w = 2; - scr_h = 1; - - if (!e_output_fake_config_set(primary_output, scr_w, scr_h)) - { - e_hwc_ecore_evas_deinit(); - e_error_message_show(_("Fail to set the fake output config!\n")); - return EINA_FALSE; - } - } - EHINF("GL available:%d config engine:%d screen size:%dx%d", hwc, e_comp_gl_get(), e_comp_config_get()->engine, scr_w, scr_h);