int dx, dy;
int width, height;
int transform;
+ int window_transform;
tbm_bo bo;
+ tpl_bool_t w_rotated; /* TRUE if need to call wayland_tbm_client_set_buffer_transform */
tpl_bool_t rotated; /* TRUE if need to call wl_surface_set_buffer_transform */
tpl_bool_t reset; /* TRUE if queue reseted by external */
tpl_bool_t is_new; /* for frontbuffer mode */
version = wl_proxy_get_version((struct wl_proxy *)wl_egl_window->surface);
+ if (wayland_egl_buffer->w_rotated == TPL_TRUE) {
+ wayland_tbm_client_set_buffer_transform(
+ wayland_egl_display->wl_tbm_client,
+ (void *)wayland_egl_buffer->wl_proxy,
+ wayland_egl_buffer->window_transform);
+ wayland_egl_buffer->w_rotated = TPL_FALSE;
+ }
+
if (wayland_egl_buffer->rotated == TPL_TRUE) {
wl_surface_set_buffer_transform(wl_egl_window->surface,
wayland_egl_buffer->transform);
+ wayland_egl_buffer->rotated = TPL_FALSE;
}
wl_surface_attach(wl_egl_window->surface, (void *)wayland_egl_buffer->wl_proxy,
wayland_egl_buffer->width = wl_egl_window->width;
wayland_egl_buffer->height = wl_egl_window->height;
+ if (wayland_egl_buffer->window_transform != wl_egl_window->window_transform) {
+ wayland_egl_buffer->window_transform = wl_egl_window->window_transform;
+ wayland_egl_buffer->w_rotated = TPL_TRUE;
+ } else {
+ wayland_egl_buffer->w_rotated = TPL_FALSE;
+ }
+
if (wayland_egl_surface->latest_transform != wl_egl_window->transform) {
wayland_egl_surface->latest_transform = wl_egl_window->transform;
wayland_egl_buffer->transform = wl_egl_window->transform;
wayland_egl_buffer->wayland_egl_surface = wayland_egl_surface;
wayland_egl_buffer->transform = wl_egl_window->transform;
+ if (wayland_egl_buffer->window_transform != wl_egl_window->window_transform) {
+ wayland_egl_buffer->window_transform = wl_egl_window->window_transform;
+ wayland_egl_buffer->w_rotated = TPL_TRUE;
+ } else {
+ wayland_egl_buffer->w_rotated = TPL_FALSE;
+ }
+
if (wayland_egl_surface->latest_transform != wl_egl_window->transform) {
wayland_egl_surface->latest_transform = wl_egl_window->transform;
wayland_egl_buffer->rotated = TPL_TRUE;
struct wl_proxy *wl_buffer;
int dx, dy;
int width, height;
+ /* for wayland_tbm_client_set_buffer_transform */
+ int w_transform;
+ tpl_bool_t w_rotated;
/* for wl_surface_set_buffer_transform */
int transform;
tpl_bool_t rotated;
(void **)&buf_info);
/* If buf_info is already existed, reuse it. */
if (buf_info) {
+ if (buf_info->w_transform != wl_egl_window->window_transform) {
+ buf_info->w_transform = wl_egl_window->window_transform;
+ buf_info->w_rotated = TPL_TRUE;
+ }
+
if (surf_source->latest_transform != wl_egl_window->transform) {
surf_source->latest_transform = wl_egl_window->transform;
buf_info->rotated = TPL_TRUE;
buf_info->num_rects = 0;
buf_info->rects = NULL;
buf_info->need_to_commit = TPL_TRUE;
+
+ if (buf_info->w_transform != wl_egl_window->window_transform) {
+ buf_info->w_transform = wl_egl_window->window_transform;
+ buf_info->w_rotated = TPL_TRUE;
+ }
+
if (surf_source->latest_transform != wl_egl_window->transform) {
surf_source->latest_transform = wl_egl_window->transform;
buf_info->rotated = TPL_TRUE;
}
+
buf_info->transform = wl_egl_window->rotation;
wl_buffer_add_listener((void *)buf_info->wl_buffer,
version = wl_proxy_get_version((struct wl_proxy *)wl_surface);
+ if (buf_info->w_rotated == TPL_TRUE) {
+ wayland_tbm_client_set_buffer_transform(
+ surf_source->disp_source->wl_tbm_client,
+ (void *)buf_info->wl_buffer,
+ buf_info->w_transform);
+ buf_info->w_rotated = TPL_FALSE;
+ }
+
if (buf_info->rotated == TPL_TRUE) {
wl_surface_set_buffer_transform(wl_surface, buf_info->transform);
+ buf_info->rotated = TPL_FALSE;
}
wl_egl_window->attached_width = buf_info->width;