#include "e_display_intern.h"
#include "e_utils_intern.h"
#include "e_view_intern.h"
+#include "e_view_rect.h"
#include "e_view_edje_intern.h"
#include "e_policy_zone_intern.h"
#include "e_policy_desk_intern.h"
#include "e_view_client_intern.h"
#include "e_policy_zone_intern.h"
#include "e_comp_canvas_intern.h"
+#include "e_hwc_window_intern.h"
#define PRI(ec) ((E_Client_Private *)e_object_data_get(E_OBJECT(ec)))
#include "e_view_edje_intern.h"
#include "e_view_intern.h"
#include "e_view_image.h"
+#include "e_view_rect.h"
#include "e_theme_intern.h"
#include "e_comp_intern.h"
#include "e_comp_object_intern.h"
#include "e_intern.h"
#include "e_hwc.h"
+typedef struct _E_Hwc_Window_Buffer E_Hwc_Window_Buffer;
+typedef struct _E_Hwc_Window_Target E_Hwc_Window_Target;
+typedef struct _E_Hwc_Window_Update_Data E_Hwc_Window_Update_Data;
+typedef struct _E_Hwc_Window_Commit_Data E_Hwc_Window_Commit_Data;
+
+typedef struct _E_Hwc_Window_Queue E_Hwc_Window_Queue;
+typedef struct _E_Hwc_Window_Queue_Buffer E_Hwc_Window_Queue_Buffer;
+typedef struct _E_Hwc_Window_Queue_Buffer_Ref E_Hwc_Window_Queue_Buffer_Ref;
+
+// struct of e_hwc_window_intern.h
+struct _E_Hwc_Window_Buffer
+{
+ tbm_surface_h tsurface;
+ E_Hwc_Window_Queue *queue;
+ struct wl_listener queue_destroy_listener;
+ Eina_Bool from_queue;
+ int transform;
+};
+
+// struct of e_hwc_window_queue_intern.h
+struct _E_Hwc_Window_Queue_Buffer_Ref
+{
+ E_Hwc_Window_Queue_Buffer *buffer;
+ struct wl_listener destroy_listener;
+};
+
+// struct of e_hwc_window.h
+struct _E_Hwc_Window_Update_Data
+{
+ E_Comp_Wl_Buffer_Ref buffer_ref;
+ E_Hwc_Window_Queue_Buffer_Ref queue_buffer_ref;
+ E_Hwc_Window_Buffer buffer;
+ tdm_hwc_window_info info;
+ E_Hwc_Window *hwc_window;
+};
+
+#include "e_hwc_window_queue_intern.h"
+#include "e_hwc_window_intern.h"
+
+struct _E_Hwc
+{
+ E_Output *output;
+
+ E_Hwc_Policy hwc_policy;
+ E_Hwc_Mode hwc_mode;
+ Eina_Bool hwc_deactive : 1; // deactive hwc policy
+
+ Ecore_Evas *ee;
+ Evas *evas;
+
+ Eina_Bool primary_output;
+
+ /* variables for hwc_windows policy */
+ tdm_hwc *thwc;
+ Eina_Bool hwc_wins;
+ Eina_List *hwc_windows;
+ E_Hwc_Window_Target *target_hwc_window;
+ tbm_surface_queue_h target_buffer_queue;
+ E_Hwc_Window_Target *root_target_hwc_window;
+ Eina_Bool wait_commit;
+ Eina_List *visible_windows;
+ int num_visible_windows;
+ Eina_Bool re_evaluate;
+ Eina_Bool property_changed;
+
+ void *gsurface;
+ int gsurface_width;
+ int gsurface_height;
+ int gsurface_format;
+
+ /* capabilities */
+ Eina_Bool tdm_hwc_video_stream;
+ Eina_Bool tdm_hwc_video_scale;
+ Eina_Bool tdm_hwc_video_transform;
+ Eina_Bool tdm_hwc_video_scanout;
+
+ Eina_Bool intercept_pol;
+
+ /* variables for pp at hwc_windows policy */
+ tdm_pp *tpp;
+ tbm_surface_queue_h pp_tqueue;
+ E_Hwc_Window_Queue *pp_queue;
+ Eina_Bool pp_set;
+ Eina_Bool pp_commit;
+ Eina_Rectangle pp_src_rect, pp_dst_rect;
+ int pp_minw, pp_minh, pp_maxw, pp_maxh;
+ int pp_align;
+ int pp_align_vertical;
+ E_Hwc_Window *pp_hwc_window;
+ E_Hwc_Window_Update_Data pp_update;
+
+ /* external output */
+ Eina_Rectangle mirror_rect;
+ E_Hwc *mirror_src_hwc;
+ Eina_List *mirror_dst_hwc;
+
+ Eina_Rectangle zoom_rect;
+ Eina_Bool zoom_enabled;
+
+ int norender;
+
+ /* for fps */
+ double fps;
+ double old_fps;
+ double frametimes[122];
+ double time;
+ double lapse;
+ int cframes;
+ int flapse;
+
+ Eina_Bool present_sync;
+
+ Eina_Bool tdm_hwc_fence;
+ int commit_fence_fd;
+
+ Eina_List *wins_commit_data_list;
+
+ Eina_List *sync_callback_list;
+
+ int gbm_format;
+
+ E_Hwc_Window *below_transparent_window;
+
+ struct
+ {
+ int min_w;
+ int min_h;
+ int max_w;
+ int max_h;
+ } output_available;
+
+ Eina_Bool comp_override;
+
+ unsigned int restriction;
+ unsigned int changed;
+ Eina_List *changed_windows;
+};
+
struct _E_Hwc_Hook
{
EINA_INLIST;
#include "e_blur_intern.h"
#include "e_view_intern.h"
#include "e_view_client_intern.h"
+#include "e_output_intern.h"
#include <pixman.h>
#include <wayland-tbm-server.h>
#define E_HWC_WINDOW_INTERN_H
#include "e_intern.h"
-#include "e_hwc_window.h"
+#include "e_hwc_intern.h"
+#include "e_egl_sync_intern.h"
+#include "e_view_rect.h"
#define E_HWC_WINDOW_TYPE (int)0xE0b11003
#define E_HWC_WINDOW_ZPOS_NONE -999
} \
while (0)
-typedef struct _E_Hwc_Window_Commit_Data E_Hwc_Window_Commit_Data;
-typedef struct _E_Hwc_Window_Hook E_Hwc_Window_Hook;
+typedef struct _E_Hwc_Window_Hook E_Hwc_Window_Hook;
typedef void (*E_Hwc_Window_Hook_Cb) (void *data, E_Hwc_Window *hwc_window);
+typedef enum _E_Hwc_Window_State
+{
+ E_HWC_WINDOW_STATE_NONE,
+ E_HWC_WINDOW_STATE_CLIENT,
+ E_HWC_WINDOW_STATE_DEVICE,
+ E_HWC_WINDOW_STATE_VIDEO,
+ E_HWC_WINDOW_STATE_CURSOR,
+} E_Hwc_Window_State;
+
+typedef enum _E_Hwc_Window_Activation_State
+{
+ E_HWC_WINDOW_ACTIVATION_STATE_DEACTIVATED = 0,
+ E_HWC_WINDOW_ACTIVATION_STATE_ACTIVATED,
+} E_Hwc_Window_Activation_State;
+
typedef enum
{
E_HWC_WINS_CHANGED_NONE = 0,
E_HWC_WINDOW_HOOK_LAST
} E_Hwc_Window_Hook_Point;
+struct _E_Hwc_Window
+{
+ E_Object e_obj_inherit;
+
+ E_Client *ec;
+ E_Object_Delfn *ec_delfn;
+ E_Hwc *hwc;
+ tdm_hwc_window *thwc_window;
+ int zpos;
+ Eina_Bool is_target;
+ Eina_Bool is_root_target;
+ Eina_Bool is_video;
+ Eina_Bool is_cursor;
+ Eina_Bool is_deleted;
+ Eina_Bool set_name;
+
+ E_Hwc_Window_Activation_State activation_state; /* hwc_window has occupied the hw layer or not */
+
+ E_Hwc_Window_State state;
+ E_Hwc_Window_State accepted_state;
+
+ E_Hwc_Window_Update_Data current;
+ Eina_List *pending_update_list;
+
+ Eina_List *prop_list;
+
+ E_Hwc_Window_Update_Data commit;
+ Eina_List *commit_data_list;
+
+ /* current display information */
+ E_Hwc_Window_Update_Data display;
+
+ struct
+ {
+ int rotation;
+ E_Comp_Wl_Buffer *buffer;
+ void *img_ptr;
+ int img_w;
+ int img_h;
+ int img_stride;
+ } cursor;
+ struct wl_listener cursor_buffer_destroy_listener;
+
+ struct
+ {
+ /* for fps */
+ double fps;
+ double old_fps;
+ double frametimes[122];
+ double time;
+ double lapse;
+ int cframes;
+ int flapse;
+ } fps;
+
+ int constraints;
+
+ E_Hwc_Window_Queue *queue;
+ struct wl_listener queue_destroy_listener;
+
+ Eina_Bool render_target;
+ Eina_Bool on_rendered_target;
+
+ unsigned int restriction;
+
+ E_Presentation_Time_Container presentation_container;
+
+ Eina_Bool present_sync;
+
+ E_Hwc_Presentation_Callback_List pending_presentation_callbacks;
+ E_Hwc_Presentation_Callback_List presentation_callbacks;
+
+ struct wayland_tbm_client_queue *cqueue;
+
+ E_Zone *zone;
+ E_Object_Delfn *zone_delfn;
+
+ E_View_Rect *below_transparent_view;
+
+ Eina_Bool comp_override;
+ Eina_Bool never_hwc;
+ Eina_Bool visible_skip;
+
+ struct wl_listener image_filter_set_listener;
+ struct wl_listener render_op_set_listener;
+ struct wl_listener content_type_set_listener;
+ struct wl_listener color_set_listener;
+ struct wl_listener color_visible_set_listener;
+
+ Eina_Bool evas_visible;
+ Eina_Bool hwc_visible;
+
+ Eina_Bool changed;
+
+ // view listener
+ struct wl_listener show_listener;
+ struct wl_listener hide_listener;
+ struct wl_listener move_listener;
+ struct wl_listener resize_listener;
+ struct wl_listener restack_listener;
+
+ struct wl_listener transparent_show_listener;
+ struct wl_listener transparent_hide_listener;
+ struct wl_listener transparent_move_listener;
+ struct wl_listener transparent_resize_listener;
+ struct wl_listener transparent_restack_listener;
+};
+
+struct _E_Hwc_Window_Target
+{
+ E_Hwc_Window hwc_window; /* don't move this field */
+ E_Hwc *hwc;
+
+ Ecore_Evas *ee;
+ Evas *evas;
+ int event_fd;
+ Ecore_Fd_Handler *event_hdlr;
+
+ /* a surface the rendering is currently performing at */
+ tbm_surface_h dequeued_tsurface;
+ Eina_List *rendering_tsurfaces;
+ Eina_List *rendered_windows;
+ Eina_Bool is_rendering;
+
+ E_Hwc_Window_Queue *pp_queue;
+ struct wl_listener pp_queue_destroy_listener;
+
+ E_Egl_Sync *end_render_sync;
+
+ Eina_List *present_sync_windows;
+ Eina_List *pending_presentation_cb_wins;
+};
+
+struct _E_Hwc_Window_Commit_Data {
+ E_Hwc_Window *hwc_window;
+ E_Comp_Wl_Buffer_Ref buffer_ref;
+ E_Hwc_Window_Queue_Buffer_Ref queue_buffer_ref;
+ E_Hwc_Window_Buffer buffer;
+ tdm_hwc_window_info info;
+};
+
struct _E_Hwc_Window_Hook
{
EINA_INLIST;
#define E_HWC_WINDOW_QUEUE_INTERN_H
#include "e_intern.h"
-#include "e_hwc_window_intern.h"
+#include "e_hwc_intern.h"
#include <Eldbus.h>
#include <wayland-server.h>
#include "e_compositor_intern.h"
#include "e_view_client_intern.h"
#include "e_hwc_windows_intern.h"
+#include "e_hwc_intern.h"
#include <wayland-tbm-server.h>
#include "e_client_intern.h"
#include "e_utils_intern.h"
#include "e_error_intern.h"
+#include "e_hwc_intern.h"
#include "e_hwc_window_intern.h"
#include "e_hwc_window_queue_intern.h"
#include "e_compositor_intern.h"
+#include "e_output_intern.h"
#include <libds-tizen/hwc.h>
#include "e_egl_sync_intern.h"
#include "e_client_intern.h"
#include "e_display_intern.h"
+#include "e_hwc_intern.h"
#include <linux-explicit-synchronization-unstable-v1-server-protocol.h>
#include <tizen-extension-server-protocol.h>
#include "e_client_intern.h"
#include "e_comp_wl_intern.h"
#include "e_utils_intern.h"
+#include "e_output_intern.h"
#include <presentation-time-server-protocol.h>
#include <tizen-extension-server-protocol.h>
#include "e_comp_wl_intern.h"
#include "e_view_intern.h"
#include "e_view_client_intern.h"
+#include "e_output_intern.h"
/* local variables */
static Eina_List *_ptrs = NULL;
#define E_HWC_H
#include <e_types.h>
-#include <e_output.h>
#include <e_hwc_window.h>
#include <tdm.h>
#define HWC_NAME_LEN 64
+typedef struct _E_Hwc E_Hwc;
+
typedef struct _E_Hwc_Sync_Callback E_Hwc_Sync_Callback;
typedef struct _E_Hwc_Presentation_Callback E_Hwc_Presentation_Callback;
typedef struct _E_Hwc_Presentation_Callback_List E_Hwc_Presentation_Callback_List;
Eina_List *callbacks;
};
-struct _E_Hwc
-{
- E_Output *output;
-
- E_Hwc_Policy hwc_policy;
- E_Hwc_Mode hwc_mode;
- Eina_Bool hwc_deactive : 1; // deactive hwc policy
-
- Ecore_Evas *ee;
- Evas *evas;
-
- Eina_Bool primary_output;
-
- /* variables for hwc_windows policy */
- tdm_hwc *thwc;
- Eina_Bool hwc_wins;
- Eina_List *hwc_windows;
- E_Hwc_Window_Target *target_hwc_window;
- tbm_surface_queue_h target_buffer_queue;
- E_Hwc_Window_Target *root_target_hwc_window;
- Eina_Bool wait_commit;
- Eina_List *visible_windows;
- int num_visible_windows;
- Eina_Bool re_evaluate;
- Eina_Bool property_changed;
-
- void *gsurface;
- int gsurface_width;
- int gsurface_height;
- int gsurface_format;
-
- /* capabilities */
- Eina_Bool tdm_hwc_video_stream;
- Eina_Bool tdm_hwc_video_scale;
- Eina_Bool tdm_hwc_video_transform;
- Eina_Bool tdm_hwc_video_scanout;
-
- Eina_Bool intercept_pol;
-
- /* variables for pp at hwc_windows policy */
- tdm_pp *tpp;
- tbm_surface_queue_h pp_tqueue;
- E_Hwc_Window_Queue *pp_queue;
- Eina_Bool pp_set;
- Eina_Bool pp_commit;
- Eina_Rectangle pp_src_rect, pp_dst_rect;
- int pp_minw, pp_minh, pp_maxw, pp_maxh;
- int pp_align;
- int pp_align_vertical;
- E_Hwc_Window *pp_hwc_window;
- E_Hwc_Window_Update_Data pp_update;
-
- /* external output */
- Eina_Rectangle mirror_rect;
- E_Hwc *mirror_src_hwc;
- Eina_List *mirror_dst_hwc;
-
- Eina_Rectangle zoom_rect;
- Eina_Bool zoom_enabled;
-
- int norender;
-
- /* for fps */
- double fps;
- double old_fps;
- double frametimes[122];
- double time;
- double lapse;
- int cframes;
- int flapse;
-
- Eina_Bool present_sync;
-
- Eina_Bool tdm_hwc_fence;
- int commit_fence_fd;
-
- Eina_List *wins_commit_data_list;
-
- Eina_List *sync_callback_list;
-
- int gbm_format;
-
- E_Hwc_Window *below_transparent_window;
-
- struct
- {
- int min_w;
- int min_h;
- int max_w;
- int max_h;
- } output_available;
-
- Eina_Bool comp_override;
-
- unsigned int restriction;
- unsigned int changed;
- Eina_List *changed_windows;
-};
-
E_API extern int E_EVENT_HWC_ACTIVE;
E_API extern int E_EVENT_HWC_DEACTIVE;
E_API E_Hwc_Mode e_hwc_mode_get(E_Hwc *hwc);
E_API void e_hwc_deactive_set(E_Hwc *hwc, Eina_Bool set);
E_API Eina_Bool e_hwc_deactive_get(E_Hwc *hwc);
-E_API E_Output *e_hwc_output_get(E_Hwc *hwc);
E_API E_Hwc_Policy e_hwc_hwc_policy_get(E_Hwc *hwc);
#endif
#ifndef E_HWC_WINDOW_H
#define E_HWC_WINDOW_H
-#include <e_types.h>
-#include <e_object.h>
-#include <e_client.h>
-#include <e_comp_wl.h>
-#include <e_hwc.h>
-#include <e_presentation_time.h>
-#include <e_zone.h>
-#include <e_egl_sync.h>
-#include <e_view_rect.h>
-
-#include <tbm_surface.h>
-#include <wayland-server.h>
-#include <Ecore.h>
-
-typedef enum _E_Hwc_Window_State
-{
- E_HWC_WINDOW_STATE_NONE,
- E_HWC_WINDOW_STATE_CLIENT,
- E_HWC_WINDOW_STATE_DEVICE,
- E_HWC_WINDOW_STATE_VIDEO,
- E_HWC_WINDOW_STATE_CURSOR,
-} E_Hwc_Window_State;
-
-typedef enum _E_Hwc_Window_Activation_State
-{
- E_HWC_WINDOW_ACTIVATION_STATE_DEACTIVATED = 0,
- E_HWC_WINDOW_ACTIVATION_STATE_ACTIVATED,
-} E_Hwc_Window_Activation_State;
-
-struct _E_Hwc_Window
-{
- E_Object e_obj_inherit;
-
- E_Client *ec;
- E_Object_Delfn *ec_delfn;
- E_Hwc *hwc;
- tdm_hwc_window *thwc_window;
- int zpos;
- Eina_Bool is_target;
- Eina_Bool is_root_target;
- Eina_Bool is_video;
- Eina_Bool is_cursor;
- Eina_Bool is_deleted;
- Eina_Bool set_name;
-
- E_Hwc_Window_Activation_State activation_state; /* hwc_window has occupied the hw layer or not */
-
- E_Hwc_Window_State state;
- E_Hwc_Window_State accepted_state;
-
- E_Hwc_Window_Update_Data current;
- Eina_List *pending_update_list;
-
- Eina_List *prop_list;
-
- E_Hwc_Window_Update_Data commit;
- Eina_List *commit_data_list;
-
- /* current display information */
- E_Hwc_Window_Update_Data display;
-
- struct
- {
- int rotation;
- E_Comp_Wl_Buffer *buffer;
- void *img_ptr;
- int img_w;
- int img_h;
- int img_stride;
- } cursor;
- struct wl_listener cursor_buffer_destroy_listener;
-
- struct
- {
- /* for fps */
- double fps;
- double old_fps;
- double frametimes[122];
- double time;
- double lapse;
- int cframes;
- int flapse;
- } fps;
-
- int constraints;
-
- E_Hwc_Window_Queue *queue;
- struct wl_listener queue_destroy_listener;
-
- Eina_Bool render_target;
- Eina_Bool on_rendered_target;
-
- unsigned int restriction;
-
- E_Presentation_Time_Container presentation_container;
-
- Eina_Bool present_sync;
-
- E_Hwc_Presentation_Callback_List pending_presentation_callbacks;
- E_Hwc_Presentation_Callback_List presentation_callbacks;
-
- struct wayland_tbm_client_queue *cqueue;
-
- E_Zone *zone;
- E_Object_Delfn *zone_delfn;
-
- E_View_Rect *below_transparent_view;
-
- Eina_Bool comp_override;
- Eina_Bool never_hwc;
- Eina_Bool visible_skip;
-
- struct wl_listener image_filter_set_listener;
- struct wl_listener render_op_set_listener;
- struct wl_listener content_type_set_listener;
- struct wl_listener color_set_listener;
- struct wl_listener color_visible_set_listener;
-
- Eina_Bool evas_visible;
- Eina_Bool hwc_visible;
-
- Eina_Bool changed;
-
- // view listener
- struct wl_listener show_listener;
- struct wl_listener hide_listener;
- struct wl_listener move_listener;
- struct wl_listener resize_listener;
- struct wl_listener restack_listener;
-
- struct wl_listener transparent_show_listener;
- struct wl_listener transparent_hide_listener;
- struct wl_listener transparent_move_listener;
- struct wl_listener transparent_resize_listener;
- struct wl_listener transparent_restack_listener;
-};
-
-struct _E_Hwc_Window_Target
-{
- E_Hwc_Window hwc_window; /* don't move this field */
- E_Hwc *hwc;
-
- Ecore_Evas *ee;
- Evas *evas;
- int event_fd;
- Ecore_Fd_Handler *event_hdlr;
-
- /* a surface the rendering is currently performing at */
- tbm_surface_h dequeued_tsurface;
- Eina_List *rendering_tsurfaces;
- Eina_List *rendered_windows;
- Eina_Bool is_rendering;
-
- E_Hwc_Window_Queue *pp_queue;
- struct wl_listener pp_queue_destroy_listener;
-
- E_Egl_Sync *end_render_sync;
-
- Eina_List *present_sync_windows;
- Eina_List *pending_presentation_cb_wins;
-};
-
-struct _E_Hwc_Window_Commit_Data {
- E_Hwc_Window *hwc_window;
- E_Comp_Wl_Buffer_Ref buffer_ref;
- E_Hwc_Window_Queue_Buffer_Ref queue_buffer_ref;
- E_Hwc_Window_Buffer buffer;
- tdm_hwc_window_info info;
-};
+typedef struct _E_Hwc_Window E_Hwc_Window;
#endif // E_HWC_WINDOW_H
typedef struct _E_Desk E_Desk; // type of e_desk.h
typedef struct _E_Zone E_Zone; // type of e_zone.h
typedef struct _E_Output E_Output; // type of e_output.h
-typedef struct _E_Hwc E_Hwc; // type of e_hwc.h
-typedef struct _E_Hwc_Window E_Hwc_Window; // type of e_hwc_window.h
-typedef struct _E_Hwc_Window_Buffer E_Hwc_Window_Buffer; // type of e_hwc_window.h
-typedef struct _E_Hwc_Window_Target E_Hwc_Window_Target; // type of e_hwc_window.h
-typedef struct _E_Hwc_Window_Update_Data E_Hwc_Window_Update_Data; // type of e_hwc_window.h
-typedef struct _E_Hwc_Window_Queue E_Hwc_Window_Queue; // type of e_hwc_window_queue_intern.h
-typedef struct _E_Hwc_Window_Queue_Buffer E_Hwc_Window_Queue_Buffer; // type of e_hwc_window_queue_intern.h
-typedef struct _E_Hwc_Window_Queue_Buffer_Ref E_Hwc_Window_Queue_Buffer_Ref; // type of e_hwc_window_queue_intern.h
typedef struct _E_Comp_Wl_Buffer E_Comp_Wl_Buffer; // type of e_comp_wl.h
typedef struct _E_Comp_Wl_Buffer_Ref E_Comp_Wl_Buffer_Ref; // type of e_comp_wl.h
typedef struct _E_Object E_Object; // type of e_object.h
struct wl_listener destroy_listener;
};
-// struct of e_hwc_window_queue_intern.h
-struct _E_Hwc_Window_Queue_Buffer_Ref
-{
- E_Hwc_Window_Queue_Buffer *buffer;
- struct wl_listener destroy_listener;
-};
-
-// struct of e_hwc_window.h
-struct _E_Hwc_Window_Buffer
-{
- tbm_surface_h tsurface;
- E_Hwc_Window_Queue *queue;
- struct wl_listener queue_destroy_listener;
- Eina_Bool from_queue;
- int transform;
-};
-
-// struct of e_hwc_window.h
-struct _E_Hwc_Window_Update_Data
-{
- E_Comp_Wl_Buffer_Ref buffer_ref;
- E_Hwc_Window_Queue_Buffer_Ref queue_buffer_ref;
- E_Hwc_Window_Buffer buffer;
- tdm_hwc_window_info info;
- E_Hwc_Window *hwc_window;
-};
-
struct _E_Object
{
int magic;