summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-03-21 14:14:57 -0400
committerChristopher Michael <cp.michael@samsung.com>2019-03-22 12:42:39 -0400
commit0d63743be9041c93c907eae9480beedeede83d72 (patch)
treed7c2e2922928f21c0eb2deb9086e6e7e07e352e0
parent3dfec81be1d1482ab88ae8730631acfa4ef85eee (diff)
evas drm: Implement support for outbuf_idle_flush
-rw-r--r--src/modules/evas/engines/drm/evas_engine.h1
-rw-r--r--src/modules/evas/engines/drm/evas_outbuf.c26
2 files changed, 24 insertions, 3 deletions
diff --git a/src/modules/evas/engines/drm/evas_engine.h b/src/modules/evas/engines/drm/evas_engine.h
index 85e16caf1a..0afb1e3109 100644
--- a/src/modules/evas/engines/drm/evas_engine.h
+++ b/src/modules/evas/engines/drm/evas_engine.h
@@ -83,5 +83,6 @@ void *_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx,
83void _outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); 83void _outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h);
84void _outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer_damage, Evas_Render_Mode render_mode); 84void _outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer_damage, Evas_Render_Mode render_mode);
85void _outbuf_damage_region_set(Outbuf *ob, Tilebuf_Rect *damage); 85void _outbuf_damage_region_set(Outbuf *ob, Tilebuf_Rect *damage);
86void _outbuf_idle_flush(Outbuf *ob);
86 87
87#endif 88#endif
diff --git a/src/modules/evas/engines/drm/evas_outbuf.c b/src/modules/evas/engines/drm/evas_outbuf.c
index e30175f10e..1f22ae7faa 100644
--- a/src/modules/evas/engines/drm/evas_outbuf.c
+++ b/src/modules/evas/engines/drm/evas_outbuf.c
@@ -273,8 +273,6 @@ _outbuf_reconfigure(Outbuf *ob, int w, int h, int rotation, Outbuf_Depth depth)
273 (ob->depth == depth) && (ob->format == format)) 273 (ob->depth == depth) && (ob->format == format))
274 return; 274 return;
275 275
276 while (ecore_drm2_fb_release(ob->priv.output, EINA_TRUE));
277
278 ob->w = w; 276 ob->w = w;
279 ob->h = h; 277 ob->h = h;
280 ob->depth = depth; 278 ob->depth = depth;
@@ -282,7 +280,7 @@ _outbuf_reconfigure(Outbuf *ob, int w, int h, int rotation, Outbuf_Depth depth)
282 ob->rotation = rotation; 280 ob->rotation = rotation;
283 ob->priv.unused_duration = 0; 281 ob->priv.unused_duration = 0;
284 282
285 /* TODO: idle flush */ 283 _outbuf_idle_flush(ob);
286} 284}
287 285
288Render_Output_Swap_Mode 286Render_Output_Swap_Mode
@@ -572,3 +570,25 @@ _outbuf_damage_region_set(Outbuf *ob, Tilebuf_Rect *damage)
572 570
573 ecore_drm2_fb_dirty(fb, rects, count); 571 ecore_drm2_fb_dirty(fb, rects, count);
574} 572}
573
574void
575_outbuf_idle_flush(Outbuf *ob)
576{
577 while (ob->priv.pending)
578 {
579 RGBA_Image *img;
580 Eina_Rectangle *rect;
581
582 img = ob->priv.pending->data;
583 ob->priv.pending =
584 eina_list_remove_list(ob->priv.pending, ob->priv.pending);
585
586 rect = img->extended_info;
587
588 evas_cache_image_drop(&img->cache_entry);
589
590 eina_rectangle_free(rect);
591 }
592
593 while (ecore_drm2_fb_release(ob->priv.output, EINA_TRUE));
594}