diff options
author | Jonas Dreßler <verdre@v0yd.nl> | 2020-11-16 20:52:32 +0100 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2020-11-24 18:30:19 +0000 |
commit | 0da8a49719feb26256f9c1d27deaed420e776bcf (patch) | |
tree | 00b5503ccd62b166abbcaccc6a1556c615616521 | |
parent | 906124b09fe712a25907ac444f173f93ad3e7951 (diff) | |
download | mutter-0da8a49719feb26256f9c1d27deaed420e776bcf.tar.gz |
clutter/stage: Clarify comments in add_to_stage_clip() a bit
The first comment isn't really needed anymore since
the is_full_stage_redraw_queued() underneath is quite self-explaining.
Also rephrase the second comment a bit, including that
_clutter_paint_volume_get_stage_paint_box() does the aligning to the
pixel grid.
Finally, the last comment also looks out of date since we do that
rounding inside _clutter_paint_volume_get_stage_paint_box(), so remove
it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1511>
-rw-r--r-- | clutter/clutter/clutter-stage.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c index d9191c0a2..430233534 100644 --- a/clutter/clutter/clutter-stage.c +++ b/clutter/clutter/clutter-stage.c @@ -2817,9 +2817,6 @@ add_to_stage_clip (ClutterStage *stage, if (CLUTTER_ACTOR_IN_DESTRUCTION (CLUTTER_ACTOR (stage))) return; - /* If the backend can't do anything with redraw clips (e.g. it already knows - * it needs to redraw everything anyway) then don't spend time transforming - * any clip volume into stage coordinates... */ stage_window = _clutter_stage_get_window (stage); if (stage_window == NULL) return; @@ -2836,8 +2833,9 @@ add_to_stage_clip (ClutterStage *stage, if (redraw_clip->is_empty) return; - /* Convert the clip volume into stage coordinates and then into an - * axis aligned stage coordinates bounding box... */ + /* Now transform and project the clip volume to view coordinates and get + * the axis aligned bounding box that's aligned to the pixel grid. + */ _clutter_paint_volume_get_stage_paint_box (redraw_clip, stage, &bounding_box); @@ -2854,8 +2852,6 @@ add_to_stage_clip (ClutterStage *stage, intersection_box.y2 <= intersection_box.y1) return; - /* when converting to integer coordinates make sure we round the edges of the - * clip rectangle outwards... */ stage_clip.x = intersection_box.x1; stage_clip.y = intersection_box.y1; stage_clip.width = intersection_box.x2 - stage_clip.x; |