mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	scene: Use wlr_output_transformed_resolution
This commit is contained in:
		
							parent
							
								
									dd8f4913a4
								
							
						
					
					
						commit
						b8418b7b91
					
				
					 1 changed files with 3 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -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,
 | 
			
		||||
		const pixman_region32_t *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);
 | 
			
		||||
 | 
			
		||||
		struct wlr_output *output = scene_output->output;
 | 
			
		||||
		enum wl_output_transform 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_init(&frame_damage);
 | 
			
		||||
		wlr_region_transform(&frame_damage, region, transform, width, height);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue