mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:57:44 +00:00
WindowServer: Coalesce flushing buffers into one ioctl() call
We regularily need to flush many rectangles, so instead of making many expensive ioctl() calls to the framebuffer driver, collect the rectangles and only make one call. And if we have too many rectangles then it may be cheaper to just update the entire region, in which case we simply convert them all into a union and just flush that one rectangle instead.
This commit is contained in:
parent
56cd0f929e
commit
38af4c29e6
7 changed files with 123 additions and 31 deletions
|
@ -30,6 +30,11 @@ struct FBRect {
|
|||
unsigned height;
|
||||
};
|
||||
|
||||
struct FBRects {
|
||||
unsigned count;
|
||||
FBRect const* rects;
|
||||
};
|
||||
|
||||
__END_DECLS
|
||||
|
||||
enum IOCtlNumber {
|
||||
|
@ -50,7 +55,7 @@ enum IOCtlNumber {
|
|||
FB_IOCTL_SET_RESOLUTION,
|
||||
FB_IOCTL_GET_BUFFER,
|
||||
FB_IOCTL_SET_BUFFER,
|
||||
FB_IOCTL_FLUSH_BUFFER,
|
||||
FB_IOCTL_FLUSH_BUFFERS,
|
||||
SIOCSIFADDR,
|
||||
SIOCGIFADDR,
|
||||
SIOCGIFHWADDR,
|
||||
|
@ -83,7 +88,7 @@ enum IOCtlNumber {
|
|||
#define FB_IOCTL_SET_RESOLUTION FB_IOCTL_SET_RESOLUTION
|
||||
#define FB_IOCTL_GET_BUFFER FB_IOCTL_GET_BUFFER
|
||||
#define FB_IOCTL_SET_BUFFER FB_IOCTL_SET_BUFFER
|
||||
#define FB_IOCTL_FLUSH_BUFFER FB_IOCTL_FLUSH_BUFFER
|
||||
#define FB_IOCTL_FLUSH_BUFFERS FB_IOCTL_FLUSH_BUFFERS
|
||||
#define SIOCSIFADDR SIOCSIFADDR
|
||||
#define SIOCGIFADDR SIOCGIFADDR
|
||||
#define SIOCGIFHWADDR SIOCGIFHWADDR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue