mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
LibGUI+WindowServer: Use anonymous files for window backing stores :^)
This patch replaces the use of shbufs for GUI::Window backing stores with the new anonymous files mechanism. Backing bitmaps are now built on memory allocated with anon_create(). They are passed across the IPC socket as IPC::File. This means that WindowServer now pledges "recvfd" and graphical clients need to pledge "sendfd" to work. To support the cached bitmap swapping optimization on the WindowServer side, each backing store is assigned an incrementing serial number on the client side. (This allows us to re-use an already mapped file.)
This commit is contained in:
parent
4d97b955e6
commit
0b0514d46b
5 changed files with 42 additions and 19 deletions
|
@ -39,7 +39,7 @@
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
if (pledge("stdio video thread shared_buffer accept rpath wpath cpath unix proc fattr sigaction", nullptr) < 0) {
|
||||
if (pledge("stdio video thread recvfd shared_buffer accept rpath wpath cpath unix proc fattr sigaction", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ int main(int, char**)
|
|||
|
||||
WindowServer::EventLoop loop;
|
||||
|
||||
if (pledge("stdio video thread shared_buffer accept rpath wpath cpath proc", nullptr) < 0) {
|
||||
if (pledge("stdio video thread recvfd shared_buffer accept rpath wpath cpath proc", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue