{
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) ||
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);
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;
+ /* If a client doesn't watch the ignore_output_transform events, we can't show
+ * a client buffer to HW overlay directly when the buffer transform is not same
+ * with output transform. If a client watch the ignore_output_transform events,
+ * we can control client's buffer transform. In this case, we don't need to
+ * check client's buffer transform here.
+ */
+ if (!e_comp_screen_rotation_ignore_output_transform_watch(ec))
+ {
+ int transform = e_comp_wl_output_buffer_transform_get(ec);
+
+ if ((eout->config.rotation / 90) != transform)
+ return EINA_FALSE;
+ }
return EINA_TRUE;
}
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
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);
}
+EINTERN Eina_Bool
+e_comp_screen_rotation_ignore_output_transform_watch(E_Client *ec)
+{
+ return (_tz_surface_rotation_find(ec)) ? EINA_TRUE : EINA_FALSE;
+}
+
EINTERN E_Output *
e_comp_screen_primary_output_get(E_Comp_Screen *e_comp_screen)
{
ERR("fail to e_plane_renderer_queue_set");
}
+ renderer->need_change_buffer_transform = EINA_TRUE;
+
return renderer;
}
struct wayland_tbm_client_queue * cqueue = NULL;
E_Plane_Renderer_Client *renderer_client = NULL;
E_Plane *plane = NULL;
+ int transform;
EINA_SAFETY_ON_NULL_RETURN_VAL(renderer, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
if ((renderer->state == E_PLANE_RENDERER_STATE_ACTIVATE) && (renderer->ec != ec))
e_plane_renderer_deactivate(renderer);
+ if (renderer->ec != ec)
+ renderer->need_change_buffer_transform = EINA_TRUE;
+
+ transform = e_comp_wl_output_buffer_transform_get(ec);
+ if ((plane->output->config.rotation / 90) != transform)
+ {
+ if (!e_config->screen_rotation_client_ignore && renderer->need_change_buffer_transform)
+ {
+ e_comp_screen_rotation_ignore_output_transform_send(ec, EINA_FALSE);
+ renderer->need_change_buffer_transform = EINA_FALSE;
+ INF("ec:%p tansform:%d screen_roatation:%d", ec, transform, plane->output->config.rotation);
+ }
+ return EINA_FALSE;
+ }
+ else
+ renderer->need_change_buffer_transform = EINA_TRUE;
+
wayland_tbm_server_client_queue_activate(cqueue, 0, 0, 0);
if (renderer_trace_debug)
struct wayland_tbm_client_queue * cqueue = NULL;
E_Client *ec = NULL;
E_Plane_Renderer_Client *renderer_client = NULL;
+ E_Plane *plane = NULL;
+ int transform;
EINA_SAFETY_ON_NULL_RETURN_VAL(renderer, EINA_FALSE);
+ plane = renderer->plane;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(plane, EINA_FALSE);
+
ec = renderer->ec;
if (!ec) return EINA_TRUE;
if (cqueue)
wayland_tbm_server_client_queue_deactivate(cqueue);
+ transform = e_comp_wl_output_buffer_transform_get(ec);
+ if (plane->output->config.rotation != 0 && (plane->output->config.rotation / 90) == transform)
+ e_comp_screen_rotation_ignore_output_transform_send(ec, EINA_TRUE);
+
_e_plane_renderer_recover_ec(renderer);
renderer->state = E_PLANE_RENDERER_STATE_NONE;
E_Plane_Renderer_Client *renderer_client = NULL;
tbm_surface_queue_error_e tsq_err = TBM_SURFACE_QUEUE_ERROR_NONE;
E_Plane *plane = NULL;
+ int transform;
EINA_SAFETY_ON_NULL_RETURN_VAL(renderer, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
/* export */
e_plane_renderer_surface_send(renderer, ec, tsurface);
+ if (renderer->ec != ec)
+ renderer->need_change_buffer_transform = EINA_TRUE;
+
+ transform = e_comp_wl_output_buffer_transform_get(ec);
+ if ((plane->output->config.rotation / 90) != transform)
+ {
+ if (!e_config->screen_rotation_client_ignore && renderer->need_change_buffer_transform)
+ {
+ e_comp_screen_rotation_ignore_output_transform_send(ec, EINA_FALSE);
+ renderer->need_change_buffer_transform = EINA_FALSE;
+ }
+ }
+ else
+ renderer->need_change_buffer_transform = EINA_TRUE;
+
wayland_tbm_server_client_queue_activate(cqueue, 0, renderer->tqueue_size, 1);
if (e_comp->hwc_sync_mode_change && !e_comp->hwc_use_detach)
}
}
+ transform = e_comp_wl_output_buffer_transform_get(ec);
+ if ((plane->output->config.rotation / 90) != transform)
+ {
+ INF("ec:%p tansform:%d screen_roatation:%d", ec, transform, plane->output->config.rotation);
+ return EINA_FALSE;
+ }
+
if (renderer_trace_debug)
ELOGF("E_PLANE_RENDERER", "Activate Renderer(%p)", ec->pixmap, ec, renderer);
E_Plane_Renderer_Client *renderer_client = NULL;
tbm_surface_queue_error_e tsq_err = TBM_SURFACE_QUEUE_ERROR_NONE;
E_Plane *plane = NULL;
+ int transform;
EINA_SAFETY_ON_NULL_RETURN_VAL(renderer, EINA_FALSE);
goto done;
}
+ transform = e_comp_wl_output_buffer_transform_get(ec);
+ if (plane->output->config.rotation != 0 && (plane->output->config.rotation / 90) == transform)
+ e_comp_screen_rotation_ignore_output_transform_send(ec, EINA_TRUE);
+
if (renderer_trace_debug)
ELOGF("E_PLANE_RENDERER", "Set backup buffer wl_buffer(%p)::Deactivate",
ec->pixmap, ec, _get_wl_buffer(ec));