Some target can display only specific buffer at hardware layer.
enlightenment sends buffer to render engine (egl or software engine)
of client when enlightenment wants to display at hardware layer and
enlightenment wait that client attach buffer by render engine.
but if client doesn't have change of rendering after buffer is sent,
render engine doesn't render at buffer.
tizen_renderer protocol and redraw_request event were added.
enlightenment sends redraw_request event after buffer is sent and
wants client redraws at wl_surface.
1. add event ECORE_WL2_EVENT_WINDOW_REDRAW_REQUEST and
Ecore_Wl2_Event_Window_Redraw_Request
2. add damage to ecore_evas in callback of redraw request
Change-Id: I951b458c10d8163cc37583ededcabd4cd807531e
} Ecore_Wl2_Event_Window_Pre_Visibility_Change;
/** @internal */
+typedef struct _Ecore_Wl2_Event_Window_Redraw_Request
+{
+ unsigned int win;
+} Ecore_Wl2_Event_Window_Redraw_Request;
+
+/** @internal */
typedef struct _Ecore_Wl2_Event_Dnd_Position
{
unsigned int win, source;
EAPI extern int ECORE_WL2_EVENT_WINDOW_VISIBILITY_CHANGE;
EAPI extern int ECORE_WL2_EVENT_WINDOW_PRE_VISIBILITY_CHANGE;
EAPI extern int ECORE_WL2_EVENT_WINDOW_LOWER;
+EAPI extern int ECORE_WL2_EVENT_WINDOW_REDRAW_REQUEST;
EAPI extern int ECORE_WL2_EVENT_DND_POSITION; /** @internal */
EAPI extern int ECORE_WL2_EVENT_DND_OFFER; /** @internal @since 1.8, but NOT exist currenly */
EAPI extern int ECORE_WL2_EVENT_DATA_SOURCE_CANCELLED; /** @internal @since 1.7, but NOT exist currenly */
EAPI int ECORE_WL2_EVENT_WINDOW_VISIBILITY_CHANGE = 0;
EAPI int ECORE_WL2_EVENT_WINDOW_PRE_VISIBILITY_CHANGE = 0;
EAPI int ECORE_WL2_EVENT_WINDOW_LOWER = 0;
+EAPI int ECORE_WL2_EVENT_WINDOW_REDRAW_REQUEST = 0;
EAPI int ECORE_WL2_EVENT_DND_POSITION = 0;
EAPI int ECORE_WL2_EVENT_DND_OFFER = 0;
EAPI int ECORE_WL2_EVENT_DATA_SOURCE_CANCELLED = 0;
ECORE_WL2_EVENT_WINDOW_VISIBILITY_CHANGE = ecore_event_type_new();
ECORE_WL2_EVENT_WINDOW_PRE_VISIBILITY_CHANGE = ecore_event_type_new();
ECORE_WL2_EVENT_WINDOW_LOWER = ecore_event_type_new();
+ ECORE_WL2_EVENT_WINDOW_REDRAW_REQUEST = ecore_event_type_new();
ECORE_WL2_EVENT_DND_POSITION = ecore_event_type_new();
ECORE_WL2_EVENT_DND_OFFER = ecore_event_type_new();
ECORE_WL2_EVENT_DATA_SOURCE_CANCELLED = ecore_event_type_new();
ECORE_WL2_EVENT_WINDOW_VISIBILITY_CHANGE,
ECORE_WL2_EVENT_WINDOW_PRE_VISIBILITY_CHANGE,
ECORE_WL2_EVENT_WINDOW_LOWER,
+ ECORE_WL2_EVENT_WINDOW_REDRAW_REQUEST,
ECORE_WL2_EVENT_DND_POSITION,
ECORE_WL2_EVENT_DND_OFFER,
ECORE_WL2_EVENT_DATA_SOURCE_CANCELLED,
tizen_launch_appinfo_add_listener(ewd->wl.tz_appinfo, &_tizen_launch_appinfo_listener, ewd->wl.display);
}
//
+//TIZEN_ONLY(20200626): support tizen_renderer
+ else if (!strcmp(interface, "tizen_renderer"))
+ {
+ ewd->wl.tz_renderer =
+ wl_registry_bind(registry, id, &tizen_renderer_interface, 1);
+ }
+//
//
event:
if (ewd->wl.tz_screen_rotation) tizen_screen_rotation_destroy(ewd->wl.tz_screen_rotation);
if (ewd->wl.tz_moveresize) tizen_move_resize_destroy(ewd->wl.tz_moveresize);
if (ewd->wl.tz_video) tizen_video_destroy(ewd->wl.tz_video);
+ if (ewd->wl.tz_renderer) tizen_renderer_destroy(ewd->wl.tz_renderer);
//
if (ewd->wl.registry) wl_registry_destroy(ewd->wl.registry);
// TIZEN_ONLY(20200601): support sync between ui and video
struct tizen_video *tz_video;
//
+ // TIZEN_ONLY(20200601): support tizen_renderer
+ struct tizen_renderer *tz_renderer;
+ //
int compositor_version;
} wl;
Eina_Bool sync : 1;
} video;
//
+
+ // TIZEN_ONLY(20200601): support tizen_renderer_surface
+ struct tizen_renderer_surface *tz_renderer_surface;
+ //
};
struct _Ecore_Wl2_Output
};
//
+//TIZEN_ONLY(20200707): support tizen_renderer_surface
+static void
+_tizen_renderer_surface_cb_redraw_request(void *data, struct tizen_renderer_surface *renderer_surface EINA_UNUSED)
+{
+ Ecore_Wl2_Window *win;
+ Ecore_Wl2_Event_Window_Redraw_Request *ev;
+
+ if (!(win = data)) return;
+ if (!(ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Redraw_Request)))) return;
+
+ ev->win = win->id;
+
+ ecore_event_add(ECORE_WL2_EVENT_WINDOW_REDRAW_REQUEST, ev, NULL, NULL);
+}
+
+static const struct tizen_renderer_surface_listener _tizen_renderer_surface_listener =
+{
+ _tizen_renderer_surface_cb_redraw_request,
+};
+//
// TIZEN_ONLY(20171112) : support tizen protocols
// to initialize wayland tizen extention protocols after surface creation
tizen_policy_set_parent(window->display->wl.tz_policy, window->surface, window->parent->surface);
}
}
+
+ if (window->display->wl.tz_renderer && !window->tz_renderer_surface)
+ {
+ window->tz_renderer_surface =
+ tizen_renderer_get_renderer_surface(window->display->wl.tz_renderer, window->surface);
+ if (!window->tz_renderer_surface) return;
+
+ tizen_renderer_surface_add_listener(window->tz_renderer_surface,
+ &_tizen_renderer_surface_listener, window);
+ }
}
// END of TIZEN_ONLY(20171112) : support tizen protocols
}
//
+//TIZEN_ONLY(20200707): support tizen_renderer_surface
+static Eina_Bool
+_ecore_evas_wl_common_cb_window_redraw_request(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+ Ecore_Evas *ee;
+ Ecore_Wl2_Event_Window_Redraw_Request *ev;
+
+ ev = event;
+ ee = ecore_event_window_match(ev->win);
+
+ if (!ee) return ECORE_CALLBACK_PASS_ON;
+ if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+
+ _ecore_evas_wl_common_damage_add(ee);
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+//
+
static int
_ecore_evas_wl_common_init(void)
{
eina_array_push(_ecore_evas_wl_event_hdls, h);
//
+ // TIZEN_ONLY(20200707): support redraw request event
+ h = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_REDRAW_REQUEST,
+ _ecore_evas_wl_common_cb_window_redraw_request, NULL);
+ eina_array_push(_ecore_evas_wl_event_hdls, h);
+ //
+
ecore_event_evas_init();
return _ecore_evas_wl_init_count;