compositor: Fix opaque regions
Commit 0e4f097d
broke opaque regions, and since then weston will waste
time rendering occluded areas.
I think this is because we're taking the intersection of the opaque
and scissor regions even when the scissor region isn't enabled.
An easy test is to turn on triangle fan debugging with the gl renderer,
then run weston-simple-damage and move another opaque application such as
weston-terminal over it.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
349252788f
commit
713f02327d
@ -1522,6 +1522,7 @@ weston_view_update_transform_disable(struct weston_view *view)
|
||||
if (view->alpha == 1.0) {
|
||||
pixman_region32_copy(&view->transform.opaque,
|
||||
&view->surface->opaque);
|
||||
if (view->geometry.scissor_enabled)
|
||||
pixman_region32_intersect(&view->transform.opaque,
|
||||
&view->transform.opaque,
|
||||
&view->geometry.scissor);
|
||||
@ -1576,6 +1577,7 @@ weston_view_update_transform_enable(struct weston_view *view)
|
||||
matrix->type == WESTON_MATRIX_TRANSFORM_TRANSLATE) {
|
||||
pixman_region32_copy(&view->transform.opaque,
|
||||
&view->surface->opaque);
|
||||
if (view->geometry.scissor_enabled)
|
||||
pixman_region32_intersect(&view->transform.opaque,
|
||||
&view->transform.opaque,
|
||||
&view->geometry.scissor);
|
||||
|
Loading…
Reference in New Issue
Block a user