mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	backend/drm: error on size mismatch in drm_surface_blit
This commit is contained in:
		
							parent
							
								
									d3bcd63a40
								
							
						
					
					
						commit
						ad4dae0844
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -146,6 +146,12 @@ static struct wlr_buffer *drm_surface_blit(struct wlr_drm_surface *surf,
 | 
				
			||||||
		struct wlr_buffer *buffer) {
 | 
							struct wlr_buffer *buffer) {
 | 
				
			||||||
	struct wlr_renderer *renderer = surf->renderer->wlr_rend;
 | 
						struct wlr_renderer *renderer = surf->renderer->wlr_rend;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (surf->width != (uint32_t)buffer->width ||
 | 
				
			||||||
 | 
								surf->height != (uint32_t)buffer->height) {
 | 
				
			||||||
 | 
							wlr_log(WLR_ERROR, "Surface size doesn't match buffer size");
 | 
				
			||||||
 | 
							return NULL;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct wlr_dmabuf_attributes attribs = {0};
 | 
						struct wlr_dmabuf_attributes attribs = {0};
 | 
				
			||||||
	if (!wlr_buffer_get_dmabuf(buffer, &attribs)) {
 | 
						if (!wlr_buffer_get_dmabuf(buffer, &attribs)) {
 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue