new glx: implement fill for monitor-repaint

Refine the API of fill_rectangle and rename it to fill.

Extras:

Keep GL_BLEND enabled; Fixed some texture/fbo leaks

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-03-10 01:51:21 +00:00
parent 48338a9903
commit 34254ff86e
7 changed files with 48 additions and 50 deletions

View File

@ -244,10 +244,8 @@ void paint_all_new(session_t *ps, win *const t, bool ignore_damage) {
if (ps->o.monitor_repaint) {
reg_damage = get_damage(ps, false);
auto extent = pixman_region32_extents(&reg_damage);
ps->backend_data->ops->fill_rectangle(
ps->backend_data, 0.5, 0, 0, 0.5, extent->x1, extent->y1,
extent->x2 - extent->x1, extent->y2 - extent->y1, &reg_damage);
ps->backend_data->ops->fill(
ps->backend_data, 0.5, 0, 0, 0.5, &reg_damage);
pixman_region32_fini(&reg_damage);
}