mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-25 08:32:30 +00:00
scene: Use wlr_output_transformed_resolution
This commit is contained in:
parent
dd8f4913a4
commit
b8418b7b91
@ -336,19 +336,15 @@ static void transform_output_box(struct wlr_box *box, const struct render_data *
|
|||||||
static void scene_output_damage(struct wlr_scene_output *scene_output,
|
static void scene_output_damage(struct wlr_scene_output *scene_output,
|
||||||
const pixman_region32_t *region) {
|
const pixman_region32_t *region) {
|
||||||
if (wlr_damage_ring_add(&scene_output->damage_ring, region)) {
|
if (wlr_damage_ring_add(&scene_output->damage_ring, region)) {
|
||||||
|
int width, height;
|
||||||
|
wlr_output_transformed_resolution(scene_output->output, &width, &height);
|
||||||
|
|
||||||
wlr_output_schedule_frame(scene_output->output);
|
wlr_output_schedule_frame(scene_output->output);
|
||||||
|
|
||||||
struct wlr_output *output = scene_output->output;
|
struct wlr_output *output = scene_output->output;
|
||||||
enum wl_output_transform transform =
|
enum wl_output_transform transform =
|
||||||
wlr_output_transform_invert(scene_output->output->transform);
|
wlr_output_transform_invert(scene_output->output->transform);
|
||||||
|
|
||||||
int width = output->width;
|
|
||||||
int height = output->height;
|
|
||||||
if (transform & WL_OUTPUT_TRANSFORM_90) {
|
|
||||||
width = output->height;
|
|
||||||
height = output->width;
|
|
||||||
}
|
|
||||||
|
|
||||||
pixman_region32_t frame_damage;
|
pixman_region32_t frame_damage;
|
||||||
pixman_region32_init(&frame_damage);
|
pixman_region32_init(&frame_damage);
|
||||||
wlr_region_transform(&frame_damage, region, transform, width, height);
|
wlr_region_transform(&frame_damage, region, transform, width, height);
|
||||||
|
Loading…
Reference in New Issue
Block a user