add conditional updates for latest efl apis

ref dc2bad0fcd
This commit is contained in:
Mike Blumenkrantz 2017-02-03 15:29:38 -05:00
parent 17e66ed2b5
commit 72bfd182d1
2 changed files with 29 additions and 4 deletions

View File

@ -488,7 +488,17 @@ _e_alert_drm_display(void)
updates = evas_render_updates(canvas);
evas_render_updates_free(updates);
ecore_drm2_fb_flip(buffer, output, NULL);
#ifdef EFL_VERSION_1_19
ecore_drm2_fb_flip(buffer, output);
#else
if (E_EFL_VERSION_MINIMUM(1, 18, 99))
{
void (*fn)(void*, void*) = dlsym(NULL, "ecore_drm2_fb_flip");
if (fn) fn(buffer, output);
}
else
ecore_drm2_fb_flip(buffer, output, NULL);
#endif
}
static void

View File

@ -798,12 +798,27 @@ _drm2_read_pixels(E_Comp_Wl_Output *output, void *pixels)
out = ecore_drm2_output_find(dev, output->x, output->y);
if (!out) return;
fb = ecore_drm2_output_next_fb_get(out);
if (!fb)
#ifdef EFL_VERSION_1_19
fb = ecore_drm2_output_latest_fb_get(out);
if (!fb) return;
#else
if (E_EFL_VERSION_MINIMUM(1, 18, 99))
{
fb = ecore_drm2_output_current_fb_get(out);
void *(*fn)(void*) = dlsym(NULL, "ecore_drm2_output_latest_fb_get");
if (!fn) return;
fb = fn(out);
if (!fb) return;
}
else
{
fb = ecore_drm2_output_next_fb_get(out);
if (!fb)
{
fb = ecore_drm2_output_current_fb_get(out);
if (!fb) return;
}
}
#endif
data = ecore_drm2_fb_data_get(fb);
fstride = ecore_drm2_fb_stride_get(fb);