wl_drm: Add short block to mark setup for drm egl rendering
authorChris Michael <cp.michael@samsung.com>
Wed, 16 Jul 2014 19:38:40 +0000 (15:38 -0400)
committerChris Michael <cp.michael@samsung.com>
Tue, 26 Aug 2014 14:10:38 +0000 (10:10 -0400)
When the new drm hw accel engine is ready, we can replace this little
bit of code and have hardware-accelerated drm.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/wl_drm/e_mod_main.c

index 1bf5b9d..31a7d13 100644 (file)
@@ -24,7 +24,18 @@ e_modapi_init(E_Module *m)
 
    comp = e_comp_new();
    comp->comp_type = E_PIXMAP_TYPE_WL;
-   comp->ee = ecore_evas_drm_new(NULL, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+
+   if ((e_comp_gl_get()) && 
+       (e_comp_config_get()->engine == E_COMP_ENGINE_GL))
+     {
+        /* TOOD: create ecore_evas for new drm gl backend */
+        /* NB: If that fails, call e_comp_gl_set(EINA_FALSE) */
+     }
+
+   /* fallback to framebuffer drm (non-accel) */
+   if (!comp->ee)
+     comp->ee = ecore_evas_drm_new(NULL, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+
    if (!comp->ee)
      {
         fprintf(stderr, "Could not create ecore_evas_drm canvas");