mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:22:45 +00:00 
			
		
		
		
	WindowServer: Implement support for combined buffer flipping + flushing
Some devices may require DMA transfers to flush the updated buffer areas prior to flipping. For those devices we track the areas that require flushing prior to the next flip. For devices that do not support flipping, but require flushing, we'll simply flush after updating the front buffer. This also adds a small optimization that skips these steps entirely for a screen that doesn't have any updates that need to be rendered.
This commit is contained in:
		
							parent
							
								
									45a2bc27d5
								
							
						
					
					
						commit
						fdae117600
					
				
					 7 changed files with 82 additions and 29 deletions
				
			
		|  | @ -38,12 +38,13 @@ ALWAYS_INLINE int fb_set_buffer(int fd, int index) | |||
|     return ioctl(fd, FB_IOCTL_SET_BUFFER, index); | ||||
| } | ||||
| 
 | ||||
| ALWAYS_INLINE int fb_flush_buffers(int fd, FBRect const* rects, unsigned count) | ||||
| ALWAYS_INLINE int fb_flush_buffers(int fd, int index, FBRect const* rects, unsigned count) | ||||
| { | ||||
|     FBRects fb_rects; | ||||
|     fb_rects.count = count; | ||||
|     fb_rects.rects = rects; | ||||
|     return ioctl(fd, FB_IOCTL_FLUSH_BUFFERS, &fb_rects); | ||||
|     FBFlushRects fb_flush_rects; | ||||
|     fb_flush_rects.buffer_index = index; | ||||
|     fb_flush_rects.count = count; | ||||
|     fb_flush_rects.rects = rects; | ||||
|     return ioctl(fd, FB_IOCTL_FLUSH_BUFFERS, &fb_flush_rects); | ||||
| } | ||||
| 
 | ||||
| __END_DECLS | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tom
						Tom