mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	scene: remove redundant empty-region check in render_texture()
This commit is contained in:
		
							parent
							
								
									e2e68ff680
								
							
						
					
					
						commit
						00c2bae1d3
					
				
					 1 changed files with 7 additions and 7 deletions
				
			
		| 
						 | 
					@ -327,14 +327,14 @@ static void render_texture(struct wlr_output *output,
 | 
				
			||||||
	pixman_region32_init(&damage);
 | 
						pixman_region32_init(&damage);
 | 
				
			||||||
	pixman_region32_init_rect(&damage, box->x, box->y, box->width, box->height);
 | 
						pixman_region32_init_rect(&damage, box->x, box->y, box->width, box->height);
 | 
				
			||||||
	pixman_region32_intersect(&damage, &damage, output_damage);
 | 
						pixman_region32_intersect(&damage, &damage, output_damage);
 | 
				
			||||||
	if (pixman_region32_not_empty(&damage)) {
 | 
					
 | 
				
			||||||
	int nrects;
 | 
						int nrects;
 | 
				
			||||||
	pixman_box32_t *rects = pixman_region32_rectangles(&damage, &nrects);
 | 
						pixman_box32_t *rects = pixman_region32_rectangles(&damage, &nrects);
 | 
				
			||||||
	for (int i = 0; i < nrects; ++i) {
 | 
						for (int i = 0; i < nrects; ++i) {
 | 
				
			||||||
		scissor_output(output, &rects[i]);
 | 
							scissor_output(output, &rects[i]);
 | 
				
			||||||
		wlr_render_texture_with_matrix(renderer, texture, matrix, 1.0);
 | 
							wlr_render_texture_with_matrix(renderer, texture, matrix, 1.0);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	}
 | 
					
 | 
				
			||||||
	pixman_region32_fini(&damage);
 | 
						pixman_region32_fini(&damage);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue