Handling subsurface rendering
Hi All,
I added masking as a custom function to weston. The code is roughly as follows:
/* XXX: Should we be using ev->transform.opaque here? */
pixman_region32_init(&surface_opaque); region:
if (ev->geometry.scissor_enabled)
pixman_region32_intersect(&surface_opaque, new_reg:
surface_opaque_src_ptr, reg1:
&ev->geometry.scissor); reg2:
else
pixman_region32_copy(&surface_opaque, surface_opaque_src_ptr); dest: source:
+ if (get_mask(ev)) {
+ pixman_region32_init_rect(&mask_region,
+ ev->mask_region.x + output->x, ev->mask_region.y + output->y,
+ ev->mask_region.width, ev->mask_region.height);
+ pixman_region32_subtract(&repaint, &repaint, &mask_region);
+ }
masking a specific area causes the final stage of rendering, draw_view(), to not draw the masked area. The feature works fine, but it doesn't apply to subsurface areas in weston-subsurfaces. So, after reading the documentation on the subsurface definition and doing some testing, I found that subsurfaces are rendered directly in the client regardless of sync/desync. Is there any way to handle this in the rendering client, rather than in the final draw_view()?
Edited by Jun