forked from enlightenment/efl
ecore wayland: expand internal interface to pass engine option list.
This is a prepartion patch to support msaa in wayland. ui window needs to deliver engine options (stencil, depth, msaa bits) to evas engine side, ecore_evas_wayland_egl should have the argument to pass.
This commit is contained in:
parent
2e85c6ba34
commit
53599a8d39
|
@ -4462,7 +4462,7 @@ ecore_evas_wayland_egl_new(const char *disp_name, unsigned int parent,
|
|||
int x, int y, int w, int h, Eina_Bool frame)
|
||||
{
|
||||
Ecore_Evas *ee;
|
||||
Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool);
|
||||
Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool, const int*);
|
||||
Eina_Module *m = _ecore_evas_engine_load("wayland");
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
||||
|
||||
|
@ -4471,7 +4471,7 @@ ecore_evas_wayland_egl_new(const char *disp_name, unsigned int parent,
|
|||
|
||||
if (parent) ERR("Wayland windows with parents not supported through legacy API");
|
||||
|
||||
ee = new(disp_name, 0, x, y, w, h, frame);
|
||||
ee = new(disp_name, 0, x, y, w, h, frame, NULL);
|
||||
if (!_ecore_evas_cursors_init(ee))
|
||||
{
|
||||
ecore_evas_free(ee);
|
||||
|
@ -4503,17 +4503,17 @@ _wayland_shm_new(const char *disp_name, Ecore_Window parent,
|
|||
|
||||
Ecore_Evas *
|
||||
_wayland_egl_new(const char *disp_name, Ecore_Window parent,
|
||||
int x, int y, int w, int h, Eina_Bool frame)
|
||||
int x, int y, int w, int h, Eina_Bool frame, const int *opt)
|
||||
{
|
||||
Ecore_Evas *ee;
|
||||
Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool);
|
||||
Ecore_Evas *(*new)(const char *, Ecore_Window, int, int, int, int, Eina_Bool, const int *);
|
||||
Eina_Module *m = _ecore_evas_engine_load("wayland");
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
|
||||
|
||||
new = eina_module_symbol_get(m, "ecore_evas_wayland_egl_new_internal");
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
|
||||
|
||||
ee = new(disp_name, parent, x, y, w, h, frame);
|
||||
ee = new(disp_name, parent, x, y, w, h, frame, opt);
|
||||
if (!_ecore_evas_cursors_init(ee))
|
||||
{
|
||||
ecore_evas_free(ee);
|
||||
|
|
|
@ -499,7 +499,7 @@ EAPI void ecore_evas_done(Ecore_Evas *ee, Eina_Bool single_window);
|
|||
|
||||
#ifdef IPA_YLNO_ESU_LANRETNI_MLE
|
||||
EAPI Ecore_Evas *_wayland_shm_new(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame);
|
||||
EAPI Ecore_Evas *_wayland_egl_new(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame);
|
||||
EAPI Ecore_Evas *_wayland_egl_new(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame, const int *opt);
|
||||
#else
|
||||
#define _wayland_shm_new DONT_USE_INTERNAL_API
|
||||
#define _wayland_egl_new DONT_USE_INTERNAL_API
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#define FRAME_OBJ_THEME_MIN_VERSION 119
|
||||
|
||||
Ecore_Evas *_wayland_shm_new(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame);
|
||||
Ecore_Evas *_wayland_egl_new(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame);
|
||||
Ecore_Evas *_wayland_egl_new(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame, const int *opt);
|
||||
|
||||
static const Elm_Win_Trap *trap = NULL;
|
||||
|
||||
|
@ -5444,7 +5444,7 @@ _elm_win_finalize_internal(Eo *obj, Efl_Ui_Win_Data *sd, const char *name, Efl_U
|
|||
else if (!strcmp(enginelist[i], ELM_WAYLAND_SHM))
|
||||
tmp_sd.ee = _wayland_shm_new(NULL, parent_id, 0, 0, 0, 0, 0);
|
||||
else if (!strcmp(enginelist[i], ELM_WAYLAND_EGL))
|
||||
tmp_sd.ee = _wayland_egl_new(NULL, parent_id, 0, 0, 0, 0, 0);
|
||||
tmp_sd.ee = _wayland_egl_new(NULL, parent_id, 0, 0, 0, 0, 0, NULL);
|
||||
else if (!strcmp(enginelist[i], ELM_SOFTWARE_WIN32))
|
||||
tmp_sd.ee = ecore_evas_software_gdi_new(NULL, 0, 0, 1, 1);
|
||||
else if (!strcmp(enginelist[i], ELM_SOFTWARE_DDRAW))
|
||||
|
|
|
@ -2467,7 +2467,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
|
|||
};
|
||||
|
||||
Ecore_Evas *
|
||||
_ecore_evas_wl_common_new_internal(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame, const char *engine_name)
|
||||
_ecore_evas_wl_common_new_internal(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame, const int *opt, const char *engine_name)
|
||||
{
|
||||
Ecore_Wl2_Display *ewd;
|
||||
Ecore_Wl2_Window *p = (Ecore_Wl2_Window *)parent;
|
||||
|
@ -2576,6 +2576,29 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, Ecore_Window parent, i
|
|||
wdata->sync_done = EINA_TRUE;
|
||||
if ((einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas)))
|
||||
{
|
||||
if (opt)
|
||||
{
|
||||
int op;
|
||||
for (op = 0; opt[op]; op++)
|
||||
{
|
||||
if (opt[op] == ECORE_EVAS_OPT_GL_DEPTH)
|
||||
{
|
||||
op++;
|
||||
einfo->depth_bits = opt[op];
|
||||
}
|
||||
else if (opt[op] == ECORE_EVAS_OPT_GL_STENCIL)
|
||||
{
|
||||
op++;
|
||||
einfo->stencil_bits = opt[op];
|
||||
}
|
||||
else if (opt[op] == ECORE_EVAS_OPT_GL_MSAA)
|
||||
{
|
||||
op++;
|
||||
einfo->msaa_bits = opt[op];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
einfo->info.destination_alpha = ee_needs_alpha(ee);
|
||||
einfo->info.rotation = ee->rotation;
|
||||
einfo->info.depth = 32;
|
||||
|
|
|
@ -29,13 +29,13 @@
|
|||
|
||||
/* external functions */
|
||||
EAPI Ecore_Evas *
|
||||
ecore_evas_wayland_egl_new_internal(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame)
|
||||
ecore_evas_wayland_egl_new_internal(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame, const int *opt)
|
||||
{
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
return _ecore_evas_wl_common_new_internal(disp_name, parent,
|
||||
x, y, w, h, frame,
|
||||
"wayland_egl");
|
||||
opt, "wayland_egl");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -77,6 +77,7 @@ struct _Ecore_Evas_Engine_Wl_Data
|
|||
* @param w Width of the Ecore_Evas window to be created.
|
||||
* @param h Height of the Ecore_Evas window to be created.
|
||||
* @param frame Deprecated. (Just pass EINA_FALSE.)
|
||||
* @param opt engine option list
|
||||
* @param engine_name Wayland engine to use for rendering.
|
||||
* @return Ecore_Evas instance or @c NULL if creation failed.
|
||||
*
|
||||
|
@ -95,6 +96,6 @@ struct _Ecore_Evas_Engine_Wl_Data
|
|||
* @see ecore_evas_wayland_shm_new()
|
||||
* @see ecore_evas_wayland_egl_new()
|
||||
*/
|
||||
Ecore_Evas *_ecore_evas_wl_common_new_internal(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame, const char *engine_name);
|
||||
Ecore_Evas *_ecore_evas_wl_common_new_internal(const char *disp_name, Ecore_Window parent, int x, int y, int w, int h, Eina_Bool frame, const int *opt, const char *engine_name);
|
||||
|
||||
#endif /* _ECORE_EVAS_WAYLAND_PRIVATE_H_ */
|
||||
|
|
Loading…
Reference in New Issue