Output transform not applied to damage by `DrmCompositor`
This can be tested in Anvil using Super+Shift+R to rotate the screen, then dragging around a terminal. Maybe FB_DAMAGE_CLIPS handling varies by GPU, but I see clearly incorrect results. The same issue occurs in cosmic-comp.
It seems renderer_damage in render_frame doesn't have the output transform applied. Neither render_frame, nor OutputDamageTracker::damage_output_internal applies the transform to the damage.
self.primary_plane_damage_bag
.add([output_geometry.to_logical(1).to_buffer(
1,
Transform::Normal,
&output_geometry.size.to_logical(1),
)]);
A transform could be applied here, but I don't know if RenderOutputResult.damage should already be transformed.
It does seem a bit odd that DrmCompositor would get a Physical rectangle, then call to_logical and to_buffer.
Not sure if this is relevant, but I'm pretty sure that damage is also not transformed correctly for the winit backend. You can see it with the debug tint, or if you use any transform other than Flipped180.