Summary:
This patch implements engine support for outbuf_damage_region_set that
we can use to mark a framebuffer as being dirty, and to set the dirty
regions on that framebuffer.
ref T7690
Depends on D8403
Reviewers: raster, cedric, zmike
Subscribers: #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7690
Differential Revision: https://phab.enlightenment.org/D8404
_outbuf_rotation_get,
_outbuf_reconfigure,
NULL,
- NULL,
+ _outbuf_damage_region_set,
_outbuf_update_region_new,
_outbuf_update_region_push,
NULL,
void *_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
void _outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h);
void _outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer_damage, Evas_Render_Mode render_mode);
+void _outbuf_damage_region_set(Outbuf *ob, Tilebuf_Rect *damage);
#endif
_outbuf_buffer_swap(ob);
}
+
+void
+_outbuf_damage_region_set(Outbuf *ob, Tilebuf_Rect *damage)
+{
+ Tilebuf_Rect *tr;
+ Eina_Rectangle *rects;
+ Ecore_Drm2_Fb *fb;
+ int count, i = 0;
+
+ if (!ob->priv.draw) return;
+
+ fb = ob->priv.draw->fb;
+
+ count = eina_inlist_count(EINA_INLIST_GET(damage));
+ rects = alloca(count * sizeof(Eina_Rectangle));
+
+ EINA_INLIST_FOREACH(damage, tr)
+ {
+ rects[i].x = tr->x;
+ rects[i].y = tr->y;
+ rects[i].w = tr->w;
+ rects[i].h = tr->h;
+ i++;
+ }
+
+ ecore_drm2_fb_dirty(fb, rects, count);
+}