vo_wayland: define opaque region

This allows compositor to optimize rendering, as it will know mpv is not
transparent.
This commit is contained in:
Jari Vetoniemi
2015-03-23 21:53:32 +01:00
committed by wm4
parent 3714430cdf
commit c10fb4ce9f
+9
View File
@@ -795,6 +795,15 @@ static void schedule_resize(struct vo_wayland_state *wl,
wl->window.events |= VO_EVENT_RESIZE;
wl->vo->dwidth = width;
wl->vo->dheight = height;
struct wl_region *region = wl_compositor_create_region(wl->display.compositor);
if (region) {
wl_region_add(region, x, y, width, height);
wl_surface_set_opaque_region(wl->window.video_surface, region);
wl_surface_commit(wl->window.video_surface);
wl_region_destroy(region);
}
}
static void frame_callback(void *data,