[mutter/gbsneto/graphene-frustrum: 2/4] clutter/actor: Remove region culling




commit a63fbe10ec5677bc6fe2cd1e21b9c3f56bd8bded
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Oct 10 11:24:10 2020 -0300

    clutter/actor: Remove region culling
    
    We can trust the clip frusta array to encode this information now.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489

 clutter/clutter/clutter-actor.c | 38 --------------------------------------
 1 file changed, 38 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 6ac478d7a0..f4b8b61780 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -3491,44 +3491,6 @@ cull_actor (ClutterActor        *self,
         break;
     }
 
-  if (result != CLUTTER_CULL_RESULT_OUT)
-    {
-      const cairo_region_t *redraw_clip;
-
-      redraw_clip = clutter_paint_context_get_redraw_clip (paint_context);
-      if (redraw_clip)
-        {
-          ClutterActorBox paint_box;
-          cairo_rectangle_int_t paint_box_bounds;
-          cairo_region_overlap_t overlap;
-          ClutterStage *stage;
-
-          stage = (ClutterStage *) _clutter_actor_get_stage_internal (self);
-
-          _clutter_paint_volume_get_stage_paint_box (&priv->last_paint_volume,
-                                                     stage,
-                                                     &paint_box);
-
-          paint_box_bounds.x = floorf (paint_box.x1);
-          paint_box_bounds.y = floorf (paint_box.y1);
-          paint_box_bounds.width = ceilf (paint_box.x2 - paint_box_bounds.x);
-          paint_box_bounds.height = ceilf (paint_box.y2 - paint_box_bounds.y);
-
-          overlap = cairo_region_contains_rectangle (redraw_clip,
-                                                     &paint_box_bounds);
-          switch (overlap)
-            {
-            case CAIRO_REGION_OVERLAP_IN:
-            case CAIRO_REGION_OVERLAP_PART:
-              result = CLUTTER_CULL_RESULT_IN;
-              break;
-            case CAIRO_REGION_OVERLAP_OUT:
-              result = CLUTTER_CULL_RESULT_OUT;
-              break;
-            }
-        }
-    }
-
   *result_out = result;
 
   return TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]