1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:57:35 +00:00

Kernel: Add a simple shared memory API for two processes only.

And use this to implement shared bitmaps between WindowServer and clients.
This commit is contained in:
Andreas Kling 2019-02-16 12:13:43 +01:00
parent 4db78dabd3
commit 4ea28bf0a5
13 changed files with 240 additions and 48 deletions

View file

@ -32,7 +32,7 @@ Painter::Painter(GWidget& widget)
auto response = GEventLoop::main().sync_request(request, WSAPI_ServerMessage::DidGetWindowBackingStore);
m_backing_store_id = response.backing.backing_store_id;
m_target = GraphicsBitmap::create_wrapper(response.backing.size, response.backing.pixels);
m_target = GraphicsBitmap::create_with_shared_buffer(response.backing.shared_buffer_id, response.backing.size);
ASSERT(m_target);
m_window = widget.window();
m_translation.move_by(widget.window_relative_rect().location());