present: Document the TearFree flip reasons in PresentFlipReason
Adding new flip reasons after the TearFree ones would break the assumption that `reason >= PRESENT_FLIP_REASON_DRIVER_TEARFREE` implies either of the TearFree reasons. Document this in the PresentFlipReason enum in order to save someone a very bad headache in the future. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
This commit is contained in:
		
							parent
							
								
									1fab978a95
								
							
						
					
					
						commit
						f490622fca
					
				| 
						 | 
					@ -30,6 +30,12 @@
 | 
				
			||||||
typedef enum {
 | 
					typedef enum {
 | 
				
			||||||
    PRESENT_FLIP_REASON_UNKNOWN,
 | 
					    PRESENT_FLIP_REASON_UNKNOWN,
 | 
				
			||||||
    PRESENT_FLIP_REASON_BUFFER_FORMAT,
 | 
					    PRESENT_FLIP_REASON_BUFFER_FORMAT,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /* Don't add new flip reasons after the TearFree ones, since it's expected
 | 
				
			||||||
 | 
					     * that the TearFree reasons are the highest ones in order to allow doing
 | 
				
			||||||
 | 
					     * `reason >= PRESENT_FLIP_REASON_DRIVER_TEARFREE` to check if a reason is
 | 
				
			||||||
 | 
					     * PRESENT_FLIP_REASON_DRIVER_TEARFREE{_FLIPPING}.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
    PRESENT_FLIP_REASON_DRIVER_TEARFREE,
 | 
					    PRESENT_FLIP_REASON_DRIVER_TEARFREE,
 | 
				
			||||||
    PRESENT_FLIP_REASON_DRIVER_TEARFREE_FLIPPING
 | 
					    PRESENT_FLIP_REASON_DRIVER_TEARFREE_FLIPPING
 | 
				
			||||||
} PresentFlipReason;
 | 
					} PresentFlipReason;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue