[hwc] add the ability to ask a client(E20) about the revalidation
[platform/core/uifw/libtdm.git] / src / tdm_private.h
index 691d4d9..01d2e48 100644 (file)
@@ -52,6 +52,7 @@
 #include <poll.h>
 #include <sys/syscall.h>
 #include <sys/types.h>
+#include <sys/eventfd.h>
 #include <math.h>
 #include <grp.h>
 
@@ -226,6 +227,12 @@ struct _tdm_private_output {
 
        /* TODO: temp solution for handling DPMS things in sub-htread */
        tdm_event_loop_source *dpms_changed_timer;
+
+       struct {
+               /* look at the tdm_output_set_need_revalidate_handler() declaration for the details */
+               tdm_output_need_validate_handler hndl;
+               int event_fd;
+       } need_validate;
 };
 
 struct _tdm_private_layer {
@@ -539,6 +546,7 @@ typedef enum {
        TDM_THREAD_CB_PP_DONE,
        TDM_THREAD_CB_CAPTURE_DONE,
        TDM_THREAD_CB_VBLANK_SW,
+       TDM_THREAD_CB_NEED_VALIDATE,
 } tdm_thread_cb_type;
 
 typedef struct _tdm_thread_cb_base tdm_thread_cb_base;
@@ -549,6 +557,7 @@ typedef struct _tdm_thread_cb_output_dpms tdm_thread_cb_output_dpms;
 typedef struct _tdm_thread_cb_pp_done tdm_thread_cb_pp_done;
 typedef struct _tdm_thread_cb_capture_done tdm_thread_cb_capture_done;
 typedef struct _tdm_thread_cb_vblank_sw tdm_thread_cb_vblank_sw;
+typedef struct _tdm_thread_cb_need_validate tdm_thread_cb_need_validate;
 
 struct _tdm_thread_cb_base {
        tdm_thread_cb_type type;
@@ -598,6 +607,11 @@ struct _tdm_thread_cb_vblank_sw {
        double vblank_stamp;
 };
 
+struct _tdm_thread_cb_need_validate {
+       tdm_thread_cb_base base;
+       tdm_private_output *o;
+};
+
 tdm_error
 tdm_thread_init(tdm_private_loop *private_loop);
 void
@@ -722,6 +736,8 @@ tdm_display_enable_fps(tdm_private_display *private_display, int enable);
 void
 tdm_monitor_server_command(tdm_display *dpy, const char *options, char *reply, int *len);
 
+tdm_error
+tdm_handle_need_validate_event(tdm_thread_cb_need_validate *ev);
 
 struct argument_details {
        char type;