X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Ftdm_types.h;h=d2013b7f26d79bc7cf4cd830f93eeb73d3364ce6;hb=17fa403ebeb3de0c042b684f45151e78a92483ce;hp=58a787f8888c7956dcf132cabd33512d440074dc;hpb=8f35b8bbce307ac6c3f0fb6cbdb9889823fcf59b;p=platform%2Fcore%2Fuifw%2Flibtdm.git diff --git a/include/tdm_types.h b/include/tdm_types.h index 58a787f..d2013b7 100644 --- a/include/tdm_types.h +++ b/include/tdm_types.h @@ -38,6 +38,8 @@ #include +#include "tdm_common.h" + #ifdef __cplusplus extern "C" { #endif @@ -57,8 +59,6 @@ extern "C" { * @endcode */ -#include - typedef enum { TDM_EVENT_LOOP_READABLE = (1 << 0), TDM_EVENT_LOOP_WRITABLE = (1 << 1), @@ -116,6 +116,11 @@ 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 */ @@ -143,51 +148,22 @@ typedef struct _tdm_info_capture { * @since 2.0.0 */ typedef enum { + + /** Set by the client for an invisible window. The value by default. + * + * The device ignores windows of this type. + */ + TDM_COMPOSITION_NONE = 0, + /** The client will composite this window into the client target window * * User can choose this type for window to avoid a hardware composition for * this window. * - * User has to set this type for the window which has the TDM_COMPOSITION_CLIENT_CANDIDATE - * type. (see the TDM_COMPOSITION_CLIENT_CANDIDATE type) - * * The device must not request any composition type changes for windows of * this type. */ - TDM_COMPOSITION_CLIENT = 0, - - /* Set by the HWC after tdm_output_hwc_validate(). - * - * If the HWC decided that it doesn't want/can't to continue the composition for - * the window through a hardware overlay or other similar way it'll change - * a type to the TDM_COMPOSITION_CLIENT_CANDIDATE type. - * - * This transition can happen only if the window has the TDM_COMPOSITION_DEVICE - * or the TDM_COMPOSITION_VIDEO type already. - * - * If an user changed type of a window from the TDM_COMPOSITION_DEVICE or the - * TDM_COMPOSITION_VIDEO type to the the TDM_COMPOSITION_CLIENT type, the type - * will be rejected to the TDM_COMPOSITION_CLIENT_CANDIDATE type. - * - * The user has to composite this window itself. - * - * The underlying hardware overlay is owned by this window till a type being - * changed to the TDM_COMPOSITION_CLIENT type, but it's not possible to set a - * buffer for this window after a type's been changed to the - * TDM_COMPOSITION_CLIENT_CANDIDATE type. - * - * This transitional state is used to get rid of blinking at a transition from - * the TDM_COMPOSITION_DEVICE/TDM_COMPOSITION_VIDEO type to the - * TDM_COMPOSITION_CLIENT type where the hw has to wait till a buffer, which was - * on a hw overlay, get composited to the fb_target and only after this happens - * unset(or set another window on) this hw overlay. - * - * User has to inform the HWC (the HWC got no way to know when it happens) after a buffer, - * which was on a hw overlay, get composited to the fb_target by setting a type of this - * window to the TDM_COMPOSITION_CLIENT type, it causes a type of this window being changed - * to TDM_COMPOSITION_CLIENT. - */ - TDM_COMPOSITION_CLIENT_CANDIDATE = 5, + TDM_COMPOSITION_CLIENT = 1, /** Set by the client before tdm_output_hwc_validate(). * @@ -202,7 +178,7 @@ typedef enum { * * Upon tdm_output_hwc_validate(), the device may request a change from this type to * TDM_COMPOSITION_CLIENT or TDM_COMPOSITION_DEVICE_CANDIDATE. */ - TDM_COMPOSITION_DEVICE = 1, + TDM_COMPOSITION_DEVICE = 3, /** Similar to DEVICE, but the position of this layer may also be set * asynchronously through layer_set_cursor_position. If this functionality is not @@ -214,18 +190,24 @@ typedef enum { * 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. */ - TDM_COMPOSITION_CURSOR = 3, + TDM_COMPOSITION_CURSOR = 4, - /** The device will handle the composition of this layer through a hardware - * overlay or other similar means. + /** This type is for the VIDEO window which can be set to the reserved hw overlay + * which is assigned by the device. * - * Upon tdm_output_hwc_validate(), the device may request a change from this type to - * either TDM_COMPOSITION_DEVICE or TDM_COMPOSITION_CLIENT, but it is - * unlikely that content will display correctly in these cases. */ - TDM_COMPOSITION_VIDEO = 4, + * Normally, this VIDEO window displays under the primary hw overlayer of the output. */ + TDM_COMPOSITION_VIDEO = 5, } tdm_hwc_window_composition; /** + * @brief The hwc window flag enumeration + * @since 2.0.0 + */ +typedef enum { + TDM_HWC_WINDOW_FLAG_NONE = 0, +} tdm_hwc_window_flag; + +/** * @brief The tdm display object */ typedef void tdm_display; @@ -285,6 +267,20 @@ 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, @@ -297,6 +293,11 @@ typedef void (*tdm_capture_done_handler)(tdm_capture *capture, tbm_surface_h buffer, void *user_data); /** + * @brief The create handler of a vblank object + */ +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 */