eng_outbuf_get_rot,
eng_outbuf_reconfigure,
eng_outbuf_region_first_rect,
+#ifdef GL_GLES
+ eng_outbuf_damage_region_set,
+#else
NULL,
+#endif
eng_outbuf_new_region_for_update,
eng_outbuf_push_updated_region,
eng_outbuf_push_free_region_for_update,
void eng_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth);
int eng_outbuf_get_rot(Outbuf *ob);
Render_Engine_Swap_Mode eng_outbuf_swap_mode(Outbuf *ob);
+#ifdef GL_GLES
+void eng_outbuf_damage_region_set(Outbuf *ob, Tilebuf_Rect *damage);
+#endif
Eina_Bool eng_outbuf_region_first_rect(Outbuf *ob);
void *eng_outbuf_new_region_for_update(Outbuf *ob,
int x, int y, int w, int h,
}
}
-static void
-_set_damage_rect(Outbuf *ob, int x, int y, int w, int h)
+void
+eng_outbuf_damage_region_set(Outbuf *ob, Tilebuf_Rect *damage)
{
- int rects[4];
-
- if ((x==0) && (y==0) &&
- (((w == ob->gl_context->w) && (h == ob->gl_context->h))
- || ((h == ob->gl_context->w) && (w == ob->gl_context->h))))
+ if (glsym_eglSetDamageRegionKHR)
{
- return;
- }
+ Tilebuf_Rect *tr;
+ int *rect, *rects, count;
- _convert_to_glcoords(rects, ob, x, y, w, h);
- glsym_eglSetDamageRegionKHR(ob->egl_disp, ob->egl_surface[0], rects, 1);
+ count = eina_inlist_count(EINA_INLIST_GET(damage));
+ rects = alloca(sizeof(int) * 4 * count);
+ rect = rects;
+ EINA_INLIST_FOREACH(damage, tr)
+ {
+ _convert_to_glcoords(rect, ob, tr->x, tr->y, tr->w, tr->h);
+ rect += 4;
+ }
+ glsym_eglSetDamageRegionKHR(ob->egl_disp, ob->egl_surface[0], rects, count);
+ }
}
#endif
ob->gl_context->master_clip.y = y;
ob->gl_context->master_clip.w = w;
ob->gl_context->master_clip.h = h;
-#ifdef GL_GLES
- if (glsym_eglSetDamageRegionKHR)
- _set_damage_rect(ob, x, y, w, h);
-#endif
}
return ob->gl_context->def_surface;
}