#define ECORE_EVAS_OPT_GL_DEPTH 4
#define ECORE_EVAS_OPT_GL_STENCIL 5
#define ECORE_EVAS_OPT_GL_MSAA 6
-#define ECORE_EVAS_OPT_LAST 7
+//TIZEN_ONLY(20230302): Added frontbuffer API
+#define ECORE_EVAS_OPT_FRONTBUFFER 7
+//
+#define ECORE_EVAS_OPT_LAST 8
#define ECORE_EVAS_SWAP_MODE_AUTO 0
#define ECORE_EVAS_SWAP_MODE_FULL 1
Eina_Stringshare *name;
Eina_Stringshare *accel_pref;
+ //TIZEN_ONLY(20230302): Added frontbuffer API
+ Eina_Bool use_frontbuffer;
+
Eina_Future *finalize_future;
Evas_Object *main_menu;
opt[opt_i++] = ECORE_EVAS_OPT_GL_MSAA;
opt[opt_i++] = gl_msaa;
}
+ //TIZEN_ONLY(20230302): Added frontbuffer API
+ if (sd->use_frontbuffer)
+ {
+ opt[opt_i++] = ECORE_EVAS_OPT_FRONTBUFFER;
+ opt[opt_i++] = 1;
+ }
+ //
opt[opt_i] = 0;
if (!strcmp(enginelist[i], ELM_SOFTWARE_X11))
return pd->accel_pref;
}
+//TIZEN_ONLY(20230302): Added frontbuffer API
+EOLIAN static void
+_efl_ui_win_use_frontbuffer_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd, Eina_Bool use_frontbuffer)
+{
+ if (efl_finalized_get(obj))
+ {
+ ERR("This function is only allowed during construction.");
+ return;
+ }
+ pd->use_frontbuffer = use_frontbuffer;
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_win_use_frontbuffer_get(const Eo *obj, Efl_Ui_Win_Data *pd)
+{
+ return pd->use_frontbuffer;
+}
+//
+
EOLIAN static void
_efl_ui_win_win_role_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *role)
{
return win;
}
+EAPI Evas_Object *
+elm_win_frontbuffer_add(Evas_Object *parent, const char *name, const char *title, Elm_Win_Type type)
+{
+ Evas_Object *win = NULL;
+
+ win = elm_legacy_add(EFL_UI_WIN_LEGACY_CLASS, parent,
+ efl_text_set(efl_added, title),
+ efl_ui_win_name_set(efl_added, name),
+ efl_ui_win_type_set(efl_added, (Elm_Win_Type)type),
+ efl_ui_win_use_frontbuffer_set(efl_added, EINA_TRUE));
+
+ _elm_win_standard_init(win);
+ return win;
+}
EAPI void
elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode)
return efl_ui_win_accel_preference_get(obj);
}
+//TIZEN_ONLY(20230302): Added frontbuffer API
+EAPI const void
+elm_win_use_frontbuffer_set(Evas_Object *obj, Eina_Bool use_frontbuffer)
+{
+ return efl_ui_win_use_frontbuffer_set(obj, use_frontbuffer);
+}
+
+EAPI const Eina_Bool
+elm_win_use_frontbuffer_get(const Evas_Object *obj)
+{
+ return efl_ui_win_use_frontbuffer_get(obj);
+}
+//
+
EAPI void
elm_win_alpha_set(Evas_Object *obj, Eina_Bool alpha)
{
get {
}
}
+ //TIZEN_ONLY(20220302) Add frontbuffer setter / get_container
+ @property use_frontbuffer {
+ [[The frontbuffer rendering mode used for a window
+
+ If $use_frontbuffer is true, then wayland use frontbuffer rendering mode.
+
+ //TODO: add better description ? mabye from the
+
+ Note: This property is available only for wayland
+ ]]
+ values {
+ use_frontbuffer: bool; [[$true if the window frontbuffer rendering mode is enabled,
+ $false otherwise.]]
+ }
+ set {
+ }
+ get {
+ }
+ }
+
@property alpha {
[[The alpha channel state of a window.
EAPI Evas_Object *elm_win_util_dialog_add(Evas_Object *parent, const char *name, const char *title);
/**
+ * Adds a window object with frontbuffer setup
+ *
+ * @param parent The parent window
+ * @param name The name of the window
+ * @param title The title for the window
+ * @param type The type of the window
+ *
+ * This creates a window like elm_win_add() but also setup frontbuffer rendering mode if it is possible.
+ * Currently only wayland support this.
+ *
+ * @return The created object, or @c NULL on failure
+ *
+ * @see elm_win_add()
+ *
+ * @ingroup Elm_Win_Group
+ * @since 1.25
+ */
+EAPI Evas_Object *elm_win_frontbuffer_add(Evas_Object *parent, const char *name, const char *title, Elm_Win_Type type);
+
+/**
* @brief Sets the window's autodel state.
*
* When closing the window in any way outside of the program control, like
EAPI const char *elm_win_accel_preference_get(const Evas_Object *obj);
/**
+ * @brief The frontbuffer preference for this window.
+ *
+ * Note that this option may be used only in wayland
+ *
+ * @param[in] obj The object.
+ * @param[in] Eina_Bool frontbuffer enabled value
+ *
+ * @since 1.25
+ *
+ * @ingroup Elm_Win_Group
+ */
+EAPI const void elm_win_use_frontbuffer_set(Evas_Object *obj, Eina_Bool use_frontbuffer);
+
+/**
+ * @brief The frontbuffer preference for this window.
+ *
+ * This is a constructor function and can only be called before
+ * @ref Efl.Object.finalize.
+ *
+ * Note that this option may be used only in wayland
+ *
+ * This will return the value of "use_frontbuffer" when the window was
+ * created.
+ *
+ * @param[in] obj The object.
+ *
+ * @return Eina_Bool
+ *
+ * @since 1.25
+ *
+ * @ingroup Elm_Win_Group
+ */
+EAPI const Eina_Bool elm_win_use_frontbuffer_get(const Evas_Object *obj);
+
+/**
* @brief Set the alpha channel state of a window.
*
* If @c alpha is true, the alpha channel of the canvas will be enabled
ee->driver = engine_name;
if (disp_name) ee->name = strdup(disp_name);
-
+
//TIZEN_ONLY(20171228): set default size of ecore_evas
if (w < 1) w = 1;
if (h < 1) h = 1;
op++;
einfo->msaa_bits = opt[op];
}
+ //TIZEN_ONLY(20230301): support frontbuffer surface
+ else if (opt[op] == ECORE_EVAS_OPT_FRONTBUFFER)
+ {
+ op++;
+ einfo->use_frontbuffer = opt[op];
+ }
+ //
}
}
int stencil_bits;
int msaa_bits;
+ //TIZEN_ONLY(20230301): support frontbuffer surface
+ Eina_Bool use_frontbuffer;
+
//TIZEN_ONLY(20171115): support output transform
int window_rotation;
int stencil_bits;
int msaa_bits;
+ //TIZEN_ONLY(20230302): Added frontbuffer API
+ Eina_Bool use_frontbuffer;
+
//TIZEN_ONLY(20161121) : Support PreRotation
int support_pre_rotation;
gw->stencil_bits = einfo->stencil_bits;
gw->msaa_bits = einfo->msaa_bits;
+ //TIZEN_ONLY(20230302): Added frontbuffer API
+ gw->use_frontbuffer = einfo->use_frontbuffer;
+
//
//TIZEN_ONLY(20161121):Support PreRotation
gw->support_pre_rotation = 0;
gw->egl_surface =
eglCreateWindowSurface(gw->egl_disp, gw->egl_config,
(EGLNativeWindowType)gw->win, NULL);
+
+//TIZEN_ONLY(20230302): Added frontbuffer API
+ if (gw->use_frontbuffer)
+ wl_egl_window_tizen_set_frontbuffer_mode((EGLNativeWindowType)gw->win, 1);
+
if (gw->egl_surface == EGL_NO_SURFACE)
{
ERR("eglCreateWindowSurface() fail for %p. code=%#x",