From b9cfd40d872ddc4b2d78f4e59f46f57d27fac74f Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 30 Sep 2019 20:11:01 +0200 Subject: [PATCH] cullable: Take geometry scale into account Similar like how we scale the opaque region by the geometry scale, we need to take it into account when checking the size of the actor. This enables culling of scaled actors with non-fractional scaling. https://gitlab.gnome.org/GNOME/mutter/merge_requests/712 --- src/compositor/clutter-utils.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/compositor/clutter-utils.c b/src/compositor/clutter-utils.c index cfa35aaf930..0644ac4308c 100644 --- a/src/compositor/clutter-utils.c +++ b/src/compositor/clutter-utils.c @@ -22,6 +22,7 @@ #include "config.h" #include "compositor/clutter-utils.h" +#include "compositor/meta-window-actor-private.h" #include @@ -118,12 +119,23 @@ meta_actor_is_untransformed (ClutterActor *actor, int *x_origin, int *y_origin) { + MetaWindowActor *window_actor; gfloat widthf, heightf; ClutterVertex verts[4]; clutter_actor_get_size (actor, &widthf, &heightf); clutter_actor_get_abs_allocation_vertices (actor, verts); + window_actor = meta_window_actor_from_actor (actor); + if (window_actor) + { + int geometry_scale; + + geometry_scale = meta_window_actor_get_geometry_scale (window_actor); + widthf *= geometry_scale; + heightf *= geometry_scale; + } + return meta_actor_vertices_are_untransformed (verts, widthf, heightf, x_origin, y_origin); } -- GitLab