There is a requirement to know display server side commit.
This patch set provides way to get the commit of display server.
[Usage]
https://review.tizen.org/gerrit/#/c/profile/mobile/platform/core/uifw/elm-demo-tizen-mobile/+/240108/
@tizen_only
Change-Id: Ie75465d4e5b3f07ae2a8309b39ea6a6284d416dc
* END *
*******/
+//TIZEN_ONLY(20201127) support evas render sync
+typedef enum _Evas_Render_Sync_Type
+{
+ EVAS_RENDER_SYNC_COMMIT = 0,
+ EVAS_RENDER_SYNC_PRESENT = 1
+} Evas_Render_Sync_Type;
+
+/**
+ * @brief Create a file descriptor for rendering sync for a given evas
+ *
+ * @param obj The evas to create a file descriptor for rendering sync
+ * @return The file descriptor. It must be closed manually by the caller using `close`
+ *
+ * @ingroup Evas_Canvas
+ */
+EAPI int evas_render_sync_fd_create(Evas *obj, Evas_Render_Sync_Type sync_type);
+//
+
/**
* @}
*/
eina_rectangle_free(r);
}
+//TIZEN_ONLY(20201127) support evas render sync
+EAPI int
+evas_render_sync_fd_create(Evas *obj, Evas_Render_Sync_Type sync_type)
+{
+ int fd = -1;
+
+ if (!obj) return fd;
+
+ Evas_Public_Data *e = efl_data_scope_get(obj, EVAS_CANVAS_CLASS);
+ Efl_Canvas_Output *output;
+
+ output = eina_list_data_get(e->outputs);
+ if (!output) return fd;
+
+ if (e->engine.func->render_sync_fd_create)
+ fd = e->engine.func->render_sync_fd_create(output->output, sync_type);
+ else
+ ERR("engine does not support render sync file descriptor");
+
+ return fd;
+}
+//
+
EOLIAN Eina_Bool
_evas_canvas_render_async(Eo *eo_e, Evas_Public_Data *e)
{
void (*font_glyphs_gc_collect) (void *engine, float ratio, int *texture_size, int *atlas_size, Eina_Bool only_when_requested);
+ //TIZEN_ONLY(20201127) support evas render sync
+ int (*render_sync_fd_create) (void *data, Evas_Render_Sync_Type sync_type);
+ //
+
unsigned int info_size;
};
NULL,
/* END */
eng_font_glyphs_gc_collect,
+ //TIZEN_ONLY(20201127) support evas render sync
+ NULL, // render_sync_fd_create
+ //
0 // sizeof (Info)
};
}
}
+//TIZEN_ONLY(20201127) support evas render sync
+static int
+eng_render_sync_fd_create(void *data, Evas_Render_Sync_Type sync_type)
+{
+ int fd = -1;
+ Render_Engine *re;
+ Outbuf *ob;
+
+ if (!(re = (Render_Engine *)data)) return fd;
+
+ ob = eng_get_ob(re);
+
+ if (!ob || !ob->win) return fd;
+
+ if (sync_type == EVAS_RENDER_SYNC_COMMIT)
+ fd = wl_egl_window_tizen_create_commit_sync_fd(ob->win);
+ else if (sync_type == EVAS_RENDER_SYNC_COMMIT)
+ fd = wl_egl_window_tizen_create_presentation_sync_fd(ob->win);
+ else
+ ERR("invalid render sync type: %d", sync_type);
+
+ if (fd == -1)
+ ERR("does not support render sync file descriptor");
+
+ return fd;
+}
+//
+
static void
eng_output_dump(void *engine EINA_UNUSED, void *data)
{
ORD(gl_error_get);
ORD(gl_get_pixels);
+ //TIZEN_ONLY(20201127) support evas render sync
+ ORD(render_sync_fd_create);
+ //
evas_gl_thread_link_init();
symbols();