mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	backend/drm: export pending FB in export_dmabuf, if any
This allows callers to grab the current frame right after committing it, without having to incur a full vblank worth of latency.
This commit is contained in:
		
							parent
							
								
									2934a72920
								
							
						
					
					
						commit
						1328477a82
					
				
					 1 changed files with 6 additions and 4 deletions
				
			
		| 
						 | 
					@ -639,13 +639,15 @@ static bool drm_connector_export_dmabuf(struct wlr_output *output,
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct wlr_drm_plane *plane = crtc->primary;
 | 
						struct wlr_drm_fb *fb = &crtc->primary->queued_fb;
 | 
				
			||||||
 | 
						if (fb->type == WLR_DRM_FB_TYPE_NONE) {
 | 
				
			||||||
	if (plane->current_fb.type == WLR_DRM_FB_TYPE_NONE) {
 | 
							fb = &crtc->primary->current_fb;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if (fb->type == WLR_DRM_FB_TYPE_NONE) {
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return export_drm_bo(plane->current_fb.bo, attribs);
 | 
						return export_drm_bo(fb->bo, attribs);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct wlr_drm_fb *plane_get_next_fb(struct wlr_drm_plane *plane) {
 | 
					struct wlr_drm_fb *plane_get_next_fb(struct wlr_drm_plane *plane) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue