mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	output: disambiguate the two types of damage
See https://github.com/swaywm/wlroots/issues/1665
This commit is contained in:
		
							parent
							
								
									57d32d03a8
								
							
						
					
					
						commit
						1dbece74fb
					
				
					 2 changed files with 11 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -222,11 +222,16 @@ bool wlr_output_attach_render(struct wlr_output *output, int *buffer_age);
 | 
			
		|||
bool wlr_output_preferred_read_format(struct wlr_output *output,
 | 
			
		||||
	enum wl_shm_format *fmt);
 | 
			
		||||
/**
 | 
			
		||||
 * Set the damage region for the frame to be submitted.
 | 
			
		||||
 * Set the damage region for the frame to be submitted. This is the region of
 | 
			
		||||
 * the screen that has changed since the last frame.
 | 
			
		||||
 *
 | 
			
		||||
 * Compositors implementing damage tracking should call this function with the
 | 
			
		||||
 * damaged region in output-buffer-local coordinates (ie. scaled and
 | 
			
		||||
 * transformed).
 | 
			
		||||
 *
 | 
			
		||||
 * This region is not to be confused with the renderer's buffer damage, ie. the
 | 
			
		||||
 * region compositors need to repaint. Compositors usually need to repaint more
 | 
			
		||||
 * than what changed since last frame since multiple render buffers are used.
 | 
			
		||||
 */
 | 
			
		||||
void wlr_output_set_damage(struct wlr_output *output,
 | 
			
		||||
	pixman_region32_t *damage);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -66,9 +66,13 @@ void wlr_output_damage_destroy(struct wlr_output_damage *output_damage);
 | 
			
		|||
 * `needs_frame` will be set to true if a frame should be submitted. `damage`
 | 
			
		||||
 * will be set to the region of the output that needs to be repainted, in
 | 
			
		||||
 * output-buffer-local coordinates.
 | 
			
		||||
 *
 | 
			
		||||
 * The buffer damage region accumulates all damage since the buffer has last
 | 
			
		||||
 * been swapped. This is not to be confused with the output surface damage,
 | 
			
		||||
 * which only contains the changes between two frames.
 | 
			
		||||
 */
 | 
			
		||||
bool wlr_output_damage_attach_render(struct wlr_output_damage *output_damage,
 | 
			
		||||
	bool *needs_frame, pixman_region32_t *damage);
 | 
			
		||||
	bool *needs_frame, pixman_region32_t *buffer_damage);
 | 
			
		||||
/**
 | 
			
		||||
 * Accumulates damage and schedules a `frame` event.
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue