add temporary code to prevent the build break
[platform/core/uifw/libtdm.git] / include / tdm_types.h
index 68f3096..072f466 100644 (file)
@@ -115,6 +115,15 @@ typedef struct _tdm_info_layer {
 } tdm_info_layer;
 
 /**
+ * @brief The region structure
+ * @since 2.0.0
+ */
+typedef struct _tdm_region {
+       unsigned int num_rects;
+       tdm_pos const *rects;
+} tdm_region;
+
+/**
  * @brief The hwc window info structure
  * @since 2.0.0
  */
@@ -124,11 +133,6 @@ typedef struct _tdm_hwc_window_info {
        tdm_transform transform;
 } tdm_hwc_window_info;
 
-typedef struct _tdm_hwc_region {
-       unsigned int num_rects;
-       tdm_pos const *rects;
-} tdm_hwc_region;
-
 /**
  * @brief The pp info structre
  */
@@ -173,18 +177,12 @@ typedef enum {
         */
        TDM_COMPOSITION_CLIENT = 1,
 
-       /** Set by the client before tdm_output_hwc_validate().
-        *
-        * Upon tdm_output_hwc_validate(), the device may request a change from this type to
-        * TDM_COMPOSITION_DEVICE or TDM_COMPOSITION_CLIENT. */
-       TDM_COMPOSITION_DEVICE_CANDIDATE = 2,
-
-       /** Set by the HWC after tdm_output_hwc_validate().
+       /** Set by the HWC after tdm_hwc_validate().
         *
         * The device will handle the composition of this window through a hardware
         * overlay or other similar means.
         *
-        * Upon tdm_output_hwc_validate(), the device may request a change from this type to
+        * Upon tdm_hwc_validate(), the device may request a change from this type to
         * TDM_COMPOSITION_CLIENT or TDM_COMPOSITION_DEVICE_CANDIDATE. */
        TDM_COMPOSITION_DEVICE = 3,
 
@@ -192,9 +190,9 @@ typedef enum {
         * asynchronously through layer_set_cursor_position. If this functionality is not
         * supported on a layer that the client sets to TDM_COMPOSITION_CURSOR, the
         * device must request that the composition type of that layer is changed to
-        * TDM_COMPOSITION_CLIENT upon the next call to tdm_output_hwc_validate().
+        * TDM_COMPOSITION_CLIENT upon the next call to tdm_hwc_validate().
         *
-        * Upon tdm_output_hwc_validate(), the device may request a change from this type to
+        * Upon tdm_hwc_validate(), the device may request a change from this type to
         * either TDM_COMPOSITION_DEVICE or TDM_COMPOSITION_CLIENT. Changing to
         * TDM_COMPOSITION_DEVICE will prevent the use of layer_set_cursor_position but
         * still permit the device to composite the layer. */
@@ -207,6 +205,18 @@ typedef enum {
        TDM_COMPOSITION_VIDEO = 5,
 } tdm_hwc_window_composition;
 
+typedef enum {
+       TDM_CONSTRAINT_NONE = 0,
+       /** If the client needs to render to a specific buffer for compositing
+        *  with TDM_COMPOSITION_DEVICE, the backend needs to set
+        *  TDM_CONSTRAINT_BUFFER_QUEUE to hwc_window until the hwc_window is not
+        *  TDM_COMPOSITION_DEVICE. The client gets the tbm_surface_queue_h through
+        *  the tdm_hwc_window_aquire_buffer_queue. It will render the frames on
+        *  the buffers which gets from the tbm_surface_queue_h.
+        */
+       TDM_CONSTRAINT_BUFFER_QUEUE = (1 << 0),
+} tdm_hwc_window_constraint;
+
 /**
  * @brief The hwc window flag enumeration
  * @since 2.0.0
@@ -236,7 +246,13 @@ typedef void tdm_output;
 typedef void tdm_layer;
 
 /**
- * @brief The tdm window object
+ * @brief The tdm hwc object
+ * @since 2.0.0
+ */
+typedef void tdm_hwc;
+
+/**
+ * @brief The tdm hwc window object
  * @since 2.0.0
  */
 typedef void tdm_hwc_window;
@@ -290,20 +306,6 @@ typedef void (*tdm_layer_commit_handler)(tdm_layer *layer, unsigned int sequence
                                                                                 void *user_data);
 
 /**
- * @brief The hwc_window commit handler
- */
-typedef void (*tdm_hwc_window_commit_handler)(tdm_hwc_window *hwc_window, unsigned int sequence,
-                                                                                unsigned int tv_sec, unsigned int tv_usec,
-                                                                                void *user_data);
-
-/**
- * @brief The output target_buffer commit handler
- */
-typedef void (*tdm_output_hwc_target_buffer_commit_handler)(tdm_output *output, unsigned int sequence,
-                                                                                unsigned int tv_sec, unsigned int tv_usec,
-                                                                                void *user_data);
-
-/**
  * @brief The done handler of a pp object
  */
 typedef void (*tdm_pp_done_handler)(tdm_pp *pp, tbm_surface_h src,
@@ -321,10 +323,12 @@ typedef void (*tdm_capture_done_handler)(tdm_capture *capture,
 typedef void (*tdm_vblank_create_handler)(tdm_vblank *vblank, void *user_data);
 
 /**
- * @brief The 'need to validate' handler of an output object
- * @since 2.0.0
+ * @brief The hwc commit handler
+ * @see hwc_set_commit_handler() function of #tdm_func_hwc
  */
-typedef void (*tdm_output_need_validate_handler)(tdm_output *output);
+typedef void (*tdm_hwc_commit_handler)(tdm_hwc *hwc, unsigned int sequence,
+                                                                         unsigned int tv_sec, unsigned int tv_usec,
+                                                                         void *user_data);
 
 #ifdef __cplusplus
 }