mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
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>
This commit is contained in:
parent
906124b09f
commit
0da8a49719
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user