The functionalities for tdm_display move to e_display files.
Change-Id: I06060e9670ebbe96a6d90f3f946229bc3c93ad67
#include "e_utils_intern.h"
#include "e_comp_canvas_intern.h"
#include "e_comp_cfdata_intern.h"
-#ifdef E_DISPLAY
-#else
-#include "e_comp_screen_intern.h"
-#endif
#include "e_comp_wl_intern.h"
#include "e_client_intern.h"
#include "e_hwc_intern.h"
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);
-
- 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 = primary_output->hwc;
EINA_SAFETY_ON_NULL_RETURN(hwc);
{
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);
-
- 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(primary_output->hwc, set);
}
{
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);
-
- 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(primary_output->hwc);
{
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(e_comp);
- EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
-
- 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);
{
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);
-
- 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(primary_output->hwc);
E_Output *primary_output = NULL;
E_Hwc *hwc = NULL;
-#ifdef E_DISPLAY
primary_output = e_display_primary_output_get();
-#else
- E_Comp_Screen *e_comp_screen;
-
- 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;
- primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-#endif
EINA_SAFETY_ON_NULL_RETURN(primary_output);
hwc = primary_output->hwc;
{
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);
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);
{
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_display_intern.h"
#include "e_view_intern.h"
#include "e_view_client_intern.h"
-#ifdef E_DISPLAY
-#else
-#include "e_comp_screen_intern.h"
-#endif
#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>
-#define E_DISPLAY
-
#define CHECKING_PRIMARY_ZPOS
#ifdef ENABLE_TTRACE
{
E_Output *primary_output;
-#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;
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:
-#ifdef E_DISPLAY
e_display_hwc_info_debug();
-#else
- e_comp_screen_hwc_info_debug();
-#endif
break;
}
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;
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;
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;
}
int w = 0, h = 0;
int max_mt_slot = 9;//set touch max count 10 by default
-#ifdef E_DISPLAY
primary_output = e_display_primary_output_get();
-#else
- E_Comp_Screen *e_comp_screen;
-
- 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;
- primary_output = e_comp_screen_primary_output_get(e_comp_screen);
-#endif
e_output_size_get(primary_output, &w, &h);
#include "e_display_intern.h"
-#ifdef E_DISPLAY
#include "e_hwc_intern.h"
#include "e_hwc_windows_intern.h"
#include "e_hwc_planes_intern.h"
"===========================================================================================");
-#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
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;
#include "e_hwc_windows_intern.h"
#include "e_hwc_intern.h"
#include "e_hwc_window_queue_intern.h"
-#include "e_comp_screen_intern.h"
#include "e_explicit_sync_intern.h"
#include "e_comp_wl_tbm_intern.h"
#include "e_comp_wl_tizen_hwc_intern.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;
{
E_Hwc_Window_Target *root_target_hwc_window;
E_Hwc_Window *hwc_window;
- E_Comp_Screen *e_comp_screen;
+ tdm_display *tdisplay;
tdm_error ret = TDM_ERROR_NONE;
int w, h;
EINA_SAFETY_ON_NULL_RETURN_VAL(src_rect, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(dst_rect, EINA_FALSE);
- e_comp_screen = e_comp->e_comp_screen;
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
+ tdisplay = (tdm_display *)e_display_tdm_display_get();
+ EINA_SAFETY_ON_NULL_RETURN_VAL(tdisplay, EINA_FALSE);
if ((hwc->pp_src_rect.x == src_rect->x) && (hwc->pp_src_rect.y == src_rect->y) &&
(hwc->pp_src_rect.w == src_rect->w) && (hwc->pp_src_rect.h == src_rect->h) &&
(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)
{
- hwc->tpp = tdm_display_create_pp(e_comp_screen->tdisplay, &ret);
+ hwc->tpp = tdm_display_create_pp(tdisplay, &ret);
EINA_SAFETY_ON_NULL_GOTO(hwc->tpp, fail);
ret = tdm_pp_set_done_handler(hwc->tpp, _e_hwc_windows_pp_commit_handler, hwc);
EINA_SAFETY_ON_FALSE_GOTO(ret == TDM_ERROR_NONE, fail);
- tdm_display_get_pp_available_size(e_comp_screen->tdisplay,
+ tdm_display_get_pp_available_size(tdisplay,
&hwc->pp_minw, &hwc->pp_minh,
&hwc->pp_maxw, &hwc->pp_maxh,
&hwc->pp_align);
- tdm_display_get_pp_preferred_align_vertical(e_comp_screen->tdisplay, &hwc->pp_align_vertical);
+ tdm_display_get_pp_preferred_align_vertical(tdisplay, &hwc->pp_align_vertical);
EHWSINF("PP Create tdm_pp:%p", NULL, hwc, 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?
EINA_SAFETY_ON_NULL_RETURN(hwc_window);
EINA_SAFETY_ON_NULL_RETURN(e_comp);
- EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
if (hwc_window->on_rendered_target) return;
eldbus_message_iter_arguments_append(iter, "as", &line_array);
-#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;
eldbus_message_iter_arguments_append(iter, "as", &line_array);
-#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;
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;
}
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);
-
- 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"));
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)
_e_output_tdm_capture_create(E_Output *output, tdm_capture_capability cap)
{
tdm_error error = TDM_ERROR_NONE;
+ tdm_display *tdisplay;
tdm_capture *tcapture = NULL;
tdm_capture_capability capabilities;
- E_Comp_Screen *e_comp_screen = NULL;
- e_comp_screen = e_comp->e_comp_screen;
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
+ tdisplay = (tdm_display *)e_display_tdm_display_get();
+ EINA_SAFETY_ON_NULL_RETURN_VAL(tdisplay, NULL);
- error = tdm_display_get_capture_capabilities(e_comp_screen->tdisplay, &capabilities);
+ error = tdm_display_get_capture_capabilities(tdisplay, &capabilities);
EINA_SAFETY_ON_FALSE_RETURN_VAL(error == TDM_ERROR_NONE, NULL);
if (!(capabilities & cap))
_e_output_tdm_stream_capture_support(E_Output *output)
{
tdm_error error = TDM_ERROR_NONE;
+ tdm_display *tdisplay;
tdm_capture_capability capabilities;
- E_Comp_Screen *e_comp_screen = NULL;
- e_comp_screen = e_comp->e_comp_screen;
- EINA_SAFETY_ON_NULL_RETURN(e_comp_screen);
+ tdisplay = (tdm_display *)e_display_tdm_display_get();
+ EINA_SAFETY_ON_NULL_RETURN(tdisplay);
- error = tdm_display_get_capture_capabilities(e_comp_screen->tdisplay, &capabilities);
+ error = tdm_display_get_capture_capabilities(tdisplay, &capabilities);
if (error != TDM_ERROR_NONE)
{
EOINF("TDM Display has no capture capability.", output);
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;
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);
EINA_SAFETY_ON_NULL_RETURN_VAL(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
if (primary_output == output)
{
/* FIXME: The zone controlling should be moved to e_zone */
else
{
/* render the only primary output */
-#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);
return 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)
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;
-#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 *output;
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;
int angle = 0;
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;
-#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 != primary_output)
{
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);
-#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 != primary_output)
}
EINA_SAFETY_ON_FALSE_RETURN_VAL(found == EINA_TRUE, 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);
{
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));
tdm_output_get_available_size(output->toutput, &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;
}
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);
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);
#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)
-{
- if (caps & cap)
- {
- if (cap == TDM_LAYER_CAPABILITY_CURSOR) return "cursor ";
- else if (cap == TDM_LAYER_CAPABILITY_PRIMARY) return "primary ";
- else if (cap == TDM_LAYER_CAPABILITY_OVERLAY) return "overlay ";
- else if (cap == TDM_LAYER_CAPABILITY_GRAPHIC) return "graphics ";
- else if (cap == TDM_LAYER_CAPABILITY_VIDEO) return "video ";
- else if (cap == TDM_LAYER_CAPABILITY_TRANSFORM) return "transform ";
- else if (cap == TDM_LAYER_CAPABILITY_RESEVED_MEMORY) return "reserved_memory ";
- else if (cap == TDM_LAYER_CAPABILITY_NO_CROP) return "no_crop ";
- else return "unknown";
- }
- return "";
-}
-#endif
-
static Eina_Bool
_e_comp_screen_commit_idle_cb(void *data EINA_UNUSED)
{
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;
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)
-{
- E_Comp_Screen *e_comp_screen;
- tdm_error ret;
-
- if (!(e_comp_screen = data)) return ECORE_CALLBACK_RENEW;
-
- ret = tdm_display_handle_events(e_comp_screen->tdisplay);
- if (ret != TDM_ERROR_NONE)
- ERR("tdm_display_handle_events failed");
-
- 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_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())
if (e_comp->hwc && e_comp_conf_hwc_deactive_get())
e_comp_hwc_deactive_set(EINA_TRUE);
-#else
- /* tdm display init */
- e_main_ts_begin("\tTDM Display Init");
-
- e_comp_screen->tdisplay = tdm_display_init(&error);
- if (!e_comp_screen->tdisplay)
- {
- e_main_ts_end("\tTDM Display Init Failed");
- ERR("fail to get tdm_display\n");
- free(e_comp_screen);
- e_comp->e_comp_screen = NULL;
- return NULL;
- }
-
- e_main_ts_end("\tTDM Display Init Done");
-
- e_comp_screen->gdevice_fd = -1;
- e_comp_screen->fd = -1;
- tdm_display_get_fd(e_comp_screen->tdisplay, &fd);
- if (fd < 0)
- {
- ERR("fail to get tdm_display fd\n");
- goto fail;
- }
-
- e_comp_screen->fd = dup(fd);
-
- 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);
-#endif
/* tbm bufmgr init */
e_main_ts_begin("\tTBM Bufmgr Server Init");
}
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)
- {
- ERR("tdm get_capabilities failed");
- goto fail;
- }
-
- /* check the pp_support */
- if (capabilities & TDM_DISPLAY_CAPABILITY_PP)
- {
- error = tdm_display_get_pp_available_formats(e_comp_screen->tdisplay, &pp_formats, &count);
- if (error != TDM_ERROR_NONE)
- ERR("fail to get available pp formats");
- else
- {
- e_comp_screen->pp_enabled = EINA_TRUE;
- for (i = 0 ; i < count ; i++)
- e_comp_screen->available_pp_formats = eina_list_append(e_comp_screen->available_pp_formats, &pp_formats[i]);
- }
- }
-
- e_main_ts_begin("\ttdm-socket Init");
- 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);
e_comp->e_comp_screen = NULL;
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) return;
-
- if (e_comp_screen->pp_enabled)
- {
- EINA_LIST_FOREACH_SAFE(e_comp_screen->available_pp_formats, l, ll, formats)
- {
- if (!formats) continue;
- e_comp_screen->available_pp_formats = eina_list_remove(e_comp_screen->available_pp_formats, l);
- }
- }
-
- 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)
-{
- E_Comp_Screen *e_comp_screen = user_data;
- E_Output *output = NULL;
- Eina_Bool find = EINA_FALSE;
- int count, num;
- E_Output_Mode *set_emode = NULL, *current_emode = NULL;
- E_Output_Mode *emode = NULL;
- Eina_List *modelist = NULL, *l, *ll;
-
- EINA_SAFETY_ON_NULL_RETURN(e_comp_screen);
-
- EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, l, ll, output)
- {
- if (output->toutput == toutput)
- {
- find = EINA_TRUE;
- break;
- }
- }
- EINA_SAFETY_ON_FALSE_RETURN(find == EINA_TRUE);
-
- current_emode = e_output_current_mode_get(output);
- EINA_SAFETY_ON_NULL_RETURN(current_emode);
-
- modelist = e_output_mode_list_get(output);
- if (modelist)
- {
- num = eina_list_count(modelist);
- EINA_SAFETY_ON_FALSE_RETURN(index < num);
-
- count = 0;
- EINA_LIST_FOREACH(modelist, l, emode)
- {
- if (count == index)
- {
- set_emode = emode;
- break;
- }
- count++;
- }
-
- if (set_emode)
- {
- EINA_SAFETY_ON_TRUE_RETURN(current_emode == set_emode);
-
- ELOGF("COMP_SCREEN","request mode change(%d) (%dx%d, %lf) -> (%dx%d, %lf)\n",
- NULL, index, current_emode->w, current_emode->h, current_emode->refresh,
- set_emode->w, set_emode->h, set_emode->refresh);
-
- e_output_external_mode_change(output, set_emode);
- }
- }
-}
-
-static void
-_e_comp_screen_output_destroy_cb(tdm_output *toutput, void *user_data)
-{
- E_Comp_Screen *e_comp_screen = user_data;
- E_Output *output = NULL;
- Eina_List *l, *ll;
-
- EINA_SAFETY_ON_NULL_RETURN(e_comp_screen);
-
- tdm_output_remove_destroy_handler(toutput, _e_comp_screen_output_destroy_cb, e_comp_screen);
-
- EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, l, ll, output)
- {
- if (output->toutput == toutput)
- {
- e_comp_screen->num_outputs--;
- e_comp_screen->outputs = eina_list_remove_list(e_comp_screen->outputs, l);
- e_output_del(output);
- }
- }
-}
-
-static void
-_e_comp_screen_output_create_cb(tdm_display *dpy, tdm_output *toutput, void *user_data)
-{
- E_Comp_Screen *e_comp_screen = user_data;
- E_Output *output = NULL;
- tdm_error ret = TDM_ERROR_NONE;
-
- EINA_SAFETY_ON_NULL_RETURN(e_comp_screen);
-
- TRACE_DS_BEGIN(OUTPUT:NEW);
- output = e_output_new(e_comp_screen, e_comp_screen->num_outputs);
- EINA_SAFETY_ON_NULL_GOTO(output, fail);
- if (output->toutput != toutput) goto fail;
- TRACE_DS_END();
-
- TRACE_DS_BEGIN(OUTPUT:UPDATE);
- if (!e_output_update(output))
- {
- ERR("fail to e_output_update.");
- e_output_del(output);
- goto fail;
- }
- TRACE_DS_END();
-
- /* todo : add tdm_output_add_mode_change_request_handler()*/
- ret = tdm_output_add_mode_change_request_handler(toutput, _e_comp_screen_output_mode_change_cb, e_comp_screen);
- if (ret != TDM_ERROR_NONE)
- {
- ERR("fail to add output mode change handler.");
- e_output_del(output);
- return;
- }
-
- ret = tdm_output_add_destroy_handler(toutput, _e_comp_screen_output_destroy_cb, e_comp_screen);
- if (ret != TDM_ERROR_NONE)
- {
- ERR("fail to add output destroy handler.");
- e_output_del(output);
- return;
- }
-
- e_comp_screen->outputs = eina_list_append(e_comp_screen->outputs, output);
- e_comp_screen->num_outputs++;
-
- return;
-
-fail:
- TRACE_DS_END();
-}
-
-static void
-_e_comp_screen_deinit_outputs(E_Comp_Screen *e_comp_screen)
-{
- E_Output *output;
- Eina_List *l, *ll;
-
- tdm_display_remove_output_create_handler(e_comp_screen->tdisplay, _e_comp_screen_output_create_cb, e_comp_screen);
-
- e_hwc_ecore_evas_deinit();
-
- // free up e_outputs
- EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, l, ll, output)
- {
- e_comp_screen->outputs = eina_list_remove_list(e_comp_screen->outputs, l);
- e_output_del(output);
- }
-
- e_hwc_deinit();
- e_hwc_windows_deinit();
- e_hwc_planes_deinit();
- e_output_shutdown();
-}
-
-static Eina_Bool
-_e_comp_screen_fake_output_set(E_Comp_Screen *e_comp_screen)
-{
- E_Output *primary_output = NULL;
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
-
- primary_output = e_comp_screen_primary_output_get(e_comp_screen);
- EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
-
- if (!e_output_hwc_setup(primary_output))
- {
- ERR("fail to e_output_hwc_setup.");
- return EINA_FALSE;
- }
-
- if (!e_output_fake_config_set(primary_output, 2, 1))
- {
- e_error_message_show(_("Fail to set the fake output config!\n"));
- e_hwc_ecore_evas_deinit();
- return EINA_FALSE;
- }
-
- return EINA_TRUE;
-}
-
-static Eina_Bool
-_e_comp_screen_init_outputs(E_Comp_Screen *e_comp_screen)
-{
- E_Output *output = NULL;
- E_Output_Mode *mode = NULL;
- tdm_display *tdisplay = e_comp_screen->tdisplay;
- int num_outputs;
- int i;
- Eina_Bool scale_updated = EINA_FALSE;
- Eina_Bool connection_check = EINA_FALSE;
- tdm_error err = TDM_ERROR_NONE;
- char bootmode[32];
- int ret;
-
- /* init e_output */
- if (!e_output_init())
- {
- ERR("fail to e_output_init.");
- return EINA_FALSE;
- }
-
- /* get the num of outputs */
- err = tdm_display_get_output_count(tdisplay, &num_outputs);
- if ((err != TDM_ERROR_NONE) ||
- (num_outputs < 1))
- {
- ERR("fail to get tdm_display_get_output_count\n");
- return EINA_FALSE;
- }
- e_comp_screen->num_outputs = num_outputs;
-
- ELOGF("COMP_SCREEN","num_outputs = %i", NULL, e_comp_screen->num_outputs);
-
- if (!e_hwc_init())
- {
- ERR("e_hwc_init failed");
- goto fail;
- }
-
- if (!e_hwc_planes_init())
- {
- ERR("e_hwc_planes_init failed");
- goto fail;
- }
-
- if (!e_hwc_windows_init())
- {
- ERR("e_hwc_windows_init failed");
- goto fail;
- }
-
- for (i = 0; i < num_outputs; i++)
- {
- e_main_ts_begin("\tE_Output New");
- output = e_output_new(e_comp_screen, i);
- if (!output)
- {
- e_main_ts_end("\tE_Output New Failed");
- goto fail;
- }
-
- e_main_ts_begin("\tE_Output Update");
- if (!e_output_update(output))
- {
- e_main_ts_end("\tE_Output Update Failed");
- ERR("fail to e_output_update.");
- goto fail;
- }
- e_main_ts_end("\tE_Output Update Done");
-
- e_comp_screen->outputs = eina_list_append(e_comp_screen->outputs, output);
-
- if (!e_output_connected(output)) continue;
-
- connection_check = EINA_TRUE;
-
- /* setting with the best mode and enable the output */
- e_main_ts_begin("\tE_Output Find Best Mode");
- mode = e_output_best_mode_find(output);
- if (!mode)
- {
- e_main_ts_end("\tE_Output Find Best Mode Failed");
- ERR("fail to get best mode.");
- goto fail;
- }
- e_main_ts_end("\tE_Output Find Best Mode Done");
-
- e_main_ts_begin("\tE_Output Mode Apply");
- if (!e_output_mode_apply(output, mode))
- {
- e_main_ts_end("\tE_Output Mode Apply Failed");
- ERR("fail to e_output_mode_apply.");
- goto fail;
- }
- e_main_ts_end("\tE_Output Mode Apply Done");
-
- e_main_ts_begin("\tE_Output Set DPMS ON");
- ret = device_board_get_boot_mode(bootmode, sizeof(bootmode));
- if (!ret && !e_util_strcmp(bootmode, "silent"))
- {
- INF("silent reboot. do not set dpms");
- }
- else
- {
- if (!e_output_dpms_set(output, E_OUTPUT_DPMS_ON))
- {
- e_main_ts_end("\tE_Output Set DPMS ON Failed");
- ERR("fail to e_output_dpms.");
- goto fail;
- }
- }
-
- e_main_ts_end("\tE_Output Set DPMS ON Done");
-
- e_main_ts_begin("\tE_Output Hwc Setup");
- if (!e_output_hwc_setup(output))
- {
- e_main_ts_end("\tE_Output Hwc Setup Failed");
- ERR("fail to e_output_hwc_setup.");
- goto fail;
- }
- e_main_ts_end("\tE_Output Hwc Setup Done");
-
- /* update e_scale with first available output size */
- if ((e_config->scale.for_tdm) && (!scale_updated))
- {
- double target_inch;
- int dpi;
-
- target_inch = (round((sqrt(output->info.size.w * output->info.size.w + output->info.size.h * output->info.size.h) / 25.4) * 10) / 10);
- dpi = (round((sqrt(mode->w * mode->w + mode->h * mode->h) / target_inch) * 10) / 10);
-
- e_scale_manual_update(dpi);
- scale_updated = EINA_TRUE;
- }
- }
-
- //TODO: if there is no output connected, make the fake output which is connected.
- if (!connection_check)
- {
- if (!_e_comp_screen_fake_output_set(e_comp_screen))
- goto fail;
- }
-
- e_comp_screen_size_update(e_comp_screen);
-
- e_main_ts_begin("\tE_Hwc Ecore_Evas Init");
- if (!e_hwc_ecore_evas_init())
- {
- e_main_ts_end("\ttE_Hwc Ecore_Evas Init Failed");
- ERR("fail to e_hwc_ecore_evas_init");
- goto fail;
- }
- e_main_ts_end("\tE_Hwc Ecore_Evas Init Done");
-
- if (tdm_display_add_output_create_handler(tdisplay, _e_comp_screen_output_create_cb, e_comp_screen)) goto fail;
-
- return EINA_TRUE;
-fail:
- _e_comp_screen_deinit_outputs(e_comp_screen);
-
- 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_main_ts_end("\tE_Comp_Screen New Done");
-#ifdef E_DISPLAY
-#else
- e_main_ts_begin("\tE_Comp_Screen Outputs Init");
- if (!_e_comp_screen_init_outputs(e_comp_screen))
- {
- e_main_ts_end("\tE_Comp_Screen Outputs Init Failed");
- e_error_message_show(_("Enlightenment cannot initialize outputs!\n"));
- _e_comp_screen_engine_deinit();
- 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);
int i = 0, right_x = 0;
int x, y, w, h;
-#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 (!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;
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_FREE_LIST(event_handlers, ecore_event_handler_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)
-{
- E_Output *output = NULL, *o;
- const Eina_List *l;
-
- EINA_LIST_FOREACH(e_comp_screen->outputs, l, o)
- {
- unsigned int pipe = 0;
- tdm_error error;
-
- error = tdm_output_get_pipe(o->toutput, &pipe);
- if (error != TDM_ERROR_NONE || pipe != 0)
- continue;
-
- output = o;
- break;
- }
-
- if (!output)
- {
- ERR("couldn't find the primary output");
- return NULL;
- }
-
- 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)
const Eina_List *l;
int w, h;
-#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(primary_output, screen_rotation))
return EINA_FALSE;
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)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
-
- E_Output *output = NULL, *o = NULL;
- Eina_List *l = NULL;
- int highest_priority = 0;
-
- /* find the highest priority of the e_output */
- EINA_LIST_FOREACH(e_comp_screen->outputs, l, o)
- {
- if (highest_priority < o->config.priority)
- {
- highest_priority = o->config.priority;
- output = o;
- }
- }
-
- return output;
-}
-
-EINTERN Eina_Bool
-e_comp_screen_pp_support(void)
-{
- 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);
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen->tdisplay, EINA_FALSE);
-
- return e_comp_screen->pp_enabled;
-}
-
-
-EINTERN Eina_List *
-e_comp_screen_pp_available_formats_get(void)
-{
- 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);
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen->tdisplay, EINA_FALSE);
-
- if (!e_comp_screen->pp_enabled)
- {
- ERR("pp does not support.");
- return NULL;
- }
-
- return e_comp_screen->available_pp_formats;
-}
-
-EINTERN void
-e_comp_screen_hwc_info_debug(void)
-{
- EINA_SAFETY_ON_NULL_RETURN(e_comp);
- EINA_SAFETY_ON_NULL_RETURN(e_comp->e_comp_screen);
-
- E_Comp_Screen *e_comp_screen = e_comp->e_comp_screen;
- E_Output *output = NULL;
- E_Plane *plane = NULL;
- Eina_List *l_o, *ll_o;
- Eina_List *l_l, *ll_l;
- tdm_output_conn_status conn_status;
- int output_idx = 0;
- tdm_layer_capability layer_capabilities;
- char layer_cap[4096] = {0, };
- int i;
- const tdm_prop *tprops;
- int count;
-
- INF("HWC: HWC Information ==========================================================");
- EINA_LIST_FOREACH_SAFE(e_comp_screen->outputs, l_o, ll_o, output)
- {
- tdm_error err = TDM_ERROR_NONE;
-
- if (!output) continue;
-
- if (e_hwc_policy_get(output->hwc) == E_HWC_POLICY_PLANES)
- {
- err = tdm_output_get_conn_status(output->toutput, &conn_status);
- if (err != TDM_ERROR_NONE) continue;
- if (conn_status == TDM_OUTPUT_CONN_STATUS_DISCONNECTED) continue;
-
- INF("HWC: HWC Output(%d):(x, y, w, h)=(%d, %d, %d, %d) Information.",
- ++output_idx,
- output->config.geom.x, output->config.geom.y, output->config.geom.w, output->config.geom.h);
- INF("HWC: num_layers=%d", output->plane_count);
- EINA_LIST_FOREACH_SAFE(output->planes, l_l, ll_l, plane)
- {
- if (!plane) continue;
- /* FIXME: hwc extension doesn't provide thing like layer */
- tdm_layer_get_capabilities(plane->tlayer, &layer_capabilities);
- snprintf(layer_cap, sizeof(layer_cap), "%s%s%s%s%s%s%s%s",
- _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_CURSOR),
- _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_PRIMARY),
- _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_OVERLAY),
- _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_GRAPHIC),
- _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_VIDEO),
- _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_TRANSFORM),
- _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_RESEVED_MEMORY),
- _layer_cap_to_str(layer_capabilities, TDM_LAYER_CAPABILITY_NO_CROP));
- INF("HWC: index=%d zpos=%d ec=%p %s",
- plane->index, plane->zpos,
- plane->ec?plane->ec:NULL,
- layer_cap);
- }
- }
- else
- {
- /* TODO: construct debug info for outputs managed by the hwc-wins */
- INF("HWC: HWC Output(%d) managed by hwc-wins.", ++output_idx);
-
- if (!e_hwc_windows_get_available_properties(output->hwc, &tprops, &count))
- {
- ERR("e_hwc_windows_get_video_available_properties failed");
- return;
- }
- INF(">>>>>>>> Available UI props : count = %d", count);
- for (i = 0; i < count; i++)
- INF(" [%d] %s, %u", i, tprops[i].name, tprops[i].id);
-
- if (!e_hwc_windows_get_video_available_properties(output->hwc, &tprops, &count))
- {
- ERR("e_hwc_windows_get_video_available_properties failed");
- return;
- }
- INF(">>>>>>>> Available VIDEO props : count = %d", count);
- for (i = 0; i < count; i++)
- INF(" [%d] %s, %u", i, tprops[i].name, tprops[i].id);
- }
- }
- INF("HWC: =========================================================================");
-}
-
-#define NUM_SW_FORMAT (sizeof(sw_formats) / sizeof(sw_formats[0]))
-
-static tbm_format sw_formats[] = {
- TBM_FORMAT_ARGB8888,
- TBM_FORMAT_XRGB8888,
- TBM_FORMAT_YUV420,
- TBM_FORMAT_YVU420,
-};
-
-static tdm_layer *
-_e_comp_screen_video_tdm_layer_get(tdm_output *output)
-{
- int i, count = 0;
-#ifdef CHECKING_PRIMARY_ZPOS
- int primary_idx = 0, primary_zpos = 0;
- tdm_layer *primary_layer;
-#endif
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
-
- tdm_output_get_layer_count(output, &count);
- for (i = 0; i < count; i++)
- {
- tdm_layer *layer = tdm_output_get_layer(output, i, NULL);
- tdm_layer_capability capabilities = 0;
- EINA_SAFETY_ON_NULL_RETURN_VAL(layer, NULL);
-
- tdm_layer_get_capabilities(layer, &capabilities);
- if (capabilities & TDM_LAYER_CAPABILITY_VIDEO)
- return layer;
- }
-
-#ifdef CHECKING_PRIMARY_ZPOS
- tdm_output_get_primary_index(output, &primary_idx);
- primary_layer = tdm_output_get_layer(output, primary_idx, NULL);
- EINA_SAFETY_ON_NULL_RETURN_VAL(primary_layer, NULL);
- tdm_layer_get_zpos(primary_layer, &primary_zpos);
-#endif
-
- for (i = 0; i < count; i++)
- {
- tdm_layer *layer = tdm_output_get_layer(output, i, NULL);
- tdm_layer_capability capabilities = 0;
- EINA_SAFETY_ON_NULL_RETURN_VAL(layer, NULL);
-
- tdm_layer_get_capabilities(layer, &capabilities);
- if (capabilities & TDM_LAYER_CAPABILITY_OVERLAY)
- {
-#ifdef CHECKING_PRIMARY_ZPOS
- int zpos = 0;
- tdm_layer_get_zpos(layer, &zpos);
- if (zpos >= primary_zpos) continue;
-#endif
- return layer;
- }
- }
-
- return NULL;
-}
-
-static E_Output *
-_e_comp_screen_eoutput_get_by_toutput(tdm_output *output)
-{
- Eina_List *l;
- E_Output *eo;
-
- EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, eo)
- if (eo->toutput == output)
- return eo;
-
- 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;
- tdm_error error;
-
- *count = 0;
-
- if (e_comp_screen_pp_support())
- {
- error = tdm_display_get_pp_available_formats(e_comp->e_comp_screen->tdisplay, formats, count);
- if (error == TDM_ERROR_NONE)
- return EINA_TRUE;
- }
-
- /* get the first output */
- toutput = tdm_display_get_output(e_comp->e_comp_screen->tdisplay, 0, NULL);
- if (!toutput)
- return EINA_FALSE;
-
- output = _e_comp_screen_eoutput_get_by_toutput(toutput);
- if (!output)
- return EINA_FALSE;
-
- if (e_hwc_policy_get(output->hwc) != E_HWC_POLICY_WINDOWS)
- {
- /* get the first suitable layer */
- layer = _e_comp_screen_video_tdm_layer_get(toutput);
- if (layer)
- {
- tdm_layer_get_available_formats(layer, formats, count);
- }
- else
- {
- *formats = sw_formats;
- *count = NUM_SW_FORMAT;
- }
- }
- else
- {
- error = tdm_hwc_get_video_supported_formats(output->hwc->thwc, formats, count);
- if (error != TDM_ERROR_NONE)
- {
- *formats = sw_formats;
- *count = NUM_SW_FORMAT;
- }
- }
-
- return EINA_TRUE;
-#endif
-}
-
-#ifdef E_DISPLAY
-#else
-EINTERN void *
-e_comp_screen_gbm_device_get(E_Comp_Screen *e_comp_screen)
-{
- int fd;
-
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
-
- if (e_comp_screen->gdevice) return e_comp_screen->gdevice;
-
- fd = tbm_drm_helper_get_master_fd();
- EINA_SAFETY_ON_FALSE_RETURN_VAL(fd >= 0, NULL);
-
- e_comp_screen->gdevice = gbm_create_device(fd);
- if (!e_comp_screen->gdevice)
- {
- ERR("fail to create gbm device");
- close(fd);
- return NULL;
- }
-
- e_comp_screen->gdevice_fd = fd;
-
- 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)
-{
- switch (dpms)
- {
- case E_OUTPUT_DPMS_ON:
- return "DPMS_ON";
- break;
- case E_OUTPUT_DPMS_STANDBY:
- return "DPMS_STANDBY";
- break;
- case E_OUTPUT_DPMS_SUSPEND:
- return "DPMS_SUSPEND";
- break;
- case E_OUTPUT_DPMS_OFF:
- return "DPMS_OFF";
- break;
- default:
- return "Unknown";
- }
-}
-
-EINTERN void
-e_comp_screen_debug_info_get(Eldbus_Message_Iter *iter)
-{
- Eldbus_Message_Iter *line_array;
- E_Output *output = NULL;
- E_Hwc *hwc = NULL;
- Eina_List *l;
- char info_str[1024];
-
- eldbus_message_iter_arguments_append(iter, "as", &line_array);
-
- eldbus_message_iter_basic_append(line_array, 's',
- "===========================================================================================");
- eldbus_message_iter_basic_append(line_array, 's',
- " idx id status dpms ( x , y ) ( w x h ) ");
- 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;
- if (!output->hwc) continue;
- if (e_hwc_policy_get(hwc) == E_HWC_POLICY_NONE) continue;
-
- snprintf(info_str, sizeof(info_str), "%2d %12s %15s %10s (%5d , %5d) (%5d x %5d)",
- output->index, output->id,
- output->info.connected ? "connected" : "disconnected",
- _e_comp_screen_dpms_to_string(output->dpms),
- output->config.geom.x, output->config.geom.y,
- output->config.geom.w, output->config.geom.h);
-
- eldbus_message_iter_basic_append(line_array, 's', info_str);
- }
-
- eldbus_message_iter_basic_append(line_array, 's',
- "===========================================================================================");
-
- 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 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 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);
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_SAFETY_ON_NULL_RETURN_VAL(dev, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(dev->seats, 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
e_output_size_get(primary_output, &output_w, &output_h);
default_w = (float)output_w;
default_h = (float)output_h;
EINA_SAFETY_ON_NULL_RETURN_VAL(dev->seats, EINA_FALSE);
EINA_SAFETY_ON_TRUE_RETURN_VAL((w == 0) || (h == 0), 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
e_output_size_get(primary_output, &output_w, &output_h);
default_w = (float)output_w;
default_h = (float)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, &w, &h);
if (primary_output)
EINA_SAFETY_ON_NULL_RETURN(evdev);
-#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);
E_Output *eout;
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)
{
{
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);
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;
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;
#include "e_tbm_gbm_server_intern.h"
-#include "e_comp_screen_intern.h"
+#include "e_display_intern.h"
#include "e_comp_wl_tbm_intern.h"
#include <assert.h>
static E_Gbm_Client_Buffer *
_e_gbm_client_buffer_create(struct wl_resource *resource)
{
- void *gbm_device = e_comp->e_comp_screen->gdevice;
+ void *gbm_device = e_display_gbm_device_get();;
struct gbm_bo *gbm_bo;
E_Gbm_Client_Buffer *buffer;