mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	output: try skipping buffer allocation if the backend allows it
When enabling an output, skip the empty buffer allocation if the backend accepts modesets without a buffer. This fixes mode-setting with the noop backend.
This commit is contained in:
		
							parent
							
								
									8a3cd28973
								
							
						
					
					
						commit
						df0e75ba05
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -677,6 +677,12 @@ static bool output_ensure_buffer(struct wlr_output *output) {
 | 
				
			||||||
		return true;
 | 
							return true;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// If the backend doesn't necessarily need a new buffer on modeset, don't
 | 
				
			||||||
 | 
						// bother allocating one.
 | 
				
			||||||
 | 
						if (!output->impl->test || output->impl->test(output)) {
 | 
				
			||||||
 | 
							return true;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	wlr_log(WLR_DEBUG, "Attaching empty buffer to output for modeset");
 | 
						wlr_log(WLR_DEBUG, "Attaching empty buffer to output for modeset");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!output_attach_empty_buffer(output)) {
 | 
						if (!output_attach_empty_buffer(output)) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue