static void
_e_comp_canvas_tbm_surface_queue_free(void *data, void *tqueue)
{
- E_Comp_Screen *e_comp_screen = (E_Comp_Screen *)data;
+ E_Comp_Screen *comp_screen = (E_Comp_Screen *)data;
ELOGF("Comp_Canvas", "The tbm_surface(%p) is destroyed.", NULL,
- e_comp_screen->tqueue);
+ comp_screen->tqueue);
- e_display_tbm_buffer_queue_destroy(e_comp_screen->tqueue);
+ e_display_tbm_buffer_queue_destroy(comp_screen->tqueue);
}
static void *
_e_comp_canvas_tbm_surface_queue_alloc(void *data, int w, int h)
{
- E_Comp_Screen *e_comp_screen = (E_Comp_Screen *)data;
+ E_Comp_Screen *comp_screen = (E_Comp_Screen *)data;
- e_comp_screen->tqueue =
- e_display_tbm_buffer_queue_create(e_comp_screen->w, e_comp_screen->h);
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen->tqueue, NULL);
+ comp_screen->tqueue =
+ e_display_tbm_buffer_queue_create(comp_screen->w, comp_screen->h);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(comp_screen->tqueue, NULL);
ELOGF("Comp_Canvas", "Assign tqueue(%p) to Ecore_Evas.", NULL,
- e_comp_screen->tqueue);
+ comp_screen->tqueue);
- return (void *)e_comp_screen->tqueue;
+ return (void *)comp_screen->tqueue;
}
static Ecore_Evas *
-_e_comp_canvas_ecore_evas_tbm_alloc(E_Comp_Screen *e_comp_screen, int src_w, int src_h)
+_e_comp_canvas_ecore_evas_tbm_alloc(E_Comp_Screen *comp_screen, int src_w, int src_h)
{
Ecore_Evas *ee;
E_Comp *comp;
ee = ecore_evas_tbm_allocfunc_new("gl_tbm_ES", src_w, src_h,
_e_comp_canvas_tbm_surface_queue_alloc,
_e_comp_canvas_tbm_surface_queue_free,
- (void *)e_comp_screen);
+ (void *)comp_screen);
}
else
{
ee = ecore_evas_tbm_allocfunc_new("gl_tbm", src_w, src_h,
_e_comp_canvas_tbm_surface_queue_alloc,
_e_comp_canvas_tbm_surface_queue_free,
- (void *)e_comp_screen);
+ (void *)comp_screen);
}
ELOGF("Comp Screen", "ecore_evas engine:gl_tbm ee:%p avoid_afill:%d", NULL,
static void
_e_comp_canvas_gbm_surface_free(void *data, void *gsurface)
{
- E_Comp_Screen *e_comp_screen = (E_Comp_Screen *)data;
+ E_Comp_Screen *comp_screen = (E_Comp_Screen *)data;
ELOGF("Comp_Canvas", "The gbm_surface(%p) is destroyed.", NULL,
- e_comp_screen->gsurface);
+ comp_screen->gsurface);
- e_display_gbm_surface_destroy(e_comp_screen->gsurface);
+ e_display_gbm_surface_destroy(comp_screen->gsurface);
}
static void *
_e_comp_canvas_gbm_surface_alloc(void *data, int w, int h)
{
- E_Comp_Screen *e_comp_screen = (E_Comp_Screen *)data;
+ E_Comp_Screen *comp_screen = (E_Comp_Screen *)data;
- e_comp_screen->gsurface =
- e_display_gbm_surface_create(w, h, e_comp_screen->gbm_format);
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen->gsurface, NULL);
+ comp_screen->gsurface =
+ e_display_gbm_surface_create(w, h, comp_screen->gbm_format);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(comp_screen->gsurface, NULL);
ELOGF("Comp_Canvas", "Assign gbm_surface(%p) to Ecore_Evas.", NULL,
- e_comp_screen->gsurface);
+ comp_screen->gsurface);
- return (void *)e_comp_screen->gsurface;
+ return (void *)comp_screen->gsurface;
}
static Ecore_Evas *
-_e_comp_canvas_ecore_evas_gbm_alloc(E_Comp_Screen *e_comp_screen, int src_w, int src_h)
+_e_comp_canvas_ecore_evas_gbm_alloc(E_Comp_Screen *comp_screen, int src_w, int src_h)
{
Ecore_Evas *ee;
E_Comp *comp;
comp = e_comp_get();
for (i = 0; i < format_count; i++)
{
- e_comp_screen->gbm_format = gbm_formats[i];
+ comp_screen->gbm_format = gbm_formats[i];
if (comp->avoid_afill)
{
ee = ecore_evas_tbm_native_allocfunc_new("gl_tbm_ES",
gdevice, src_w, src_h,
_e_comp_canvas_gbm_surface_alloc, _e_comp_canvas_gbm_surface_free,
- (void *)e_comp_screen);
+ (void *)comp_screen);
}
else
{
ee = ecore_evas_tbm_native_allocfunc_new("gl_tbm",
gdevice, src_w, src_h,
_e_comp_canvas_gbm_surface_alloc, _e_comp_canvas_gbm_surface_free,
- (void *)e_comp_screen);
+ (void *)comp_screen);
}
if (ee) break;
}
static Ecore_Evas *
-_e_comp_canvas_ecore_evas_init(E_Comp_Screen *e_comp_screen, int w, int y)
+_e_comp_canvas_ecore_evas_init(E_Comp_Screen *comp_screen, int w, int y)
{
Ecore_Evas *ee;
int scr_w = 1, scr_h = 1;
ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_TBM))
e_comp_gl_set(EINA_TRUE);
- e_comp_screen_size_get(e_comp_screen, &scr_w, &scr_h);
+ e_comp_screen_size_get(comp_screen, &scr_w, &scr_h);
ELOGF("COMP_SCREEN", "GL available:%d config engine:%d screen size:%dx%d", NULL,
e_comp_gl_get(), e_comp_config_get()->engine, scr_w, scr_h);
e_main_ts_begin("\tEE_GL_TBM New");
if (e_comp_screen_prefer_gbm_check())
{
- ee = _e_comp_canvas_ecore_evas_gbm_alloc(e_comp_screen, scr_w, scr_h);
+ ee = _e_comp_canvas_ecore_evas_gbm_alloc(comp_screen, scr_w, scr_h);
if (!ee)
- ee = _e_comp_canvas_ecore_evas_tbm_alloc(e_comp_screen, scr_w, scr_h);
+ ee = _e_comp_canvas_ecore_evas_tbm_alloc(comp_screen, scr_w, scr_h);
}
else
{
- ee = _e_comp_canvas_ecore_evas_tbm_alloc(e_comp_screen, scr_w, scr_h);
+ ee = _e_comp_canvas_ecore_evas_tbm_alloc(comp_screen, scr_w, scr_h);
if (!ee)
- ee = _e_comp_canvas_ecore_evas_gbm_alloc(e_comp_screen, scr_w, scr_h);
+ ee = _e_comp_canvas_ecore_evas_gbm_alloc(comp_screen, scr_w, scr_h);
}
snprintf(buf, sizeof(buf), "\tEE_GL_TBM New Done %p %dx%d", ee, scr_w, scr_h);
ee = ecore_evas_tbm_allocfunc_new("software_tbm",
scr_w, scr_h,
_e_comp_canvas_tbm_surface_queue_alloc, _e_comp_canvas_tbm_surface_queue_free,
- (void *)e_comp_screen);
+ (void *)comp_screen);
ELOGF("Comp_Canvas", "ecore_evas engine:software_tbm fallback to software engine.", NULL);
snprintf(buf, sizeof(buf), "\tEE_DRM New Done %p %dx%d", ee, scr_w, scr_h);
e_main_ts_end(buf);
EINTERN Eina_Bool
-e_comp_canvas_init(E_Comp_Screen *e_comp_screen)
+e_comp_canvas_init(E_Comp_Screen *comp_screen)
{
E_View_Rect *rect;
E_View *view;
primary_output = e_display_primary_output_get();
EINA_SAFETY_ON_NULL_RETURN_VAL(primary_output, EINA_FALSE);
- screen_rotation = e_comp_screen->rotation;
+ screen_rotation = comp_screen->rotation;
- e_comp_screen_size_get(e_comp_screen, &w, &h);
+ e_comp_screen_size_get(comp_screen, &w, &h);
- ee = _e_comp_canvas_ecore_evas_init(e_comp_screen, w, h);
+ ee = _e_comp_canvas_ecore_evas_init(comp_screen, w, h);
EINA_SAFETY_ON_NULL_RETURN_VAL(ee, EINA_FALSE);
ELOGF("Comp_Canvas", "ee(%p) with the tqueue(%p) is created.", NULL,
- ee, e_comp_screen->tqueue);
+ ee, comp_screen->tqueue);
comp = e_comp_get();
comp->ee = ee;
E_COMP_SCREEN_SIGNAL_ROTATION_CHANGED = 0
};
-static void _e_comp_screen_e_screens_setup(E_Comp_Screen *e_comp_screen, int rw, int rh);
+static void _e_comp_screen_e_screens_setup(E_Comp_Screen *comp_screen, int rw, int rh);
static void _e_comp_screen_screen_policy_update(void);
static void
-_e_comp_screen_gl_shutdown(E_Comp_Screen *e_comp_screen)
+_e_comp_screen_gl_shutdown(E_Comp_Screen *comp_screen)
{
- if (!e_comp_screen->evas_gl) return;
+ if (!comp_screen->evas_gl) return;
- if (e_comp_screen->evas_gl->glapi->evasglUnbindWaylandDisplay)
- e_comp_screen->evas_gl->glapi->evasglUnbindWaylandDisplay(e_comp_screen->evas_gl->gl, e_comp_screen->wl_display);
+ if (comp_screen->evas_gl->glapi->evasglUnbindWaylandDisplay)
+ comp_screen->evas_gl->glapi->evasglUnbindWaylandDisplay(comp_screen->evas_gl->gl, comp_screen->wl_display);
- evas_gl_make_current(e_comp_screen->evas_gl->gl, NULL, NULL);
- evas_gl_context_destroy(e_comp_screen->evas_gl->gl, e_comp_screen->evas_gl->glctx);
- evas_gl_surface_destroy(e_comp_screen->evas_gl->gl, e_comp_screen->evas_gl->glsfc);
- evas_gl_free(e_comp_screen->evas_gl->gl);
+ evas_gl_make_current(comp_screen->evas_gl->gl, NULL, NULL);
+ evas_gl_context_destroy(comp_screen->evas_gl->gl, comp_screen->evas_gl->glctx);
+ evas_gl_surface_destroy(comp_screen->evas_gl->gl, comp_screen->evas_gl->glsfc);
+ evas_gl_free(comp_screen->evas_gl->gl);
- E_FREE(e_comp_screen->evas_gl);
+ E_FREE(comp_screen->evas_gl);
}
static void
-_e_comp_screen_gl_init(E_Comp_Screen *e_comp_screen)
+_e_comp_screen_gl_init(E_Comp_Screen *comp_screen)
{
Evas *evas = NULL;
Evas_GL *evasgl = NULL;
res = evas_gl_make_current(evasgl, sfc, ctx);
EINA_SAFETY_ON_FALSE_GOTO(res, err);
- res = glapi->evasglBindWaylandDisplay(evasgl, e_comp_screen->wl_display);
+ res = glapi->evasglBindWaylandDisplay(evasgl, comp_screen->wl_display);
EINA_SAFETY_ON_FALSE_GOTO(res, err);
evas_gl_config_free(cfg);
evas_gl->glsfc = sfc;
evas_gl->glctx = ctx;
- e_comp_screen->evas_gl = evas_gl;
+ comp_screen->evas_gl = evas_gl;
/* for native surface */
comp->gl = 1;
_e_comp_screen_dbus_get_cb(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
{
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
- E_Comp_Screen *e_comp_screen = e_comp_screen_get();
+ E_Comp_Screen *comp_screen = e_comp_screen_get();
int rotation = 0;
- if (e_comp_screen)
- rotation = e_comp_screen->rotation;
+ if (comp_screen)
+ rotation = comp_screen->rotation;
ELOGF("COMP_SCREEN","got screen-rotation 'get' request: %d", NULL, rotation);
static void
_e_comp_screen_dbus_init()
{
- E_Comp_Screen *e_comp_screen = e_comp_screen_get();
- EINA_SAFETY_ON_NULL_GOTO(e_comp_screen, err);
+ E_Comp_Screen *comp_screen = e_comp_screen_get();
+ EINA_SAFETY_ON_NULL_GOTO(comp_screen, err);
e_comp_screen_iface = eldbus_service_interface_register(edbus_conn,
PATH,
&iface_desc);
EINA_SAFETY_ON_NULL_GOTO(e_comp_screen_iface, err);
- if (e_comp_screen->rotation)
+ if (comp_screen->rotation)
{
- eldbus_service_signal_emit(e_comp_screen_iface, E_COMP_SCREEN_SIGNAL_ROTATION_CHANGED, e_comp_screen->rotation);
- ELOGF("TRANSFORM", "screen-rotation sends signal: %d", NULL, e_comp_screen->rotation);
+ eldbus_service_signal_emit(e_comp_screen_iface, E_COMP_SCREEN_SIGNAL_ROTATION_CHANGED, comp_screen->rotation);
+ ELOGF("TRANSFORM", "screen-rotation sends signal: %d", NULL, comp_screen->rotation);
}
return;
}
else if (e->clas == ECORE_DEVICE_CLASS_TOUCH)
{
- E_Comp_Screen *e_comp_screen = e_comp_screen_get();
+ E_Comp_Screen *comp_screen = e_comp_screen_get();
e_comp_wl_input_touch_enabled_set(EINA_TRUE);
- if (e_comp_screen)
- _e_comp_screen_input_rotation_set(e_comp_screen->rotation);
+ if (comp_screen)
+ _e_comp_screen_input_rotation_set(comp_screen->rotation);
comp_wl->touch.num_devices++;
}
}
EINTERN Eina_Bool
-e_comp_screen_size_update(E_Comp_Screen *e_comp_screen)
+e_comp_screen_size_update(E_Comp_Screen *comp_screen)
{
E_Output *output;
int sum_w = 0, max_h = 0, output_w, output_h;
Eina_List *l;
E_Comp *comp;
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(comp_screen, EINA_FALSE);
EINA_LIST_FOREACH(e_display_outputs_get(), l, output)
{
max_h = output_h;
}
- e_comp_screen->w = sum_w;
- e_comp_screen->h = max_h;
+ comp_screen->w = sum_w;
+ comp_screen->h = max_h;
comp = e_comp_get();
if (comp->ee)
* ecore_evas is created without rotation
* and rotation of ecore_evas is reset after it is resized
*/
- if (e_comp_screen->rotation)
+ if (comp_screen->rotation)
ecore_evas_rotation_with_resize_set(comp->ee, 0);
- ecore_evas_resize(comp->ee, e_comp_screen->w, e_comp_screen->h);
+ ecore_evas_resize(comp->ee, comp_screen->w, comp_screen->h);
- if (e_comp_screen->rotation)
- ecore_evas_rotation_with_resize_set(comp->ee, e_comp_screen->rotation);
+ if (comp_screen->rotation)
+ ecore_evas_rotation_with_resize_set(comp->ee, comp_screen->rotation);
}
return EINA_TRUE;
static E_Comp_Screen *
_e_comp_screen_new(void)
{
- E_Comp_Screen *e_comp_screen = NULL;
+ E_Comp_Screen *comp_screen = NULL;
- e_comp_screen = E_NEW(E_Comp_Screen, 1);
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
+ comp_screen = E_NEW(E_Comp_Screen, 1);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(comp_screen, EINA_FALSE);
- e_comp_screen_set(e_comp_screen);
+ e_comp_screen_set(comp_screen);
- return e_comp_screen;
+ return comp_screen;
}
static void
-_e_comp_screen_del(E_Comp_Screen *e_comp_screen)
+_e_comp_screen_del(E_Comp_Screen *comp_screen)
{
- if (!e_comp_screen) return;
+ if (!comp_screen) return;
- free(e_comp_screen);
+ free(comp_screen);
}
static void
}
static void
-_e_comp_screen_e_screens_set(E_Comp_Screen *e_comp_screen, Eina_List *screens)
+_e_comp_screen_e_screens_set(E_Comp_Screen *comp_screen, Eina_List *screens)
{
- E_FREE_LIST(e_comp_screen->e_screens, _e_comp_screen_e_screen_free);
- e_comp_screen->e_screens = screens;
+ E_FREE_LIST(comp_screen->e_screens, _e_comp_screen_e_screen_free);
+ comp_screen->e_screens = screens;
}
static Eina_Bool
#endif
static const Eina_List *
-_e_comp_screen_e_screens_get(E_Comp_Screen *e_comp_screen)
+_e_comp_screen_e_screens_get(E_Comp_Screen *comp_screen)
{
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(comp_screen, NULL);
- return e_comp_screen->e_screens;
+ return comp_screen->e_screens;
}
static void
}
static void
-_e_comp_screen_e_screens_setup(E_Comp_Screen *e_comp_screen, int rw, int rh)
+_e_comp_screen_e_screens_setup(E_Comp_Screen *comp_screen, int rw, int rh)
{
E_Screen *screen;
E_Output *primary_output, *output;
i++;
}
- _e_comp_screen_e_screens_set(e_comp_screen, e_screens);
+ _e_comp_screen_e_screens_set(comp_screen, e_screens);
ecore_event_add(E_EVENT_SCREEN_CHANGE, NULL, NULL, NULL);
- ELOGF("COMP_SCREEN","_e_comp_screen_e_screens_setup............... %i %p\n", NULL, i, e_comp_screen->e_screens);
+ ELOGF("COMP_SCREEN","_e_comp_screen_e_screens_setup............... %i %p\n", NULL, i, comp_screen->e_screens);
return;
out:
screen->w = rw, screen->h = rh;
else
{
- if (e_comp_screen->rotation % 180)
+ if (comp_screen->rotation % 180)
ecore_evas_geometry_get(e_comp_ee_get(), NULL, NULL, &screen->h, &screen->w);
else
ecore_evas_geometry_get(e_comp_ee_get(), NULL, NULL, &screen->w, &screen->h);
ELOGF("COMP_SCREEN","E INIT: SCREEN: No Physical Screen : [%i][%i], %ix%i+%i+%i",
NULL, i, i, screen->w, screen->h, screen->x, screen->y);
- _e_comp_screen_e_screens_set(e_comp_screen, e_screens);
+ _e_comp_screen_e_screens_set(comp_screen, e_screens);
}
static void
}
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_comp_screen_rotation_set(E_Comp_Screen *comp_screen, int screen_rotation,
+ void (*setter)(E_Comp_Screen *comp_screen, int data), int data)
{
E_Output *primary_output = NULL;
E_Input_Device *dev;
if (!e_output_rotate(primary_output, screen_rotation))
return EINA_FALSE;
- e_comp_screen->rotation = screen_rotation;
+ comp_screen->rotation = screen_rotation;
if (setter)
- setter(e_comp_screen, data);
+ setter(comp_screen, data);
comp = e_comp_get();
- ecore_evas_rotation_with_resize_set(comp->ee, e_comp_screen->rotation);
+ ecore_evas_rotation_with_resize_set(comp->ee, comp_screen->rotation);
ecore_evas_geometry_get(comp->ee, NULL, NULL, &w, &h);
/* rendering forcely to prepare HWC */
EINA_LIST_FOREACH(e_input_devices_get(), l, dev)
{
- e_input_device_touch_rotation_set(dev, e_comp_screen->rotation);
- e_input_device_rotation_set(dev, e_comp_screen->rotation);
+ e_input_device_touch_rotation_set(dev, comp_screen->rotation);
+ e_input_device_rotation_set(dev, comp_screen->rotation);
- ELOGF("COMP_SCREEN","EE Input Device Rotate: %d", NULL, e_comp_screen->rotation);
+ ELOGF("COMP_SCREEN","EE Input Device Rotate: %d", NULL, comp_screen->rotation);
}
if (e_comp_screen_iface)
{
- eldbus_service_signal_emit(e_comp_screen_iface, E_COMP_SCREEN_SIGNAL_ROTATION_CHANGED, e_comp_screen->rotation);
- ELOGF("COMP_SCREEN", "screen-rotation sends signal: %d", NULL, e_comp_screen->rotation);
+ eldbus_service_signal_emit(e_comp_screen_iface, E_COMP_SCREEN_SIGNAL_ROTATION_CHANGED, comp_screen->rotation);
+ ELOGF("COMP_SCREEN", "screen-rotation sends signal: %d", NULL, comp_screen->rotation);
}
- ELOGF("COMP_SCREEN","EE Rotated and Resized: %d, %dx%d", NULL, e_comp_screen->rotation, w, h);
+ ELOGF("COMP_SCREEN","EE Rotated and Resized: %d, %dx%d", NULL, comp_screen->rotation, w, h);
return EINA_TRUE;
}
static void
-_e_comp_screen_rotation_pre_setter(E_Comp_Screen *e_comp_screen, int rotation_pre)
+_e_comp_screen_rotation_pre_setter(E_Comp_Screen *comp_screen, int rotation_pre)
{
- e_comp_screen->rotation_pre = rotation_pre;
+ comp_screen->rotation_pre = rotation_pre;
ELOGF("COMP_SCREEN","EE RotationPre: %d", NULL, rotation_pre);
}
static void
-_e_comp_screen_rotation_setting_setter(E_Comp_Screen *e_comp_screen, int rotation)
+_e_comp_screen_rotation_setting_setter(E_Comp_Screen *comp_screen, int rotation)
{
- e_comp_screen->rotation_setting = rotation;
+ comp_screen->rotation_setting = rotation;
ELOGF("COMP_SCREEN","EE RotationSetting: %d", NULL, rotation);
}
{
E_Comp *comp;
E_Comp_Wl_Data *comp_wl;
- E_Comp_Screen *e_comp_screen;
+ E_Comp_Screen *comp_screen;
int ptr_x = 0, ptr_y = 0;
int screen_rotation;
comp = e_comp_get();
EINA_SAFETY_ON_NULL_RETURN_VAL(comp, EINA_FALSE);
- /* e_comp_screen new */
+ /* comp_screen new */
e_main_ts_begin("\tE_Comp_Screen New");
- e_comp_screen = _e_comp_screen_new();
- if (!e_comp_screen)
+ comp_screen = _e_comp_screen_new();
+ if (!comp_screen)
{
e_main_ts_end("\tE_Comp_Screen New Failed");
- e_error_message_show(_("Enlightenment cannot create e_comp_screen!\n"));
+ e_error_message_show(_("Enlightenment cannot create comp_screen!\n"));
return EINA_FALSE;
}
e_main_ts_end("\tE_Comp_Screen New Done");
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;
+ comp_screen->rotation_pre = e_config->screen_rotation_pre;
+ comp_screen->rotation_setting = e_config->screen_rotation_setting;
+ comp_screen->rotation = screen_rotation;
e_main_ts_begin("\te_display_init");
if (!e_display_init())
// Decide the size of Comp Screen and Get the Memory from E_Display
e_comp_screen_size_update(e_comp_screen_get());
- e_comp_screen->num_outputs = e_display_num_outputs_get();
- e_comp_screen->outputs = e_display_outputs_get();
+ comp_screen->num_outputs = e_display_num_outputs_get();
+ comp_screen->outputs = e_display_outputs_get();
if (e_comp_hwc_is_configured() && e_comp_conf_hwc_deactive_get())
e_comp_hwc_deactive_set(EINA_TRUE);
/* tbm bufmgr init */
e_main_ts_begin("\tTBM Bufmgr Server Init");
- e_comp_screen->bufmgr = tbm_bufmgr_server_init();
- if (!e_comp_screen->bufmgr)
+ comp_screen->bufmgr = tbm_bufmgr_server_init();
+ if (!comp_screen->bufmgr)
{
e_main_ts_end("\tTBM Bufmgr Server Init Failed");
ERR("tbm_bufmgr_init failed\n");
/* canvas */
e_main_ts_begin("\tE_Comp_Canvas Init");
- if (!e_comp_canvas_init(e_comp_screen))
+ if (!e_comp_canvas_init(comp_screen))
{
e_main_ts_end("\tE_Comp_Canvas Init Failed");
e_error_message_show(_("Enlightenment cannot initialize outputs!\n"));
}
e_main_ts_end("\tE_Comp_Canvas Init Done");
- _e_comp_screen_e_screens_setup(e_comp_screen, -1, -1);
+ _e_comp_screen_e_screens_setup(comp_screen, -1, -1);
/* update the screen, outputs and planes at the idle enterer of the ecore_loop */
ecore_idle_enterer_add(_e_comp_screen_commit_idle_cb, comp);
e_main_ts_end("\tE_Server Init Done");
comp_wl = e_comp_wl_get();
- e_comp_screen->wl_display = comp_wl->wl.disp;
+ comp_screen->wl_display = comp_wl->wl.disp;
if (e_comp_gl_get())
- _e_comp_screen_gl_init(e_comp_screen);
+ _e_comp_screen_gl_init(comp_screen);
/* e_comp_screen_setup */
if (!_e_comp_screen_screen_policy_setup())
E_OUTPUT_HOOK_APPEND(output_hooks, E_OUTPUT_HOOK_CONNECT_STATUS_CHANGE, _e_comp_screen_cb_output_connect_status_change, comp);
E_OUTPUT_HOOK_APPEND(output_hooks, E_OUTPUT_HOOK_MODE_CHANGE, _e_comp_screen_cb_output_mode_change, comp);
- e_comp_screen = e_comp_screen_get();
- if (e_comp_screen)
- _e_comp_screen_input_rotation_set(e_comp_screen->rotation);
+ comp_screen = e_comp_screen_get();
+ if (comp_screen)
+ _e_comp_screen_input_rotation_set(comp_screen->rotation);
ecore_evas_callback_resize_set(comp->ee, _e_comp_screen_canvas_resize);
failed_policy_setup:
//TODO:FIXME: deal with removing the resource during policy_setup
- _e_comp_screen_gl_shutdown(e_comp_screen);
+ _e_comp_screen_gl_shutdown(comp_screen);
e_server_shutdown();
failed_server:
e_input_shutdown();
failed_input:
e_comp_canvas_clear();
failed_comp_canvas:
- if (e_comp_screen->bufmgr)
- tbm_bufmgr_deinit(e_comp_screen->bufmgr);
+ if (comp_screen->bufmgr)
+ tbm_bufmgr_deinit(comp_screen->bufmgr);
failed_tbm_bufmgr:
e_display_shutdown();
failed_display:
- _e_comp_screen_del(e_comp_screen);
+ _e_comp_screen_del(comp_screen);
return EINA_FALSE;
}
EINTERN void
e_comp_screen_shutdown()
{
- E_Comp_Screen *e_comp_screen = e_comp_screen_get();
- if (!e_comp_screen) return;
+ E_Comp_Screen *comp_screen = e_comp_screen_get();
+ if (!comp_screen) return;
- _e_comp_screen_gl_shutdown(e_comp_screen);
+ _e_comp_screen_gl_shutdown(comp_screen);
if (e_comp_screen_iface)
{
e_comp_canvas_clear();
- if (e_comp_screen->bufmgr) tbm_bufmgr_deinit(e_comp_screen->bufmgr);
+ if (comp_screen->bufmgr) tbm_bufmgr_deinit(comp_screen->bufmgr);
e_server_shutdown();
e_input_shutdown();
/* delete e_comp_sreen */
- _e_comp_screen_del(e_comp_screen);
+ _e_comp_screen_del(comp_screen);
e_comp_screen_set(NULL);
}
EINTERN Eina_Bool
-e_comp_screen_rotation_pre_set(E_Comp_Screen *e_comp_screen, int rotation_pre)
+e_comp_screen_rotation_pre_set(E_Comp_Screen *comp_screen, int rotation_pre)
{
int screen_rotation;
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(comp_screen, EINA_FALSE);
EINA_SAFETY_ON_TRUE_RETURN_VAL(rotation_pre % 90, EINA_FALSE);
EINA_SAFETY_ON_TRUE_RETURN_VAL(rotation_pre < 0, EINA_FALSE);
EINA_SAFETY_ON_TRUE_RETURN_VAL(rotation_pre > 270, EINA_FALSE);
- if (e_comp_screen->rotation_pre == rotation_pre) return EINA_TRUE;
+ if (comp_screen->rotation_pre == rotation_pre) return EINA_TRUE;
- screen_rotation = (rotation_pre + e_comp_screen->rotation_setting) % 360;
+ screen_rotation = (rotation_pre + comp_screen->rotation_setting) % 360;
- return _e_comp_screen_rotation_set(e_comp_screen, screen_rotation,
+ return _e_comp_screen_rotation_set(comp_screen, screen_rotation,
_e_comp_screen_rotation_pre_setter, rotation_pre);
}
E_API Eina_Bool
-e_comp_screen_rotation_setting_set(E_Comp_Screen *e_comp_screen, int rotation)
+e_comp_screen_rotation_setting_set(E_Comp_Screen *comp_screen, int rotation)
{
int screen_rotation;
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(comp_screen, EINA_FALSE);
EINA_SAFETY_ON_TRUE_RETURN_VAL(rotation % 90, EINA_FALSE);
EINA_SAFETY_ON_TRUE_RETURN_VAL(rotation < 0, EINA_FALSE);
EINA_SAFETY_ON_TRUE_RETURN_VAL(rotation > 270, EINA_FALSE);
- if (e_comp_screen->rotation_setting == rotation) return EINA_TRUE;
+ if (comp_screen->rotation_setting == rotation) return EINA_TRUE;
- screen_rotation = (e_comp_screen->rotation_pre + rotation) % 360;
+ screen_rotation = (comp_screen->rotation_pre + rotation) % 360;
- return _e_comp_screen_rotation_set(e_comp_screen, screen_rotation,
+ return _e_comp_screen_rotation_set(comp_screen, screen_rotation,
_e_comp_screen_rotation_setting_setter, rotation);
}
}
EINTERN Eina_Bool
-e_comp_screen_size_get(E_Comp_Screen *e_comp_screen, int *w, int *h)
+e_comp_screen_size_get(E_Comp_Screen *comp_screen, int *w, int *h)
{
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(comp_screen, EINA_FALSE);
- if (w) *w = e_comp_screen->w;
- if (h) *h = e_comp_screen->h;
+ if (w) *w = comp_screen->w;
+ if (h) *h = comp_screen->h;
return EINA_TRUE;
}
E_API Eina_List *
-e_comp_screen_outputs_get(E_Comp_Screen *e_comp_screen)
+e_comp_screen_outputs_get(E_Comp_Screen *comp_screen)
{
- EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_screen, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(comp_screen, NULL);
return e_display_outputs_get();
}