Use e_display instead of the initialization of display in e_comp_screen.
Tdm display implementation should be resided in displaymgr directory.
Change-Id: I82883391c6b001027ab8b7de959e9d79965216a0
#include "e_screensaver_intern.h"
#include "e_hwc_planes_intern.h"
#include "e_server_intern.h"
+#include "e_display_intern.h"
#include <sys/xattr.h>
#include <sys/types.h>
static void
_e_comp_hwc_comp_override_set(Eina_Bool set)
{
- E_Output *output;
+ E_Output *primary_output;
E_Hwc *hwc;
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+ EINA_SAFETY_ON_NULL_RETURN(primary_output);
+#else
+ E_Comp_Screen *e_comp_screen;
+
EINA_SAFETY_ON_NULL_RETURN(e_comp);
EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
- output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- EINA_SAFETY_ON_NULL_RETURN(output);
+ e_comp_screen = e_comp->e_comp_screen;
+ primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+ EINA_SAFETY_ON_NULL_RETURN(primary_output);
+#endif
- hwc = output->hwc;
+ hwc = primary_output->hwc;
EINA_SAFETY_ON_NULL_RETURN(hwc);
if (hwc->hwc_policy == E_HWC_POLICY_WINDOWS)
- e_hwc_windows_comp_override_set(output->hwc, set);
+ e_hwc_windows_comp_override_set(primary_output->hwc, set);
}
E_API void
EINTERN void
e_comp_hwc_deactive_set(Eina_Bool set)
{
- E_Output *output = NULL;
+ E_Output *primary_output;
+
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+ EINA_SAFETY_ON_NULL_RETURN(primary_output);
+#else
+ E_Comp_Screen *e_comp_screen;
EINA_SAFETY_ON_NULL_RETURN(e_comp);
EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
- output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- EINA_SAFETY_ON_NULL_RETURN(output);
+ e_comp_screen = e_comp->e_comp_screen;
+ primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+ EINA_SAFETY_ON_NULL_RETURN(primary_output);
+#endif
- e_hwc_deactive_set(output->hwc, set);
+ e_hwc_deactive_set(primary_output->hwc, set);
}
/* get the deactive value to the only primary output */
EINTERN Eina_Bool
e_comp_hwc_deactive_get(void)
{
- E_Output *output = NULL;
+ E_Output *primary_output = NULL;
+
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ E_Comp_Screen *e_comp_screen;
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, EINA_FALSE);
- output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
+ e_comp_screen = e_comp->e_comp_screen;
+ primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+#endif
+ EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
- return e_hwc_deactive_get(output->hwc);
+ return e_hwc_deactive_get(primary_output->hwc);
}
/* set the multi_plane value to the only primary output */
EINTERN void
e_comp_hwc_multi_plane_set(Eina_Bool set)
{
- E_Output *output = NULL;
+ E_Output *primary_output = NULL;
- EINA_SAFETY_ON_NULL_RETURN(e_comp);
- EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ E_Comp_Screen *e_comp_screen;
- output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- EINA_SAFETY_ON_NULL_RETURN(output);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, EINA_FALSE);
- e_hwc_planes_multi_plane_set(output->hwc, EINA_TRUE);
+ e_comp_screen = e_comp->e_comp_screen;
+ primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+#endif
+ EINA_SAFETY_ON_NULL_RETURN(primary_output);
+
+ e_hwc_planes_multi_plane_set(primary_output->hwc, EINA_TRUE);
}
/* get the multi_plane value to the only primary output */
EINTERN Eina_Bool
e_comp_hwc_multi_plane_get(void)
{
- E_Output *output = NULL;
+ E_Output *primary_output = NULL;
+
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ E_Comp_Screen *e_comp_screen;
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, EINA_FALSE);
- output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
+ e_comp_screen = e_comp->e_comp_screen;
+ primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+#endif
+ EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
- return e_hwc_planes_multi_plane_get(output->hwc);
+ return e_hwc_planes_multi_plane_get(primary_output->hwc);
}
/* end the hwc policy at the primary output */
EINTERN void
e_comp_hwc_end(const char *location)
{
- E_Output *output = NULL;
+ E_Output *primary_output = NULL;
E_Hwc *hwc = NULL;
- EINA_SAFETY_ON_NULL_RETURN(e_comp);
- EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ E_Comp_Screen *e_comp_screen;
- output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- EINA_SAFETY_ON_NULL_RETURN(output);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, EINA_FALSE);
- hwc = output->hwc;
+ e_comp_screen = e_comp->e_comp_screen;
+ primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+#endif
+ EINA_SAFETY_ON_NULL_RETURN(primary_output);
+
+ hwc = primary_output->hwc;
EINA_SAFETY_ON_NULL_RETURN(hwc);
if (hwc->hwc_policy == E_HWC_POLICY_PLANES)
- e_hwc_planes_end(output->hwc, location);
+ e_hwc_planes_end(primary_output->hwc, location);
else if (hwc->hwc_policy == E_HWC_POLICY_WINDOWS)
- e_hwc_windows_client_type_override(output->hwc);
+ e_hwc_windows_client_type_override(primary_output->hwc);
}
EINTERN void
#include "e_theme_intern.h"
#include "e_config_intern.h"
#include "e_tizen_screen_manager_intern.h"
+#include "e_display_intern.h"
static Eina_List *handlers;
static Eina_Bool _ev_freeze = EINA_FALSE;
E_API void
e_comp_canvas_norender_push(void)
{
- E_Comp_Screen *e_comp_screen;
E_Output *primary_output;
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ E_Comp_Screen *e_comp_screen;
e_comp_screen = e_comp->e_comp_screen;
primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+#endif
TRACE_DS_BEGIN(Canvas NoRenderPush:%d, e_comp->norender + 1);
e_output_norender_push(primary_output);
E_API void
e_comp_canvas_norender_pop(void)
{
- E_Comp_Screen *e_comp_screen;
E_Output *primary_output;
if (e_comp->norender <= 0) return;
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ E_Comp_Screen *e_comp_screen;
e_comp_screen = e_comp->e_comp_screen;
primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+#endif
TRACE_DS_BEGIN(Canvas NoRenderPop:%d, e_comp->norender - 1);
e_output_norender_pop(primary_output);
EINTERN int
e_comp_canvas_norender_get(void)
{
- E_Comp_Screen *e_comp_screen;
E_Output *primary_output;
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ E_Comp_Screen *e_comp_screen;
e_comp_screen = e_comp->e_comp_screen;
primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+#endif
return e_output_norender_get(primary_output);
}
#include "e_desk_area_intern.h"
#include "e_client_intern.h"
#include "e_utils_intern.h"
-#include "e_comp_screen_intern.h"
#include "e_comp_wl_subsurface_intern.h"
#include "e_output_intern.h"
#include "e_comp_object_intern.h"
#include "e_config_intern.h"
#include "e_policy_wl_intern.h"
#include "e_policy_intern.h"
+#include "e_display_intern.h"
#include <libds-tizen/screen.h>
if (e_config->use_pp_zoom)
{
+#ifdef E_DISPLAY
+ if (e_display_pp_support())
+#else
if (e_comp_screen_pp_support())
+#endif
{
zone = desk->zone;
eout = e_output_find(zone->output_id);
if (e_config->use_pp_zoom)
{
+#ifdef E_DISPLAY
+ if (e_display_pp_support())
+#else
if (e_comp_screen_pp_support())
+#endif
{
zone = desk->zone;
eout = e_output_find(zone->output_id);
if (e_config->use_pp_zoom)
{
+#ifdef E_DISPLAY
+ if (e_display_pp_support())
+#else
if (e_comp_screen_pp_support())
+#endif
{
zone = desk->zone;
eout = e_output_find(zone->output_id);
#include <Ecore.h>
#include <Eina.h>
+//soolim
+#define E_DISPLAY
+
#define CHECKING_PRIMARY_ZPOS
#ifdef ENABLE_TTRACE
#include "e_zone_video_intern.h"
#include "e_comp_screen_intern.h"
-
-static int
-gcd(int a, int b)
-{
- if (a % b == 0)
- return b;
- return gcd(b, a % b);
-}
-
-static int
-lcm(int a, int b)
-{
- return a * b / gcd(a, b);
-}
+#include "e_display_intern.h"
E_API Eina_Bool
e_zone_video_available_size_get(E_Zone *zone, int *minw, int *minh, int *maxw, int *maxh, int *align)
{
E_Output *output;
- int ominw = -1, ominh = -1, omaxw = -1, omaxh = -1, oalign = -1;
- int pminw = -1, pminh = -1, pmaxw = -1, pmaxh = -1, palign = -1;
- int rminw = -1, rminh = -1, rmaxw = -1, rmaxh = -1, ralign = -1;
output = e_output_find(zone->output_id);
if (!output)
return EINA_FALSE;
- tdm_output_get_available_size(output->toutput, &ominw, &ominh, &omaxw, &omaxh, &oalign);
- if (!e_comp_screen_pp_support())
- {
- rminw = ominw;
- rminh = ominh;
- rmaxw = omaxw;
- rmaxh = omaxh;
- ralign = oalign;
-
- goto end;
- }
- else
- {
- tdm_display_get_pp_available_size(e_comp->e_comp_screen->tdisplay,
- &pminw, &pminh, &pmaxw, &pmaxh,
- &palign);
-
- rminw = MAX(ominw, pminw);
- rminh = MAX(ominh, pminh);
-
- if (omaxw != -1 && pmaxw == -1)
- rmaxw = omaxw;
- else if (omaxw == -1 && pmaxw != -1)
- rmaxw = pmaxw;
- else
- rmaxw = MIN(omaxw, pmaxw);
-
- if (omaxh != -1 && pmaxh == -1)
- rmaxh = omaxh;
- else if (omaxh == -1 && pmaxh != -1)
- rmaxh = pmaxh;
- else
- rmaxh = MIN(omaxh, pmaxh);
-
- if (oalign != -1 && palign == -1)
- ralign = oalign;
- else if (oalign == -1 && palign != -1)
- ralign = palign;
- else if (oalign == -1 && palign == -1)
- ralign = palign;
- else if (oalign > 0 && palign > 0)
- ralign = lcm(oalign, palign);
- else
- {
- // ERR("invalid align: %d, %d", video->output_align, video->pp_align);
- return EINA_FALSE;
- }
-
- /*
- VIN("align width: output(%d) pp(%d) video(%d)",
- video->output_align, video->pp_align, video->video_align);
- */
- }
-
-end:
- if (minw) *minw = rminw;
- if (minh) *minh = rminh;
- if (maxw) *maxw = rmaxw;
- if (maxw) *maxh = rmaxh;
- if (align) *align = ralign;
+ if (!e_output_available_size_get(output, minw, minh, maxw, maxh, align))
+ return EINA_FALSE;
return EINA_TRUE;
}
#include "e_hints_intern.h"
#include "e_comp_input_intern.h"
#include "e_alpha_mask_rect_intern.h"
+#include "e_display_intern.h"
#include <tbm_bufmgr.h>
#include <tbm_surface.h>
{
E_Output *primary_output;
- primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ E_Comp_Screen *e_comp_screen;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, EINA_FALSE);
+
+ e_comp_screen = e_comp->e_comp_screen;
+ primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+#endif
if (!primary_output)
return 0;
static void _e_info_server_cb_wins_dump_hwc_wins(const char *dir)
{
- E_Comp_Screen *e_comp_screen = NULL;
E_Output *output = NULL;
E_Hwc_Window *hwc_window = NULL;
E_Hwc *hwc = NULL;
Eina_List *o = NULL, *oo = NULL;
Eina_List *l = NULL, *ll = NULL;
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH_SAFE(e_display_outputs_get(), o, oo, output)
+#else
+ E_Comp_Screen *e_comp_screen = NULL;
e_comp_screen = e_comp->e_comp_screen;
if (!e_comp_screen) return;
-
EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, o, oo, output)
+#endif
{
if (!output) continue;
if (!output->config.enabled) continue;
EINA_SAFETY_ON_TRUE_RETURN(output_idx > e_comp_screen->num_outputs);
+#ifdef E_DISPLAY
+ output = eina_list_nth(e_display_outputs_get(), output_idx);
+#else
output = eina_list_nth(e_comp_screen->outputs, output_idx);
+#endif
EINA_SAFETY_ON_NULL_RETURN(output);
mode_list = e_output_mode_list_get(output);
}
if (onoff == 2)
+#ifdef E_DISPLAY
+ e_display_hwc_info_debug();
+#else
e_comp_screen_hwc_info_debug();
+#endif
return reply;
}
switch (info)
{
case 0:
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
+#endif
e_hwc_deactive_set(output->hwc, EINA_TRUE);
break;
case 1:
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
+#endif
e_hwc_deactive_set(output->hwc, EINA_FALSE);
break;
default:
case 2:
- e_comp_screen_hwc_info_debug();
- break;
+#ifdef E_DISPLAY
+ e_display_hwc_info_debug();
+#else
+ e_comp_screen_hwc_info_debug();
+#endif
+ break;
}
return reply;
e_info_server_cb_show_plane_state(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
{
Eina_List *output_l, *plane_l;
- E_Comp_Screen *e_comp_screen = NULL;
E_Output *output = NULL;
E_Plane *plane = NULL;
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), output_l, output)
+#else
+ E_Comp_Screen *e_comp_screen = NULL;
e_comp_screen = e_comp->e_comp_screen;
-
EINA_LIST_FOREACH(e_comp_screen->outputs, output_l, output)
+#endif
{
if (!output) continue;
{
Eina_List *output_l, *plane_l, *data_l;
Eldbus_Message_Iter *array_of_pending_commit;
- E_Comp_Screen *e_comp_screen = NULL;
E_Output *output = NULL;
E_Plane *plane = NULL;
E_Plane_Commit_Data *data = NULL;
eldbus_message_iter_arguments_append(iter, "a("VALUE_TYPE_FOR_PENDING_COMMIT")", &array_of_pending_commit);
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), output_l, output)
+#else
+ E_Comp_Screen *e_comp_screen = NULL;
e_comp_screen = e_comp->e_comp_screen;
-
EINA_LIST_FOREACH(e_comp_screen->outputs, output_l, output)
+#endif
{
if (!output) continue;
{
Eina_List *output_l, *plane_l, *hwc_l;
Eldbus_Message_Iter *array_of_fps;
- E_Comp_Screen *e_comp_screen = NULL;
E_Hwc_Window *hwc_window = NULL;
E_Output *output = NULL;
E_Plane *plane = NULL;
eldbus_message_iter_arguments_append(iter, "a("VALUE_TYPE_FOR_FPS")", &array_of_fps);
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), output_l, output)
+#else
+ E_Comp_Screen *e_comp_screen = NULL;
e_comp_screen = e_comp->e_comp_screen;
-
EINA_LIST_FOREACH(e_comp_screen->outputs, output_l, output)
+#endif
{
if (!output) continue;
}
reply = eldbus_message_method_return_new(msg);
+#ifdef E_DISPLAY
+ e_display_debug_info_get(eldbus_message_iter_get(reply));
+#else
e_comp_screen_debug_info_get(eldbus_message_iter_get(reply));
-
+#endif
return reply;
}
static void
_e_info_input_set_touch(struct uinput_user_dev *uinput_dev, int uinput_fd)
{
- E_Output *output;
+ E_Output *primary_output;
int w = 0, h = 0;
int max_mt_slot = 9;//set touch max count 10 by default
- output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- e_output_size_get(output, &w, &h);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ E_Comp_Screen *e_comp_screen;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, EINA_FALSE);
+
+ e_comp_screen = e_comp->e_comp_screen;
+ primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+#endif
+
+ e_output_size_get(primary_output, &w, &h);
if ((w <= 0) || (h <= 0))
WRN("Failed to get output size for creating touch device in e_info. So set arbitrary output size [%d x %d]\n", w, h);
#include "e_comp_intern.h"
#include "e_error_intern.h"
#include "e_hwc_window_queue_intern.h"
+#include "e_display_intern.h"
#include <Evas_GL.h>
#include <gbm.h>
{
E_Hwc *hwc = (E_Hwc *)data;
E_Output *output = hwc->output;
- E_Comp_Screen *e_comp_screen = output->e_comp_screen;
+ E_Comp_Screen *e_comp_screen = e_comp->e_comp_screen;
tbm_surface_queue_h tqueue = NULL;
tdm_error error;
int queue_w, queue_h;
if (output->tdm_hwc)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
-
+#ifdef E_DISPLAY
+ gdevice = e_display_gbm_device_get();
+#else
gdevice = e_comp_screen_gbm_device_get(e_comp->e_comp_screen);
+#endif
EINA_SAFETY_ON_NULL_RETURN_VAL(gdevice, NULL);
gsurface = gbm_surface_create(gdevice, w, h,
int gbm_formats[2] = {GBM_FORMAT_ABGR8888, GBM_FORMAT_ARGB8888};
int i, format_count;
+#ifdef E_DISPLAY
+ gdevice = e_display_gbm_device_get();
+#else
gdevice = e_comp_screen_gbm_device_get(e_comp->e_comp_screen);
+#endif
if (!gdevice) return NULL;
format_count = sizeof(gbm_formats) / sizeof(int);
E_Output *primary_output = NULL;
E_Hwc *hwc = NULL;
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
if (!primary_output) return;
hwc = primary_output->hwc;
if (e_comp->hwc_prefer_gbm)
return EINA_TRUE;
+#ifdef E_DISPLAY
+ gdevice = e_display_gbm_device_get();
+#else
gdevice = e_comp_screen_gbm_device_get(e_comp->e_comp_screen);
+#endif
if (!gdevice) return EINA_FALSE;
backend_name = gbm_device_get_backend_name(gdevice);
int screen_rotation;
char buf[1024];
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
hwc = primary_output->hwc;
EHINF("ecore evase engine init.", hwc);
// TODO: fix me. change the screen_rotation into output_rotation.
- screen_rotation = primary_output->e_comp_screen->rotation;
+ screen_rotation = e_comp->e_comp_screen->rotation;
/* set env for use tbm_surface_queue*/
setenv("USE_EVAS_SOFTWARE_TBM_ENGINE", "1", 1);
#include "services/e_service_quickpanel_intern.h"
#include "e_policy_private_data.h"
#include "e_policy_intern.h"
+#include "e_display_intern.h"
# include <Evas_Engine_GL_Tbm.h>
# include <Evas_Engine_Software_Tbm.h>
}
else
{
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, NULL);
primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output->hwc, NULL);
e_comp_wl_tizen_hwc_feedback_list_enqueue(&comp_info->feedback_list);
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
+#endif
{
if (!output->hwc) continue;
EINA_SAFETY_ON_NULL_RETURN_VAL(root_target_hwc_window, EINA_FALSE);
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
+#endif
{
if (!output->hwc) continue;
EINA_SAFETY_ON_NULL_RETURN_VAL(root_target_hwc_window, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(comp_info, EINA_FALSE);
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
+#endif
{
if (!output->hwc) continue;
E_Hwc_Window_State state;
E_Hwc_Window_State root_state = E_HWC_WINDOW_STATE_NONE;
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
EINA_SAFETY_ON_NULL_RETURN(e_comp);
EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
-
EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
+#endif
{
if (!e_output_connected(output)) continue;
if (!output->hwc) continue;
(hwc->pp_dst_rect.w == dst_rect->w) && (hwc->pp_dst_rect.h == dst_rect->h))
return EINA_TRUE;
+#ifdef E_DISPLAY
+ if (e_display_pp_support())
+#else
if (e_comp_screen_pp_support())
+#endif
{
if (!hwc->tpp)
{
e_output_size_get(hwc->output, &w, &h);
+#ifdef E_DISPLAY
+ if (e_display_pp_support())
+#else
if (e_comp_screen_pp_support())
+#endif
_e_hwc_windows_pp_aligned_value_get(hwc, &w, &h);
//TODO: Does e20 get the buffer flags from the tdm backend?
{
Eldbus_Message_Iter *line_array;
E_Hwc_Window *hwc_window;
- E_Comp_Screen *e_comp_screen;
E_Output *output;
E_Hwc *hwc;
Eina_List *l, *l2, *l3;
E_Hwc_Window_Update_Data *update;
int pending_idx;
- e_comp_screen = e_comp->e_comp_screen;
eldbus_message_iter_arguments_append(iter, "as", &line_array);
- if (!e_comp_screen)
- {
- eldbus_message_iter_basic_append(line_array,
- 's',
- "e_comp_screen not initialized..");
- eldbus_message_iter_container_close(iter, line_array);
- return;
- }
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
+ E_Comp_Screen *e_comp_screen;
+ e_comp_screen = e_comp->e_comp_screen;
EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
+#endif
{
if (!output) continue;
if (!output->config.enabled) continue;
_e_hwc_windows_window_debug_commit_info_get(Eldbus_Message_Iter *iter, E_Hwc_Wins_Debug_Cmd cmd)
{
Eldbus_Message_Iter *line_array;
- E_Comp_Screen *e_comp_screen;
E_Output *output;
E_Hwc *hwc;
Eina_List *l, *l2;
E_Hwc_Windows_Commit_Data *wins_commit_data;
E_Hwc_Window_Commit_Data *commit_data;
- e_comp_screen = e_comp->e_comp_screen;
eldbus_message_iter_arguments_append(iter, "as", &line_array);
- if (!e_comp_screen)
- {
- eldbus_message_iter_basic_append(line_array,
- 's',
- "e_comp_screen not initialized..");
- eldbus_message_iter_container_close(iter, line_array);
- return;
- }
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
+ E_Comp_Screen *e_comp_screen;
+ e_comp_screen = e_comp->e_comp_screen;
EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
+#endif
{
if (!output) continue;
if (!output->config.enabled) continue;
#include "e_comp_wl_video_buffer_intern.h"
#include "e_zone_intern.h"
#include "e_video_debug_intern.h"
+#include "e_display_intern.h"
#include <device/board-internal.h>
static void _e_output_vblank_handler(tdm_output *output, unsigned int sequence,
unsigned int tv_sec, unsigned int tv_usec, void *data);
+static int
+gcd(int a, int b)
+{
+ if (a % b == 0)
+ return b;
+ return gcd(b, a % b);
+}
+
+static int
+lcm(int a, int b)
+{
+ return a * b / gcd(a, b);
+}
+
static inline void
_e_output_display_mode_set(E_Output *output, E_Output_Display_Mode display_mode)
{
EINA_LIST_FOREACH(e_input_devices_get(), l, dev)
{
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
if (primary_output != NULL)
break;
}
}
static void
-_e_output_primary_update(E_Output *output)
+_e_primary_output_update(E_Output *output)
{
Eina_Bool ret;
char bootmode[32];
static Eina_Bool
_e_output_external_update(E_Output *output)
{
- E_Comp_Screen *e_comp_screen = NULL;
E_Output_Mode *mode = NULL;
- E_Output *output_pri = NULL;
+ E_Output *primary_output = NULL;
Eina_Bool ret;
EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ E_Comp_Screen *e_comp_screen = NULL;
+
e_comp_screen = e_comp->e_comp_screen;
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
- output_pri = e_comp_screen_primary_output_get(e_comp_screen);
- if (!output_pri)
+ primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
+ if (!primary_output)
{
e_error_message_show(_("Fail to get the primary output!\n"));
return EINA_FALSE;
}
- if (output_pri == output)
+ if (primary_output == output)
return EINA_FALSE;
void *user_data)
{
E_Output *output = NULL;
- E_Output *primary = NULL;
+ E_Output *primary_output = NULL;
E_OUTPUT_DPMS edpms;
tdm_output_dpms tdpms;
tdm_output_conn_status status;
output = (E_Output *)user_data;
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
+ EINA_SAFETY_ON_NULL_RETURN(primary_output);
+
switch (type)
{
case TDM_OUTPUT_CHANGE_CONNECTION:
if (status == TDM_OUTPUT_CONN_STATUS_DISCONNECTED ||
status == TDM_OUTPUT_CONN_STATUS_CONNECTED)
{
- primary = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- EINA_SAFETY_ON_NULL_RETURN(primary);
- if (primary == output)
- _e_output_primary_update(output);
+ if (primary_output == output)
+ _e_primary_output_update(output);
else
_e_output_external_update(output);
}
break;
case TDM_OUTPUT_CHANGE_DPMS:
tdpms = (tdm_output_dpms)value.u32;
- primary = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- EINA_SAFETY_ON_NULL_RETURN(primary);
if (tdpms == TDM_OUTPUT_DPMS_OFF)
{
edpms = E_OUTPUT_DPMS_OFF;
- if (!override && (output == primary))
+ if (!override && (output == primary_output))
{
e_comp_override_add();
override = EINA_TRUE;
else if (tdpms == TDM_OUTPUT_DPMS_ON)
{
edpms = E_OUTPUT_DPMS_ON;
- if (override && (output == primary))
+ if (override && (output == primary_output))
{
e_comp_override_del();
override = EINA_FALSE;
return EINA_FALSE;
}
+#ifdef E_DISPLAY
+EINTERN E_Output *
+e_output_new1(int index)
+#else
EINTERN E_Output *
e_output_new(E_Comp_Screen *e_comp_screen, int index)
+#endif
{
E_Output *output = NULL;
tdm_output *toutput = NULL;
int min_w, min_h, max_w, max_h, preferred_align;
tdm_output_capability output_caps = 0;
+#ifdef E_DISPLAY
+#else
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
+#endif
output = E_NEW(E_Output, 1);
EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
output->index = index;
+#ifdef E_DISPLAY
+ toutput = tdm_display_get_output(e_display_tdm_display_get(), index, NULL);
+#else
toutput = tdm_display_get_output(e_comp_screen->tdisplay, index, NULL);
+#endif
if (!toutput) goto fail;
output->toutput = toutput;
output->id = id;
EOINF("(%d) output_id = %s", output, index, output->id);
- output->e_comp_screen = e_comp_screen;
-
_e_output_tdm_stream_capture_support(output);
error = tdm_output_get_capabilities(toutput, &output_caps);
return EINA_TRUE;
}
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
if (output == primary_output) is_primary_output = EINA_TRUE;
hwc = e_hwc_new(output, is_primary_output);
tdm_error error;
Eina_List *l;
E_Zone *zone;
- E_Output *output_primary = NULL;
+ E_Output *primary_output = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
- output_primary = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- if (output_primary == output)
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
+ if (primary_output == output)
{
/* FIXME: The zone controlling should be moved to e_zone */
EINA_LIST_FOREACH(e_comp->zones, l, zone)
return output->dpms_async;
}
+EINTERN void
+e_output_position_set(E_Output *output, int x, int y)
+{
+ EINA_SAFETY_ON_NULL_RETURN(output);
+
+ output->config.geom.x = x;
+ output->config.geom.y = y;
+}
+
+EINTERN void
+e_output_position_get(E_Output *output, int *x, int *y)
+{
+ EINA_SAFETY_ON_NULL_RETURN(output);
+
+ *x = output->config.geom.x;
+ *y = output->config.geom.y;
+}
+
E_API void
e_output_size_get(E_Output *output, int *w, int *h)
{
return EINA_TRUE;
}
-
EINTERN Eina_Bool
e_output_render(E_Output *output)
{
else
{
/* render the only primary output */
- if (output != e_comp_screen_primary_output_get(output->e_comp_screen))
+#ifdef E_DISPLAY
+ if (output != e_display_primary_output_get())
return EINA_TRUE;
-
+#else
+ if (output != e_comp_screen_primary_output_get(e_comp->e_comp_screen))
+ return EINA_TRUE;
+#endif
if (!e_hwc_windows_render(output->hwc))
{
EOERR("fail to e_hwc_windows_render.", output);
EINTERN Eina_Bool
e_output_commit(E_Output *output)
{
- E_Output *output_primary = NULL;
+ E_Output *primary_output = NULL;
E_Output_Display_Mode display_mode;
EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
return EINA_FALSE;
}
- output_primary = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- EINA_SAFETY_ON_NULL_RETURN_VAL(output_primary, EINA_FALSE);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
+ EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
if (e_hwc_policy_get(output->hwc) == E_HWC_POLICY_PLANES)
{
e_hwc_planes_apply(output->hwc);
- if (output == output_primary)
+ if (output == primary_output)
{
if (!_e_output_planes_commit(output))
{
}
else
{
- if (output == output_primary)
+ if (output == primary_output)
{
if (output->zoom_set)
e_output_zoom_rotating_check(output);
e_output_find(const char *id)
{
E_Output *output;
- E_Comp_Screen *e_comp_screen;
Eina_List *l;
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(id, NULL);
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
+ E_Comp_Screen *e_comp_screen;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, NULL);
e_comp_screen = e_comp->e_comp_screen;
-
EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
+#endif
{
if (!strcmp(output->id, id)) return output;
}
{
Eina_List *l, *ll, *p_l;
E_Output * output = NULL;
- E_Comp_Screen *e_comp_screen = NULL;
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH_SAFE(e_display_outputs_get(), l, ll, output)
+#else
+ E_Comp_Screen *e_comp_screen = NULL;
EINA_SAFETY_ON_NULL_RETURN(e_comp);
EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
-
e_comp_screen = e_comp->e_comp_screen;
-
EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, l, ll, output)
+#endif
{
E_Plane *plane;
E_Client *ec;
e_output_find_by_index(int index)
{
E_Output *output;
- E_Comp_Screen *e_comp_screen;
Eina_List *l;
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
+ E_Comp_Screen *e_comp_screen;
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, NULL);
-
e_comp_screen = e_comp->e_comp_screen;
-
EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
+#endif
{
if (output->index == index)
return output;
E_Plane *ep = NULL;
int w, h;
int angle = 0;
- E_Output *output_primary = NULL;
+ E_Output *primary_output = NULL;
+#ifdef E_DISPLAY
+ if (!e_display_pp_support())
+#else
if (!e_comp_screen_pp_support())
+#endif
{
EOINF("Comp Screen does not support the Zoom.", output);
return EINA_FALSE;
if (cx < 0 || cy < 0) return EINA_FALSE;
if (zoomx <= 0 || zoomy <= 0) return EINA_FALSE;
- output_primary = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- EINA_SAFETY_ON_NULL_RETURN_VAL(output_primary, EINA_FALSE);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
+ EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
- if (output != output_primary)
+ if (output != primary_output)
{
EOERR("Only Primary Output can support the Zoom.", output);
return EINA_FALSE;
EINTERN Eina_Bool
e_output_zoom_get(E_Output *output, double *zoomx, double *zoomy, int *cx, int *cy)
{
- E_Output *output_primary = NULL;
+ E_Output *primary_output = NULL;
+#ifdef E_DISPLAY
+ if (!e_display_pp_support())
+#else
if (!e_comp_screen_pp_support())
+#endif
{
EOINF("Comp Screen does not support the Zoom.", output);
return EINA_FALSE;
EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
- output_primary = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- EINA_SAFETY_ON_NULL_RETURN_VAL(output_primary, EINA_FALSE);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
+ EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
- if (output != output_primary)
+ if (output != primary_output)
{
EOERR("Only Primary Output can support the Zoom.", output);
return EINA_FALSE;
E_Output_Mode *emode = NULL, *current_emode = NULL;
Eina_List *l;
Eina_Bool found = EINA_FALSE;
- E_Output *output_primary = NULL;
+ E_Output *primary_output = NULL;
E_Plane *ep = NULL;
int w, h, p_w, p_h;
}
EINA_SAFETY_ON_FALSE_RETURN_VAL(found == EINA_TRUE, EINA_FALSE);
- output_primary = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- EINA_SAFETY_ON_NULL_RETURN_VAL(output_primary, EINA_FALSE);
- EINA_SAFETY_ON_TRUE_RETURN_VAL(output_primary == output, EINA_FALSE);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
+ EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
+ EINA_SAFETY_ON_TRUE_RETURN_VAL(primary_output == output, EINA_FALSE);
e_output_size_get(output, &w, &h);
- e_output_size_get(output_primary, &p_w, &p_h);
+ e_output_size_get(primary_output, &p_w, &p_h);
if (e_output_mode_apply(output, mode) == EINA_FALSE)
{
return EINA_FALSE;
}
- _e_output_external_rect_get(output_primary, p_w, p_h, w, h, &output->zoom_conf.rect);
+ _e_output_external_rect_get(primary_output, p_w, p_h, w, h, &output->zoom_conf.rect);
EOINF("mode change output: (%dx%d)", output, w, h);
/* TODO: HWC Windows */;
}
- _e_output_render_update(output_primary);
+ _e_output_render_update(primary_output);
EOINF("e_output_external_reset done.(%dx%d)", output, mode->w, mode->h);
{
if (output->presentation_ec)
{
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
EINA_SAFETY_ON_NULL_GOTO(primary_output, done);
zone = e_comp_zone_find(e_output_output_id_get(primary_output));
return output->hwc;
}
+
+EINTERN Eina_Bool
+e_output_available_size_get(E_Output *output, int *minw, int *minh, int *maxw, int *maxh, int *align)
+{
+ int ominw = -1, ominh = -1, omaxw = -1, omaxh = -1, oalign = -1;
+ int pminw = -1, pminh = -1, pmaxw = -1, pmaxh = -1, palign = -1;
+ int rminw = -1, rminh = -1, rmaxw = -1, rmaxh = -1, ralign = -1;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
+
+ tdm_output_get_available_size(output, &ominw, &ominh, &omaxw, &omaxh, &oalign);
+
+#ifdef E_DISPLAY
+ if (!e_display_pp_support())
+#else
+ if (!e_comp_screen_pp_support())
+#endif
+ {
+ rminw = ominw;
+ rminh = ominh;
+ rmaxw = omaxw;
+ rmaxh = omaxh;
+ ralign = oalign;
+
+ goto end;
+ }
+ else
+ {
+#ifdef E_DISPLAY
+ e_display_pp_available_size_get(&pminw, &pminh, &pmaxw, &pmaxh, &palign);
+#else
+ tdm_display_get_pp_available_size(e_comp->e_comp_screen->tdisplay,
+ &pminw, &pminh, &pmaxw, &pmaxh,
+ &palign);
+#endif
+ rminw = MAX(ominw, pminw);
+ rminh = MAX(ominh, pminh);
+
+ if (omaxw != -1 && pmaxw == -1)
+ rmaxw = omaxw;
+ else if (omaxw == -1 && pmaxw != -1)
+ rmaxw = pmaxw;
+ else
+ rmaxw = MIN(omaxw, pmaxw);
+
+ if (omaxh != -1 && pmaxh == -1)
+ rmaxh = omaxh;
+ else if (omaxh == -1 && pmaxh != -1)
+ rmaxh = pmaxh;
+ else
+ rmaxh = MIN(omaxh, pmaxh);
+
+ if (oalign != -1 && palign == -1)
+ ralign = oalign;
+ else if (oalign == -1 && palign != -1)
+ ralign = palign;
+ else if (oalign == -1 && palign == -1)
+ ralign = palign;
+ else if (oalign > 0 && palign > 0)
+ ralign = lcm(oalign, palign);
+ else
+ {
+ // ERR("invalid align: %d, %d", video->output_align, video->pp_align);
+ return EINA_FALSE;
+ }
+
+ /*
+ VIN("align width: output(%d) pp(%d) video(%d)",
+ video->output_align, video->pp_align, video->video_align);
+ */
+ }
+
+end:
+ if (minw) *minw = rminw;
+ if (minh) *minh = rminh;
+ if (maxw) *maxw = rmaxw;
+ if (maxw) *maxh = rmaxh;
+ if (align) *align = ralign;
+
+ return EINA_TRUE;
+}
#include "e_intern.h"
#include "e_output.h"
+#include "e_display_intern.h"
#include <tbm_surface.h>
EINTERN Eina_Bool e_output_init(void);
EINTERN void e_output_shutdown(void);
+//#ifdef E_DISPLAY
+EINTERN E_Output * e_output_new1(int index);
+//#else
EINTERN E_Output * e_output_new(E_Comp_Screen *e_comp_screen, int index);
+//#endif
EINTERN void e_output_del(E_Output *output);
EINTERN Eina_Bool e_output_rotate(E_Output *output, int rotate);
EINTERN Eina_Bool e_output_update(E_Output *output);
EINTERN Eina_Bool e_output_dpms_async_check(E_Output *output);
EINTERN void e_output_phys_size_get(E_Output *output, int *phys_w, int *phys_h);
EINTERN E_Plane * e_output_default_fb_target_get(E_Output *output);
-EINTERN Eina_Bool e_output_fake_config_set(E_Output *output, int w, int h);
+EINTERN Eina_Bool e_output_fake_config_set(E_Output *output, int x, int y);
+EINTERN void e_output_position_get(E_Output *output, int *x, int *y);
+EINTERN void e_output_position_set(E_Output *output, int x, int y);
+EINTERN Eina_Bool e_output_available_size_get(E_Output *output, int *minw, int *minh, int *maxw, int *maxh, int *align);
+
EINTERN Eina_Bool e_output_zoom_set(E_Output *output, double zoomx, double zoomy, int cx, int cy);
EINTERN Eina_Bool e_output_zoom_get(E_Output *output, double *zoomx, double *zoomy, int *cx, int *cy);
EINTERN void e_output_zoom_unset(E_Output *output);
+
EINTERN Eina_Bool e_output_stream_capture_queue(E_Output *output, tbm_surface_h surface, E_Output_Capture_Cb func, void *data);
EINTERN Eina_Bool e_output_stream_capture_dequeue(E_Output *output, tbm_surface_h surface);
EINTERN Eina_Bool e_output_stream_capture_start(E_Output *output);
EINTERN void e_output_stream_capture_autorotate(E_Output *output, Eina_Bool auto_rotate);
EINTERN Eina_Bool e_output_external_mode_change(E_Output *output, E_Output_Mode *mode);
+
EINTERN Eina_Bool e_output_mirror_set(E_Output *output, E_Output *src_output);
EINTERN void e_output_mirror_unset(E_Output *output);
+
EINTERN Eina_Bool e_output_presentation_update(E_Output *output, E_Client *ec);
EINTERN void e_output_presentation_unset(E_Output *output);
EINTERN Eina_Bool e_output_presentation_ec_set(E_Output *output, E_Client *ec);
EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
- comp_screen = output->e_comp_screen;
+ comp_screen = e_comp->e_comp_screen;
EINA_SAFETY_ON_NULL_RETURN_VAL(comp_screen, NULL);
toutput = output->toutput;
+#include "e_comp_screen_intern.h"
#include "e_client_intern.h"
#include "e_utils_intern.h"
#include "e_scale_intern.h"
#include "e_comp_canvas_intern.h"
-#include "e_comp_screen_intern.h"
#include "e_comp_wl_input_intern.h"
#include "e_comp_wl_intern.h"
#include "e_explicit_sync_intern.h"
#include "e_comp_input_intern.h"
#include "e_screen_rotation_intern.h"
#include "e_server_intern.h"
+#include "e_display_intern.h"
#include <tizen-extension-server-protocol.h>
+#ifdef E_DISPLAY
+#else
#include <device/board-internal.h>
#include <tbm_drm_helper.h>
#include <gbm.h>
+#endif
#define PATH "/org/enlightenment/wm"
#define IFACE "org.enlightenment.wm.screen_rotation"
return;
}
+#ifdef E_DISPLAY
+#else
static char *
_layer_cap_to_str(tdm_layer_capability caps, tdm_layer_capability cap)
{
}
return "";
}
+#endif
static Eina_Bool
_e_comp_screen_commit_idle_cb(void *data EINA_UNUSED)
{
Eina_List *l, *ll;
- E_Comp_Screen *e_comp_screen = NULL;
E_Output *output = NULL;
- if (!e_comp->e_comp_screen) goto end;
-
if (e_config->comp_canvas_norender.use)
evas_norender(e_comp->evas);
if (e_comp->canvas_render_delayed) goto end;
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH_SAFE(e_display_outputs_get(), l, ll, output)
+#else
+ E_Comp_Screen *e_comp_screen = NULL;
e_comp_screen = e_comp->e_comp_screen;
-
EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, l, ll, output)
+#endif
{
if (!output) continue;
if (!output->config.enabled) continue;
if (!e_output_commit(output))
- ERR("fail to commit e_comp_screen->outputs.");
+ ERR("fail to commit output.");
if (!e_output_render(output))
- ERR("fail to render e_comp_screen->outputs.");
+ ERR("fail to render output.");
}
end:
return ECORE_CALLBACK_RENEW;
return ECORE_CALLBACK_PASS_ON;
}
-static Eina_Bool
-_e_comp_screen_size_update(E_Comp_Screen *e_comp_screen)
+EINTERN Eina_Bool
+e_comp_screen_size_update(E_Comp_Screen *e_comp_screen)
{
E_Output *output;
int sum_w = 0, max_h = 0, output_w, output_h;
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
/* we place external output to the right of primary output */
EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
+#endif
{
if (!e_output_connected(output)) continue;
return EINA_TRUE;
}
+#ifdef E_DISPLAY
+#else
static Eina_Bool
_e_comp_screen_cb_event(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED)
{
return ECORE_CALLBACK_RENEW;
}
+#endif
static E_Comp_Screen *
_e_comp_screen_new(E_Comp *comp)
{
E_Comp_Screen *e_comp_screen = NULL;
+ int screen_rotation;
+
+#ifdef E_DISPLAY
+#else
tdm_error error = TDM_ERROR_NONE;
tdm_display_capability capabilities;
const tbm_format *pp_formats;
int count, i;
int fd;
+#endif
e_comp_screen = E_NEW(E_Comp_Screen, 1);
if (!e_comp_screen) return NULL;
+ e_comp->e_comp_screen = e_comp_screen;
+
+ /* check the screen rotation */
+ screen_rotation = (e_config->screen_rotation_pre + e_config->screen_rotation_setting) % 360;
+
+ ELOGF("COMP_SCREEN","screen_rotation_pre %d and screen_rotation_setting %d",
+ NULL, e_config->screen_rotation_pre, e_config->screen_rotation_setting);
+
+ e_comp_screen->rotation_pre = e_config->screen_rotation_pre;
+ e_comp_screen->rotation_setting = e_config->screen_rotation_setting;
+ e_comp_screen->rotation = screen_rotation;
+
+#ifdef E_DISPLAY
+ e_main_ts_begin("\te_display_init");
+
+ if (!e_display_init())
+ {
+ e_main_ts_end("\te_display_init() failed.");
+ ERR("e_display_init failed");
+ free(e_comp_screen);
+ return NULL;
+ }
+
+ e_main_ts_end("\te_display_init Done");
+
+ e_comp_screen->num_outputs = e_display_num_outputs_get();
+ e_comp_screen->outputs = e_display_outputs_get();
+#else
/* tdm display init */
e_main_ts_begin("\tTDM Display Init");
+
e_comp_screen->tdisplay = tdm_display_init(&error);
if (!e_comp_screen->tdisplay)
{
free(e_comp_screen);
return NULL;
}
+
e_main_ts_end("\tTDM Display Init Done");
e_comp_screen->gdevice_fd = -1;
e_comp_screen->hdlr =
ecore_main_fd_handler_add(e_comp_screen->fd, ECORE_FD_READ,
_e_comp_screen_cb_event, e_comp_screen, NULL, NULL);
- /* tdm display init */
+#endif
+
+ /* tbm bufmgr init */
e_main_ts_begin("\tTBM Bufmgr Server Init");
e_comp_screen->bufmgr = tbm_bufmgr_server_init();
if (!e_comp_screen->bufmgr)
}
e_main_ts_end("\tTBM Bufmgr Server Init Done");
+#ifdef E_DISPLAY
+#else
error = tdm_display_get_capabilities(e_comp_screen->tdisplay, &capabilities);
if (error != TDM_ERROR_NONE)
{
if (e_comp_socket_init("tdm-socket"))
PRCTL("[Winsys] change permission and create sym link for %s", "tdm-socket");
e_main_ts_end("\ttdm-socket Init Done");
+#endif
return e_comp_screen;
fail:
if (e_comp_screen->bufmgr) tbm_bufmgr_deinit(e_comp_screen->bufmgr);
+#ifdef E_DISPLAY
+#else
if (e_comp_screen->fd >= 0) close(e_comp_screen->fd);
if (e_comp_screen->hdlr) ecore_main_fd_handler_del(e_comp_screen->hdlr);
if (e_comp_screen->tdisplay) tdm_display_deinit(e_comp_screen->tdisplay);
+#endif
free(e_comp_screen);
TRACE_DS_END();
static void
_e_comp_screen_del(E_Comp_Screen *e_comp_screen)
{
+#ifdef E_DISPLAY
+#else
Eina_List *l = NULL, *ll = NULL;
tbm_format *formats;
if (e_comp_screen->gdevice) gbm_device_destroy(e_comp_screen->gdevice);
if (e_comp_screen->gdevice_fd >= 0) close(e_comp_screen->gdevice_fd);
+#endif
+
if (e_comp_screen->bufmgr) tbm_bufmgr_deinit(e_comp_screen->bufmgr);
+
+#ifdef E_DISPLAY
+#else
if (e_comp_screen->fd >= 0) close(e_comp_screen->fd);
if (e_comp_screen->hdlr) ecore_main_fd_handler_del(e_comp_screen->hdlr);
if (e_comp_screen->tdisplay) tdm_display_deinit(e_comp_screen->tdisplay);
+#endif
free(e_comp_screen);
}
+#ifdef E_DISPLAY
+#else
static void
_e_comp_screen_output_mode_change_cb(tdm_output *toutput, unsigned int index, void *user_data)
{
goto fail;
}
- _e_comp_screen_size_update(e_comp_screen);
+ e_comp_screen_size_update(e_comp_screen);
e_main_ts_begin("\tE_Hwc Ecore_Evas Init");
if (!e_hwc_ecore_evas_init())
return EINA_FALSE;
}
+#endif
static void
_e_comp_screen_e_screen_free(E_Screen *scr)
if (!e_comp) return;
if (!e_comp->e_comp_screen) return;
+#ifdef E_DISPLAY
+#else
_e_comp_screen_deinit_outputs(e_comp->e_comp_screen);
+#endif
_e_comp_screen_del(e_comp->e_comp_screen);
e_comp->e_comp_screen = NULL;
}
_e_comp_screen_engine_init(void)
{
E_Comp_Screen *e_comp_screen = NULL;
- int screen_rotation;
-
- /* check the screen rotation */
- screen_rotation = (e_config->screen_rotation_pre + e_config->screen_rotation_setting) % 360;
-
- ELOGF("COMP_SCREEN","screen_rotation_pre %d and screen_rotation_setting %d",
- NULL, e_config->screen_rotation_pre, e_config->screen_rotation_setting);
/* e_comp_screen new */
e_main_ts_begin("\tE_Comp_Screen New");
}
e_main_ts_end("\tE_Comp_Screen New Done");
- e_comp->e_comp_screen = e_comp_screen;
- e_comp_screen->rotation_pre = e_config->screen_rotation_pre;
- e_comp_screen->rotation_setting = e_config->screen_rotation_setting;
- e_comp_screen->rotation = screen_rotation;
-
+#ifdef E_DISPLAY
+#else
e_main_ts_begin("\tE_Comp_Screen Outputs Init");
if (!_e_comp_screen_init_outputs(e_comp_screen))
{
return EINA_FALSE;
}
e_main_ts_end("\tE_Comp_Screen Outputs Init Done");
-
+#endif
if (!E_EVENT_SCREEN_CHANGE) E_EVENT_SCREEN_CHANGE = ecore_event_type_new();
ecore_event_add(E_EVENT_SCREEN_CHANGE, NULL, NULL, NULL);
e_comp_screen_e_screens_setup(E_Comp_Screen *e_comp_screen, int rw, int rh)
{
E_Screen *screen;
- E_Output *output;
+ E_Output *primary_output, *output;
Eina_List *e_screens = NULL;
Eina_List *l;
int i = 0, right_x = 0;
+ int x, y, w, h;
- output = e_comp_screen_primary_output_get(e_comp_screen);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ primary_output = e_comp_screen_primary_output_get(e_comp_screen);
+#endif
/* No pirmary output means that there is no output at the system */
- if (!output) goto out;
+ if (!primary_output) goto out;
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
+#endif
{
screen = E_NEW(E_Screen, 1);
if (!screen) return;
screen->escreen = screen->screen = i;
+ e_output_position_get(output, &x, &y);
+ e_output_size_get(output, &w, &h);
if (output->config.rotation % 180)
{
- screen->w = output->config.geom.h;
- screen->h = output->config.geom.w;
+ screen->w = h;
+ screen->h = w;
}
else
{
- screen->w = output->config.geom.w;
- screen->h = output->config.geom.h;
+ screen->w = w;
+ screen->h = h;
}
if (e_output_connected(output))
{
- output->config.geom.x = right_x;
- right_x += output->config.geom.w;
+ e_output_position_set(output, right_x, y);
+ right_x += w;
}
else
{
- output->config.geom.x = 0;
+ e_output_position_set(output, 0, y);
}
- screen->x = output->config.geom.x;
- screen->y = output->config.geom.y;
+ screen->x = x;
+ screen->y = y;
if (output->id) screen->id = strdup(output->id);
static void
_e_comp_screen_cb_output_connect_status_change(void *data, E_Output *output)
{
- _e_comp_screen_size_update(e_comp->e_comp_screen);
+ e_comp_screen_size_update(e_comp->e_comp_screen);
}
static void
_e_comp_screen_cb_output_mode_change(void *data, E_Output *output)
{
- _e_comp_screen_size_update(e_comp->e_comp_screen);
+ e_comp_screen_size_update(e_comp->e_comp_screen);
}
EINTERN Eina_Bool
e_dbus_conn_shutdown();
+#ifdef E_DISPLAY
+#else
_e_comp_screen_deinit_outputs(e_comp->e_comp_screen);
+#endif
E_FREE_LIST(output_hooks, e_output_hook_del);
e_comp->e_comp_screen = NULL;
}
+#ifdef E_DISPLAY
+#else
static E_Output *
_e_comp_screen_output_find_primary(E_Comp_Screen *e_comp_screen)
{
return output;
}
+#endif
static Eina_Bool
_e_comp_screen_rotation_set(E_Comp_Screen *e_comp_screen, int screen_rotation,
void (*setter)(E_Comp_Screen *e_comp_screen, int data), int data)
{
- E_Output *output = NULL;
+ E_Output *primary_output = NULL;
E_Input_Device *dev;
const Eina_List *l;
int w, h;
- output = _e_comp_screen_output_find_primary(e_comp_screen);
- if (!output)
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+ if (!primary_output)
return EINA_FALSE;
+#else
+ primary_output = _e_comp_screen_output_find_primary(e_comp_screen);
+ if (!primary_output)
+ return EINA_FALSE;
+#endif
- if (!e_output_rotate(output, screen_rotation))
+ if (!e_output_rotate(primary_output, screen_rotation))
return EINA_FALSE;
e_comp_screen->rotation = screen_rotation;
e_screen_rotation_ignore_output_transform_send(ec, ignore);
}
+#ifdef E_DISPLAY
+#else
EINTERN E_Output *
e_comp_screen_primary_output_get(E_Comp_Screen *e_comp_screen)
{
return NULL;
}
+#endif
E_API Eina_Bool
e_comp_screen_available_video_formats_get(const tbm_format **formats, int *count)
{
+#ifdef E_DISPLAY
+ return e_display_available_video_formats_get(formats, count);
+#else
E_Output *output;
tdm_output *toutput;
tdm_layer *layer;
}
return EINA_TRUE;
+#endif
}
+#ifdef E_DISPLAY
+#else
EINTERN void *
e_comp_screen_gbm_device_get(E_Comp_Screen *e_comp_screen)
{
return e_comp_screen->gdevice;
}
+#endif
EINTERN Eina_Bool
e_comp_screen_size_get(E_Comp_Screen *e_comp_screen, int *w, int *h)
return EINA_TRUE;
}
+
+#ifdef E_DISPLAY
+#else
static char *
_e_comp_screen_dpms_to_string(E_OUTPUT_DPMS dpms)
{
e_comp_screen_debug_info_get(Eldbus_Message_Iter *iter)
{
Eldbus_Message_Iter *line_array;
- E_Comp_Screen *e_comp_screen = NULL;
E_Output *output = NULL;
E_Hwc *hwc = NULL;
Eina_List *l;
char info_str[1024];
- e_comp_screen = e_comp->e_comp_screen;
-
eldbus_message_iter_arguments_append(iter, "as", &line_array);
- if (!e_comp_screen)
- {
- eldbus_message_iter_basic_append(line_array,
- 's',
- "e_comp_screen not initialized..");
- eldbus_message_iter_container_close(iter, line_array);
- return;
- }
eldbus_message_iter_basic_append(line_array, 's',
"===========================================================================================");
eldbus_message_iter_basic_append(line_array, 's',
"===========================================================================================");
+
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
+ E_Comp_Screen *e_comp_screen = NULL;
+ e_comp_screen = e_comp->e_comp_screen;
EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
+#endif
{
if (!output) continue;
hwc = output->hwc;
eldbus_message_iter_container_close(iter, line_array);
}
+#endif
E_API Eina_List *
e_comp_screen_outputs_get(E_Comp_Screen *e_comp_screen)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
+#ifdef E_DISPLAY
+ return e_display_outputs_get();
+#else
return e_comp_screen->outputs;
+#endif
}
#include "e_comp_screen.h"
#include <Eldbus.h>
+//#ifdef E_DISPLAY
+//#else
#include <tdm.h>
+//#endif
typedef struct _E_Screen E_Screen;
EINTERN Eina_Bool e_comp_screen_init(void);
EINTERN void e_comp_screen_shutdown(void);
+//#ifdef E_DISPLAY
+//#else
EINTERN void e_comp_screen_hwc_info_debug(void);
-EINTERN void e_comp_screen_e_screens_setup(E_Comp_Screen *e_comp_screen, int rw, int rh);
-EINTERN const Eina_List *e_comp_screen_e_screens_get(E_Comp_Screen *e_comp_screen);
-EINTERN Eina_Bool e_comp_screen_rotation_pre_set(E_Comp_Screen *e_comp_screen, int rotation_pre);
EINTERN E_Output *e_comp_screen_primary_output_get(E_Comp_Screen *e_comp_screen);
EINTERN Eina_Bool e_comp_screen_pp_support(void);
EINTERN Eina_List *e_comp_screen_pp_available_formats_get(void);
EINTERN void *e_comp_screen_gbm_device_get(E_Comp_Screen *e_comp_screen);
-EINTERN Eina_Bool e_comp_screen_size_get(E_Comp_Screen *e_comp_screen, int *w, int *h);
EINTERN void e_comp_screen_debug_info_get(Eldbus_Message_Iter *iter);
+//#endif
+EINTERN void e_comp_screen_e_screens_setup(E_Comp_Screen *e_comp_screen, int rw, int rh);
+EINTERN const Eina_List *e_comp_screen_e_screens_get(E_Comp_Screen *e_comp_screen);
+EINTERN Eina_Bool e_comp_screen_rotation_pre_set(E_Comp_Screen *e_comp_screen, int rotation_pre);
+EINTERN Eina_Bool e_comp_screen_size_get(E_Comp_Screen *e_comp_screen, int *w, int *h);
+EINTERN Eina_Bool e_comp_screen_size_update(E_Comp_Screen *e_comp_screen);
#endif
#include "e_comp_screen_intern.h"
#include "e_output_intern.h"
#include "e_utils_intern.h"
+#include "e_display_intern.h"
#include <sys/types.h>
#include <sys/stat.h>
E_Input_Seat *seat = NULL;
E_Input_Evdev *edev = NULL;
Eina_List *l = NULL, *l2 = NULL;
+ E_Output *primary_output = NULL;
int temp;
EINA_SAFETY_ON_NULL_RETURN(dev);
EINA_SAFETY_ON_NULL_RETURN(dev->seats);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
+ EINA_SAFETY_ON_NULL_RETURN(primary_output);
+
EINA_LIST_FOREACH(dev->seats, l, seat)
{
EINA_LIST_FOREACH(e_input_seat_evdev_list_get(seat), l2, edev)
if (edev->caps & E_INPUT_SEAT_POINTER)
{
edev->mouse.minx = edev->mouse.miny = 0;
- e_output_size_get(e_comp_screen_primary_output_get(e_comp->e_comp_screen),
- &edev->mouse.maxw, &edev->mouse.maxh);
+ e_output_size_get(primary_output,
+ &edev->mouse.maxw, &edev->mouse.maxh);
if (rotation == 90 || rotation == 270)
{
float default_w = 0.0, default_h = 0.0;
Eina_Bool res = EINA_TRUE;
int output_w = 0, output_h = 0;
+ E_Output *primary_output = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(dev, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(dev->seats, EINA_FALSE);
- e_output_size_get(e_comp_screen_primary_output_get(e_comp->e_comp_screen), &output_w, &output_h);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
+ e_output_size_get(primary_output, &output_w, &output_h);
default_w = (float)output_w;
default_h = (float)output_h;
float default_w = 0.0, default_h = 0.0;
Eina_Bool res = EINA_TRUE;
int output_w = 0, output_h = 0;
+ E_Output *primary_output = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(dev, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(dev->seats, EINA_FALSE);
EINA_SAFETY_ON_TRUE_RETURN_VAL((w == 0) || (h == 0), EINA_FALSE);
- e_output_size_get(e_comp_screen_primary_output_get(e_comp->e_comp_screen), &output_w, &output_h);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
+ e_output_size_get(primary_output, &output_w, &output_h);
default_w = (float)output_w;
default_h = (float)output_h;
#include "e_comp_screen_intern.h"
#include "e_output_intern.h"
#include "e_utils_intern.h"
+#include "e_display_intern.h"
#include <glib.h>
#include <ctype.h>
void
e_input_evdev_device_calibration_set(E_Input_Evdev *edev)
{
- E_Output *output;
+ E_Output *primary_output;
int w = 0, h = 0;
int temp;
E_Comp_Config *comp_conf;
}
}
- output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
- e_output_size_get(output, &w, &h);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
+ e_output_size_get(primary_output, &w, &h);
- if (output)
+ if (primary_output)
{
edev->mouse.minx = edev->mouse.miny = 0;
edev->mouse.maxw = w;
edev->mouse.dx = edev->seat->ptr.dx;
edev->mouse.dy = edev->seat->ptr.dy;
- if (output->config.rotation == 90 || output->config.rotation == 270)
+ if (primary_output->config.rotation == 90 || primary_output->config.rotation == 270)
{
temp = edev->mouse.minx;
edev->mouse.minx = edev->mouse.miny;
{
E_Input_Evdev *edev;
int w = 0, h = 0;
+ E_Output *primary_output;
if (!(edev = libinput_device_get_user_data(device)))
{
return;
}
- e_output_size_get(e_comp_screen_primary_output_get(e_comp->e_comp_screen), &w, &h);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
+
+ e_output_size_get(primary_output, &w, &h);
edev->mouse.dx = edev->seat->ptr.dx =
libinput_event_pointer_get_absolute_x_transformed(event, w);
#include "e_comp_input_intern.h"
#include "e_blur_intern.h"
#include "e_input_thread_client_intern.h"
+#include "e_display_intern.h"
#include <tizen-extension-server-protocol.h>
#include <relative-pointer-unstable-v1-server-protocol.h>
{
Eina_List *l;
E_Output *eout;
- E_Comp_Screen *e_comp_screen;
unsigned int transform = WL_OUTPUT_TRANSFORM_NORMAL;
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, eout)
+#else
+ E_Comp_Screen *e_comp_screen;
+
if (!e_comp) return ECORE_CALLBACK_RENEW;
if (!e_comp->e_comp_screen) return ECORE_CALLBACK_RENEW;
e_comp_screen = e_comp->e_comp_screen;
EINA_LIST_FOREACH(e_comp_screen->outputs, l, eout)
+#endif
{
if (!eout->config.enabled)
{
#include "e_comp_screen_intern.h"
#include "e_comp_wl_subsurface_intern.h"
#include "e_output_intern.h"
+#include "e_display_intern.h"
#include <xdg-shell-unstable-v5-server-protocol.h>
#include <eom-server-protocol.h>
{
if (eom_trace_debug)
EOMINF("_e_eom_presentation_check wait expired set to mirror", NULL, eom_output->output);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
e_output_mirror_set(eom_output->output, primary_output);
eom_output->wait_presentation = EINA_FALSE;
}
if (e_output_presentation_ec_get(eom_output->output) == eom_client->ec)
e_output_presentation_unset(eom_output->output);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
if (!e_output_mirror_set(eom_output->output, primary_output))
{
EOMERR("e_output_mirror_set fail", eom_output->output);
_e_eom_output_attribute_set(eom_output, EOM_OUTPUT_ATTRIBUTE_NONE);
e_output_presentation_unset(eom_output->output);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
if (!e_output_mirror_set(eom_output->output, primary_output))
EOMERR("e_output_mirror_set fail", eom_output->output);
}
{
EOMINF("Start Mirroring", NULL, eom_output->output);
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
if (!e_output_mirror_set(eom_output->output, primary_output))
{
EOMERR("e_output_mirror_set fail", eom_output->output);
static Eina_Bool
_e_eom_output_init(void)
{
- E_Comp_Screen *e_comp_screen = NULL;
E_Output *output = NULL;
E_Output *primary_output = NULL;
E_EomOutputPtr eom_output;
Eina_List *l;
+#ifdef E_DISPLAY
+ primary_output = e_display_primary_output_get();
+#else
+ E_Comp_Screen *e_comp_screen = NULL;
+
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, EINA_FALSE);
e_comp_screen = e_comp->e_comp_screen;
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
primary_output = e_comp_screen_primary_output_get(e_comp->e_comp_screen);
+#endif
EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
+#ifdef E_DISPLAY
+ g_eom->eom_output_count = e_display_num_outputs_get() - 1;
+#else
g_eom->eom_output_count = e_comp_screen->num_outputs - 1;
+#endif
EOMINF("external output count : %d", NULL, NULL, g_eom->eom_output_count);
/* create the eom_output except for the primary output */
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
EINA_LIST_FOREACH(e_comp_screen->outputs, l, output)
+#endif
{
if (!output) continue;
if (output == primary_output) continue;
#include "e_comp_intern.h"
#include "e_egl_sync_intern.h"
#include "e_client_intern.h"
+#include "e_display_intern.h"
#include <linux-explicit-synchronization-unstable-v1-server-protocol.h>
#include <tizen-extension-server-protocol.h>
if (!e_comp_gl_get()) return EINA_FALSE;
if (!e_egl_sync_enabled_get()) return EINA_FALSE;
+#ifdef E_DISPLAY
+ EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
+#else
EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
+#endif
{
if (!output) continue;
if (!output->hwc) continue;
Eina_List *e_screens;
int num_outputs;
+//#ifdef E_DISPLAY
+//#else
tdm_display *tdisplay;
tbm_bufmgr bufmgr;
void *gdevice;
int gdevice_fd;
+//#endif
/* for sw compositing */
const Eina_List *devices;
int rotation_setting;
int rotation;
+//#ifdef E_DISPLAY
+//#else
/* pp support */
Eina_Bool pp_enabled;
Eina_List *available_pp_formats;
+//#endif
tbm_surface_queue_h tqueue;
+//#ifdef E_DISPLAY
+//#else
int fd;
Ecore_Fd_Handler *hdlr;
+//#endif
};
E_API Eina_Bool e_comp_screen_rotation_setting_set(E_Comp_Screen *e_comp_screen, int rotation);
tdm_output *toutput;
tdm_output_type toutput_type;
- E_Comp_Screen *e_comp_screen;
E_OUTPUT_DPMS dpms;
E_OUTPUT_DPMS set_dpms;
Eina_Bool dpms_async;