From: Boram Park Date: Wed, 18 Oct 2017 06:37:44 +0000 (+0900) Subject: e_config: add screen_rotation_client_ignore variable X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fsandbox%2Fboram1288%2Fdevel;p=platform%2Fupstream%2Fenlightenment.git e_config: add screen_rotation_client_ignore variable for all clients to ignore output transform status Change-Id: If293a8dc010b76668c1f1db1dbcbd1942bea72d7 --- diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 7ee3d8bb10..c4a86475b7 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -276,7 +276,7 @@ _hwc_available_get(E_Client *ec) { E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data*)ec->comp_data; E_Output *eout; - int transform = 0, minw = 0, minh = 0; + int minw = 0, minh = 0; if ((!cdata) || (!cdata->buffer_ref.buffer) || @@ -307,9 +307,6 @@ _hwc_available_get(E_Client *ec) if (e_comp_wl_tbm_buffer_sync_timeline_used(cdata->buffer_ref.buffer)) return EINA_FALSE; - /* if the buffer transform of surface is not same with output's transform, we - * can't show it to HW overlay directly. - */ eout = e_output_find(ec->zone->output_id); EINA_SAFETY_ON_NULL_RETURN_VAL(eout, EINA_FALSE); @@ -320,10 +317,6 @@ _hwc_available_get(E_Client *ec) if ((minh > 0) && (minh > cdata->buffer_ref.buffer->h)) return EINA_FALSE; - transform = e_comp_wl_output_buffer_transform_get(ec); - if ((eout->config.rotation / 90) != transform) - return EINA_FALSE; - return EINA_TRUE; } diff --git a/src/bin/e_comp_screen.c b/src/bin/e_comp_screen.c index fbecc846c1..0c2b769e1f 100644 --- a/src/bin/e_comp_screen.c +++ b/src/bin/e_comp_screen.c @@ -82,9 +82,14 @@ _tz_screen_rotation_get_ignore_output_transform(struct wl_client *client, struct tzsr->resource = resource; tzsr->ec = ec; - ELOGF("COMP", "|tzsr(%p)", NULL, ec, tzsr); + ELOGF("TRANSFORM", "|tzsr(%p) client_ignore(%d)", NULL, ec, tzsr, e_config->screen_rotation_client_ignore); tzsr_list = eina_list_append(tzsr_list, tzsr); + + /* make all clients ignore the output tramsform + * we will decide later when hwc prepared. + */ + e_comp_screen_rotation_ignore_output_transform_send(ec, EINA_TRUE); } static void @@ -1241,7 +1246,24 @@ e_comp_screen_rotation_ignore_output_transform_send(E_Client *ec, Eina_Bool igno if (!tzsr) return; - ELOGF("COMP", "|tzsr(%p) ignore(%d)", NULL, ec, tzsr, ignore); + /* if client have to considers the output transform */ + if (!ignore) + { + /* exception */ + if (e_config->screen_rotation_client_ignore) + { + ELOGF("TRANSFORM", "|tzsr(%p) ignore_output_transform: client_ignore", NULL, ec, tzsr); + return; + } + + if (e_policy_client_is_quickpanel(ec)) + { + ELOGF("TRANSFORM", "|tzsr(%p) ignore_output_transform: quickpanel", NULL, ec, tzsr); + return; + } + } + + ELOGF("TRANSFORM", "|tzsr(%p) ignore_output_transform(%d)", NULL, ec, tzsr, ignore); tizen_screen_rotation_send_ignore_output_transform(tzsr->resource, ec->comp_data->surface, ignore); } diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 6732f48671..792401d6ad 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -4906,6 +4906,8 @@ e_comp_wl_surface_attach(E_Client *ec, E_Comp_Wl_Buffer *buffer) e_pixmap_resource_set(ec->pixmap, buffer); e_pixmap_dirty(ec->pixmap); e_pixmap_refresh(ec->pixmap); + + ELOGF("TRANSFORM", "@@@ buffer_transform(%d) animating(%d)", NULL, ec, e_comp_wl_output_buffer_transform_get(ec), e_comp_object_is_animating(ec->frame)); e_comp_wl_map_size_cal_from_buffer(ec); _e_comp_wl_surface_state_size_update(ec, &ec->comp_data->pending); diff --git a/src/bin/e_config.c b/src/bin/e_config.c index 2c2f409f55..cd01038058 100644 --- a/src/bin/e_config.c +++ b/src/bin/e_config.c @@ -257,6 +257,7 @@ _e_config_edd_init(Eina_Bool old) #endif E_CONFIG_VAL(D, T, screen_rotation_pre, UINT); E_CONFIG_VAL(D, T, screen_rotation_setting, UINT); + E_CONFIG_VAL(D, T, screen_rotation_client_ignore, UCHAR); E_CONFIG_VAL(D, T, eom_enable, UCHAR); E_CONFIG_VAL(D, T, use_cursor_timer, INT); E_CONFIG_VAL(D, T, cursor_timer_interval, INT); @@ -484,6 +485,7 @@ e_config_load(void) E_CONFIG_LIMIT(e_config->keyboard.repeat_rate, -1, 1000); // 1 second E_CONFIG_LIMIT(e_config->screen_rotation_pre, 0, 270); E_CONFIG_LIMIT(e_config->screen_rotation_setting, 0, 270); + E_CONFIG_LIMIT(e_config->screen_rotation_client_ignore, 0, 1); E_CONFIG_LIMIT(e_config->eom_enable, 0, 1); E_CONFIG_LIMIT(e_config->use_cursor_timer, 0, 1); E_CONFIG_LIMIT(e_config->sleep_for_dri, 0, 1); diff --git a/src/bin/e_config.h b/src/bin/e_config.h index 2fc6cc70d5..81f7e21b56 100644 --- a/src/bin/e_config.h +++ b/src/bin/e_config.h @@ -149,6 +149,7 @@ struct _E_Config #endif unsigned int screen_rotation_pre; // screen-rotation value as default (0/90/180/270) unsigned int screen_rotation_setting; // screen-rotation value which is set in runtime (0/90/180/270) + Eina_Bool screen_rotation_client_ignore; // client ignores screen rotation (0/1) Eina_Bool eom_enable; // 0: eom disable, 1: eom enable int use_cursor_timer; // boolean value for enabling cursor timer (default : disable : 0) int cursor_timer_interval; // time value the cursor will be displayed in second (default : 5) diff --git a/src/bin/e_plane.c b/src/bin/e_plane.c index 03948242fb..9085b13b5d 100755 --- a/src/bin/e_plane.c +++ b/src/bin/e_plane.c @@ -2224,6 +2224,18 @@ e_plane_ec_prepare_set(E_Plane *plane, E_Client *ec) } } + /* if the buffer transform of surface is not same with output's transform, we + * can't show it to HW overlay directly. + */ + int transform = e_comp_wl_output_buffer_transform_get(ec); + if ((plane->output->config.rotation / 90) != transform) + { + if (!e_config->screen_rotation_client_ignore) + e_comp_screen_rotation_ignore_output_transform_send(ec, EINA_FALSE); + + return EINA_FALSE; + } + plane->prepare_ec = ec; return EINA_TRUE;