gl-renderer: Use pnode is_opaque when drawing
We test if the surface is fully opaque during paint node updates, and store that information. Now that we've refactored the blended calculations a little bit, we can easily use this test to make paint_node->is_opaque override the blend calculation entirely. This is preparation for future patches that will override is_opaque when performing content censoring or fallback rendering of solid colors for weston_direct dmabufs. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
b80d4f4c8d
commit
8c26480c09
|
@ -1590,7 +1590,13 @@ draw_paint_node(struct weston_paint_node *pnode,
|
|||
goto out;
|
||||
|
||||
/* XXX: Should we be using ev->transform.opaque here? */
|
||||
pixman_region32_init(&surface_opaque);
|
||||
if (pnode->is_opaque)
|
||||
pixman_region32_init_rect(&surface_opaque, 0, 0,
|
||||
pnode->surface->width,
|
||||
pnode->surface->height);
|
||||
else
|
||||
pixman_region32_init(&surface_opaque);
|
||||
|
||||
if (pnode->view->geometry.scissor_enabled)
|
||||
pixman_region32_intersect(&surface_opaque,
|
||||
&pnode->surface->opaque,
|
||||
|
|
Loading…
Reference in New Issue