diff options
author | Srivardhan Hebbar <sri.hebbar@samsung.com> | 2014-10-30 09:33:55 -0400 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2014-10-30 09:36:21 -0400 |
commit | 399c571ab6c74efad9603d89dae8e947436ff6f4 (patch) | |
tree | 9d64417b6e720559950e326076266e8f531747be /src/lib/ecore_drm/ecore_drm_device.c | |
parent | 864394e7938e7d6389e40c458371bd548d0eb1a3 (diff) |
ecoreidrm: Cleaned up unwanted code.
Summary: Cleaned up all unwanted code's in ecore_drm. This just
removes a bunch of already commented out code.
@fix
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1615
Diffstat (limited to 'src/lib/ecore_drm/ecore_drm_device.c')
-rw-r--r-- | src/lib/ecore_drm/ecore_drm_device.c | 129 |
1 files changed, 0 insertions, 129 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_device.c b/src/lib/ecore_drm/ecore_drm_device.c index ff9a224c1d..e8ca0521fa 100644 --- a/src/lib/ecore_drm/ecore_drm_device.c +++ b/src/lib/ecore_drm/ecore_drm_device.c | |||
@@ -5,49 +5,6 @@ | |||
5 | #include "ecore_drm_private.h" | 5 | #include "ecore_drm_private.h" |
6 | #include <dlfcn.h> | 6 | #include <dlfcn.h> |
7 | 7 | ||
8 | /* #ifdef HAVE_GBM */ | ||
9 | /* static Eina_Bool */ | ||
10 | /* _ecore_drm_device_egl_config_get(Ecore_Drm_Device *dev, const EGLint *attribs, const EGLint *visual) */ | ||
11 | /* { */ | ||
12 | /* EGLint c = 0, m = 0; */ | ||
13 | /* EGLConfig *cfgs; */ | ||
14 | /* int i = 0; */ | ||
15 | |||
16 | /* if (!eglGetConfigs(dev->egl.disp, NULL, 0, &c) || (c < 1)) */ | ||
17 | /* return EINA_FALSE; */ | ||
18 | |||
19 | /* if (!(cfgs = calloc(c, sizeof(*cfgs)))) return EINA_FALSE; */ | ||
20 | |||
21 | /* if (!eglChooseConfig(dev->egl.disp, attribs, cfgs, c, &m)) */ | ||
22 | /* { */ | ||
23 | /* free(cfgs); */ | ||
24 | /* return EINA_FALSE; */ | ||
25 | /* } */ | ||
26 | |||
27 | /* for (i = 0; i < m; i++) */ | ||
28 | /* { */ | ||
29 | /* EGLint id; */ | ||
30 | |||
31 | /* if (visual) */ | ||
32 | /* { */ | ||
33 | /* if (!eglGetConfigAttrib(dev->egl.disp, cfgs[i], */ | ||
34 | /* EGL_NATIVE_VISUAL_ID, &id)) */ | ||
35 | /* continue; */ | ||
36 | |||
37 | /* if ((id != 0) && (id != *visual)) */ | ||
38 | /* continue; */ | ||
39 | /* } */ | ||
40 | |||
41 | /* dev->egl.cfg = cfgs[i]; */ | ||
42 | /* free(cfgs); */ | ||
43 | /* return EINA_TRUE; */ | ||
44 | /* } */ | ||
45 | |||
46 | /* free(cfgs); */ | ||
47 | /* return EINA_FALSE; */ | ||
48 | /* } */ | ||
49 | /* #endif */ | ||
50 | |||
51 | static void | 8 | static void |
52 | _ecore_drm_device_cb_page_flip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int sec EINA_UNUSED, unsigned int usec EINA_UNUSED, void *data) | 9 | _ecore_drm_device_cb_page_flip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int sec EINA_UNUSED, unsigned int usec EINA_UNUSED, void *data) |
53 | { | 10 | { |
@@ -322,76 +279,6 @@ ecore_drm_device_open(Ecore_Drm_Device *dev) | |||
322 | return EINA_FALSE; | 279 | return EINA_FALSE; |
323 | } | 280 | } |
324 | 281 | ||
325 | /* #ifdef HAVE_GBM */ | ||
326 | /* if (getenv("ECORE_DRM_HW_ACCEL")) */ | ||
327 | /* { */ | ||
328 | /* Typically, gbm loads the dri driver However some versions of Mesa | ||
329 | * do not have libglapi symbols linked in the driver. Because of this, | ||
330 | * using hardware accel for our drm code Could fail with a | ||
331 | * message that the driver could not load. Let's be proactive and | ||
332 | * work around this for the user by preloading the glapi library */ | ||
333 | /* dlopen("libglapi.so.0", (RTLD_LAZY | RTLD_GLOBAL)); */ | ||
334 | |||
335 | /* if ((dev->gbm = gbm_create_device(dev->drm.fd))) */ | ||
336 | /* { */ | ||
337 | /* EGLint major, minor, visual; */ | ||
338 | /* const EGLint attribs[] = */ | ||
339 | /* { */ | ||
340 | /* EGL_SURFACE_TYPE, EGL_WINDOW_BIT, */ | ||
341 | /* EGL_RED_SIZE, 1, EGL_GREEN_SIZE, 1, */ | ||
342 | /* EGL_BLUE_SIZE, 1, EGL_ALPHA_SIZE, 0, */ | ||
343 | /* EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NONE */ | ||
344 | /* }; */ | ||
345 | |||
346 | /* dev->use_hw_accel = EINA_TRUE; */ | ||
347 | /* dev->format = GBM_FORMAT_XRGB8888; */ | ||
348 | |||
349 | /* dev->egl.disp = eglGetDisplay(dev->gbm); */ | ||
350 | /* if (dev->egl.disp == EGL_NO_DISPLAY) */ | ||
351 | /* { */ | ||
352 | /* ERR("Could not get egl display"); */ | ||
353 | /* goto init_software; */ | ||
354 | /* } */ | ||
355 | |||
356 | /* if (!eglInitialize(dev->egl.disp, &major, &minor)) */ | ||
357 | /* { */ | ||
358 | /* ERR("Could not initialize egl"); */ | ||
359 | /* goto init_software; */ | ||
360 | /* } */ | ||
361 | |||
362 | /* visual = dev->format; */ | ||
363 | /* if (!_ecore_drm_device_egl_config_get(dev, attribs, &visual)) */ | ||
364 | /* { */ | ||
365 | /* ERR("Could not get egl config"); */ | ||
366 | /* goto init_software; */ | ||
367 | /* } */ | ||
368 | /* } */ | ||
369 | /* else */ | ||
370 | /* { */ | ||
371 | /* WRN("Failed to create gbm device"); */ | ||
372 | /* goto init_software; */ | ||
373 | /* } */ | ||
374 | /* } */ | ||
375 | /* else */ | ||
376 | /* #endif */ | ||
377 | /* { */ | ||
378 | /* TODO: init software */ | ||
379 | /* init_software: */ | ||
380 | /* DBG("Init Software Engine"); */ | ||
381 | /* #ifdef HAVE_GBM */ | ||
382 | /* if (dev->egl.disp) */ | ||
383 | /* { */ | ||
384 | /* eglMakeCurrent(dev->egl.disp, EGL_NO_SURFACE, EGL_NO_SURFACE, */ | ||
385 | /* EGL_NO_CONTEXT); */ | ||
386 | /* eglTerminate(dev->egl.disp); */ | ||
387 | /* eglReleaseThread(); */ | ||
388 | /* } */ | ||
389 | |||
390 | /* if (dev->gbm) gbm_device_destroy(dev->gbm); */ | ||
391 | /* dev->gbm = NULL; */ | ||
392 | /* #endif */ | ||
393 | /* } */ | ||
394 | |||
395 | /* try to create xkb context */ | 282 | /* try to create xkb context */ |
396 | if (!(dev->xkb_ctx = xkb_context_new(0))) | 283 | if (!(dev->xkb_ctx = xkb_context_new(0))) |
397 | { | 284 | { |
@@ -426,22 +313,6 @@ ecore_drm_device_close(Ecore_Drm_Device *dev) | |||
426 | /* check for valid device */ | 313 | /* check for valid device */ |
427 | if (!dev) return EINA_FALSE; | 314 | if (!dev) return EINA_FALSE; |
428 | 315 | ||
429 | /* #ifdef HAVE_GBM */ | ||
430 | /* if (dev->use_hw_accel) */ | ||
431 | /* { */ | ||
432 | /* if (dev->egl.disp) */ | ||
433 | /* { */ | ||
434 | /* eglMakeCurrent(dev->egl.disp, EGL_NO_SURFACE, EGL_NO_SURFACE, */ | ||
435 | /* EGL_NO_CONTEXT); */ | ||
436 | /* eglTerminate(dev->egl.disp); */ | ||
437 | /* eglReleaseThread(); */ | ||
438 | /* } */ | ||
439 | |||
440 | /* if (dev->gbm) gbm_device_destroy(dev->gbm); */ | ||
441 | /* dev->gbm = NULL; */ | ||
442 | /* } */ | ||
443 | /* #endif */ | ||
444 | |||
445 | /* close xkb context */ | 316 | /* close xkb context */ |
446 | if (dev->xkb_ctx) xkb_context_unref(dev->xkb_ctx); | 317 | if (dev->xkb_ctx) xkb_context_unref(dev->xkb_ctx); |
447 | 318 | ||