return transform;
}
+EINTERN enum wl_output_transform
+e_comp_wl_output_pending_buffer_transform_get(E_Client *ec)
+{
+ E_Comp_Wl_Buffer_Viewport *vp;
+ E_Comp_Wl_Buffer *buffer;
+ enum wl_output_transform transform, rotation;
+
+ if (!ec) return WL_OUTPUT_TRANSFORM_NORMAL;
+ if (e_object_is_del(E_OBJECT(ec))) return WL_OUTPUT_TRANSFORM_NORMAL;
+ if (!ec->comp_data) return WL_OUTPUT_TRANSFORM_NORMAL;
+
+ vp = &ec->comp_data->pending.buffer_viewport;
+ if (ec->comp_data->sub.data)
+ return vp->buffer.transform;
+
+ buffer = ec->comp_data->pending.buffer;
+
+ if (!buffer ||
+ (buffer->type != E_COMP_WL_BUFFER_TYPE_NATIVE && buffer->type != E_COMP_WL_BUFFER_TYPE_TBM))
+ return vp->buffer.transform;
+
+ rotation = buffer->transform;
+ if (rotation == 0)
+ return vp->buffer.transform;
+
+ /* ignore the flip value when calculating transform because the screen rotation
+ * functionality doesn't consider the flip output transform currently
+ */
+ transform = (4 + (vp->buffer.transform & 0x3) - rotation) & 0x3;
+
+ DBG("ec(%p) window rotation(%d) buffer_transform(%d) : transform(%d)",
+ ec, rotation, vp->buffer.transform, transform);
+
+ return transform;
+}
+
E_API void
e_comp_wl_map_size_cal_from_buffer(E_Client *ec)
{
unsigned int img_file_size,
Eina_Bool ref_set,
E_Comp_Wl_Buffer *buff,
- tbm_surface_h tbm_surface)
+ tbm_surface_h tbm_surface,
+ Eina_Bool pending)
{
E_Client *src_ec = NULL;
struct wl_resource *tbm = NULL;
Eina_Bool add_opts = EINA_FALSE;
char *p, tmp[16];
int len;
+ enum wl_output_transform output_transform;
if (rs->provider)
{
/* if unbinded, buffer_transform should be 0 for consumer to composite buffers.
* Otherwise, we skip sending a change_buffer event because buffer is not ready.
*/
- if (!rs->bind_ec && e_comp_wl_output_buffer_transform_get(src_ec))
+ if (pending)
+ output_transform = e_comp_wl_output_pending_buffer_transform_get(src_ec);
+ else
+ output_transform = e_comp_wl_output_buffer_transform_get(src_ec);
+
+ if (!rs->bind_ec && output_transform)
{
RSMINF("CHANGED_BUFF skiped: buffer not ready", rs->ec, "SURFACE", rs);
return EINA_TRUE;
_rsm->dummy_fd,
(unsigned int)img_size,
EINA_FALSE,
- buff, tbm_surface);
+ buff, tbm_surface, EINA_FALSE);
}
else
{
fd,
(unsigned int)img_size,
EINA_FALSE,
- NULL, NULL);
+ NULL, NULL, EINA_FALSE);
close(fd);
}
_rsm->dummy_fd,
0,
EINA_TRUE,
- buffer, NULL);
+ buffer, NULL, EINA_FALSE);
}
}
fd,
(unsigned int)image_size,
EINA_FALSE,
- NULL, NULL);
+ NULL, NULL, EINA_FALSE);
}
close(fd);
_rsm->dummy_fd,
0,
EINA_TRUE,
- buffer, tbm_surface);
+ buffer, tbm_surface, EINA_FALSE);
}
else if (remote_surface->source)
{
_rsm->dummy_fd,
0,
EINA_TRUE,
- buffer, tbm_surface);
+ buffer, tbm_surface, EINA_FALSE);
}
else
{
}
static void
-_e_comp_wl_remote_surface_source_update(E_Comp_Wl_Remote_Source *source, E_Comp_Wl_Buffer *buffer)
+_e_comp_wl_remote_surface_source_update(E_Comp_Wl_Remote_Source *source, E_Comp_Wl_Buffer *buffer, Eina_Bool pending)
{
E_Comp_Wl_Remote_Surface *remote_surface;
Eina_List *l;
_rsm->dummy_fd,
0,
EINA_TRUE,
- buffer, NULL);
+ buffer, NULL, pending);
}
}
_rsm->dummy_fd,
0,
EINA_TRUE,
- buffer, NULL);
+ buffer, NULL, EINA_FALSE);
}
}
}
else if ((source = _remote_source_find(ec)))
{
- _e_comp_wl_remote_surface_source_update(source, buffer);
+ _e_comp_wl_remote_surface_source_update(source, buffer, EINA_FALSE);
}
/* send frame done */
}
//send update to remote_surface of source client
- _e_comp_wl_remote_surface_source_update(source, ec->comp_data->pending.buffer);
+ _e_comp_wl_remote_surface_source_update(source, ec->comp_data->pending.buffer, EINA_TRUE);
//do normal commit callback process
return EINA_FALSE;