drm-ee: Use a plane for the evas

Assign a plane at startup and update it in flip.
This commit is contained in:
Derek Foreman 2017-04-28 15:49:17 -05:00
parent 27fc7d5f83
commit 769271a66a
2 changed files with 6 additions and 0 deletions

View File

@ -60,6 +60,7 @@ struct _Outbuf
int num;
Outbuf_Fb ofb[4], *draw;
Ecore_Drm2_Output *output;
Ecore_Drm2_Plane *plane;
Eina_List *pending;
Eina_Rectangle *rects;
unsigned int rect_count;

View File

@ -18,6 +18,11 @@ _outbuf_buffer_swap(Outbuf *ob, Eina_Rectangle *rects, unsigned int count)
if (!ofb) return;
ecore_drm2_fb_dirty(ofb->fb, rects, count);
if (!ob->priv.plane)
ob->priv.plane = ecore_drm2_plane_assign(ob->priv.output, ofb->fb);
else ecore_drm2_plane_fb_set(ob->priv.plane, ofb->fb);
ecore_drm2_fb_flip(ofb->fb, ob->priv.output);
ofb->drawn = EINA_TRUE;
ofb->age = 0;