mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	backend/drm: introduce wlr_drm_fb
This is a type which manages gbm_surfaces and imported dmabufs in the same place, and makes the lifetime management between the two shared. It should lead to easier to understand code, and fewer special cases. This also contains a fair bit of refactoring to start using this new type. Co-authored-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
		
							parent
							
								
									fa5d709fc3
								
							
						
					
					
						commit
						8da9d9679e
					
				
					 8 changed files with 397 additions and 285 deletions
				
			
		| 
						 | 
				
			
			@ -105,8 +105,13 @@ static void session_signal(struct wl_listener *listener, void *data) {
 | 
			
		|||
			}
 | 
			
		||||
 | 
			
		||||
			struct wlr_drm_plane *plane = conn->crtc->cursor;
 | 
			
		||||
			drm->iface->crtc_set_cursor(drm, conn->crtc,
 | 
			
		||||
				(plane && plane->cursor_enabled) ? plane->surf.back : NULL);
 | 
			
		||||
			struct gbm_bo *bo = NULL;
 | 
			
		||||
			if (plane->cursor_enabled) {
 | 
			
		||||
				bo = drm_fb_acquire(&plane->current_fb, drm,
 | 
			
		||||
					&plane->mgpu_surf);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			drm->iface->crtc_set_cursor(drm, conn->crtc, bo);
 | 
			
		||||
			drm->iface->crtc_move_cursor(drm, conn->crtc, conn->cursor_x,
 | 
			
		||||
				conn->cursor_y);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue