stefan pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=318f2c435a8013e75c0e9804bfea6fbb223f07f4
commit 318f2c435a8013e75c0e9804bfea6fbb223f07f4 Author: Chris Michael <cp.mich...@samsung.com> Date: Tue Apr 7 10:49:45 2015 -0400 ecore-drm: Add width & height to Ecore_Drm_Fb structure Summary: This adds a w & h field to the Ecore_Drm_Fb structure so it can be used from within the Evas engine @fix Signed-off-by: Chris Michael <cp.mich...@samsung.com> --- src/lib/ecore_drm/Ecore_Drm.h | 1 + src/lib/ecore_drm/ecore_drm_fb.c | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h index 6378022..5c4dd8b 100644 --- a/src/lib/ecore_drm/Ecore_Drm.h +++ b/src/lib/ecore_drm/Ecore_Drm.h @@ -61,6 +61,7 @@ typedef struct _Ecore_Drm_Fb unsigned int stride, size; int fd; void *mmap; + int w, h; } Ecore_Drm_Fb; struct _Ecore_Drm_Device diff --git a/src/lib/ecore_drm/ecore_drm_fb.c b/src/lib/ecore_drm/ecore_drm_fb.c index 67641c9..2a48f25 100644 --- a/src/lib/ecore_drm/ecore_drm_fb.c +++ b/src/lib/ecore_drm/ecore_drm_fb.c @@ -15,7 +15,7 @@ /* TODO: DOXY !! */ static Eina_Bool -_ecore_drm_fb_create2(int fd, int w, int h, Ecore_Drm_Fb *fb) +_ecore_drm_fb_create2(int fd, Ecore_Drm_Fb *fb) { struct drm_mode_fb_cmd2 cmd; uint32_t hdls[4], pitches[4], offsets[4], fmt; @@ -31,8 +31,8 @@ _ecore_drm_fb_create2(int fd, int w, int h, Ecore_Drm_Fb *fb) memset(&cmd, 0, sizeof(struct drm_mode_fb_cmd2)); cmd.fb_id = 0; - cmd.width = w; - cmd.height = h; + cmd.width = fb->w; + cmd.height = fb->h; cmd.pixel_format = fmt; cmd.flags = 0; memcpy(cmd.handles, hdls, 4 * sizeof(hdls[0])); @@ -77,11 +77,13 @@ ecore_drm_fb_create(Ecore_Drm_Device *dev, int width, int height) fb->stride = carg.pitch; fb->size = carg.size; fb->fd = dev->drm.fd; + fb->w = width; + fb->h = height; - if (!_ecore_drm_fb_create2(dev->drm.fd, width, height, fb)) + if (!_ecore_drm_fb_create2(dev->drm.fd, fb)) { WRN("Could not add framebuffer2: %m"); - if (drmModeAddFB(dev->drm.fd, width, height, 24, 32, + if (drmModeAddFB(dev->drm.fd, fb->w, fb->h, 24, 32, fb->stride, fb->hdl, &fb->id)) { ERR("Could not add framebuffer: %m"); --