mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 06:08:05 +02:00
pixman-renderer: Use pnode precalculated region for clipped draw
Instead of using the surface rectangle and the view scissor, make a union of the blend/opaque regions from the pnode. This is probably measurably more math in cases with freeform window rotations, but it helps us get weston_view out of the renderer. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
7ed55f8390
commit
c91d312b32
1 changed files with 4 additions and 6 deletions
|
|
@ -394,7 +394,6 @@ draw_node_source_clipped(struct weston_paint_node *pnode,
|
|||
{
|
||||
struct weston_surface *surface = pnode->surface;
|
||||
struct weston_output *output = pnode->output;
|
||||
struct weston_view *view = pnode->view;
|
||||
pixman_region32_t surf_region;
|
||||
pixman_region32_t buffer_region;
|
||||
pixman_region32_t repaint_output;
|
||||
|
|
@ -404,11 +403,10 @@ draw_node_source_clipped(struct weston_paint_node *pnode,
|
|||
* opaque separately has no benefit.
|
||||
*/
|
||||
|
||||
pixman_region32_init_rect(&surf_region, 0, 0,
|
||||
surface->width, surface->height);
|
||||
if (view->geometry.scissor_enabled)
|
||||
pixman_region32_intersect(&surf_region, &surf_region,
|
||||
&view->geometry.scissor);
|
||||
pixman_region32_init(&surf_region);
|
||||
pixman_region32_union(&surf_region,
|
||||
&pnode->surface_opaque,
|
||||
&pnode->surface_blend);
|
||||
|
||||
pixman_region32_init(&buffer_region);
|
||||
weston_surface_to_buffer_region(surface, &surf_region, &buffer_region);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue